Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong argument passed in AppServiceProvider #744

Open
ChristianGiupponi opened this issue Nov 5, 2019 · 2 comments
Open

Wrong argument passed in AppServiceProvider #744

ChristianGiupponi opened this issue Nov 5, 2019 · 2 comments

Comments

@ChristianGiupponi
Copy link
Contributor

Summary of issue

Fail to log user due to AppServiceProvvider.
It's wired because this is the first time ever that this issue shows up, looks like that the closure pass the wrong object.

Argument 1 passed to App\Providers\AppServiceProvider::App\Providers\{closure}() must be an instance of Illuminate\Support\Carbon, instance of Carbon\Carbon given

it refear to AppServiceProvider, looks like that the closure pass Carbon object instead of a Illuminate\Carbon.

Carbon::serializeUsing(function (Carbon $carbon) {
            return $carbon->format('d/m/y H:i:s');
        });

Does anyone have the same error?

I have tried to use Carbon\Carbon and it works.

Steps to reproduce

Just try to log in

System Details

  • Operating System: Ubuntu
  • PHP Version: 7.2
  • Laravel Version: 5.7
  • Asgardcms/Platform version: master
@mikemand
Copy link
Contributor

mikemand commented Nov 5, 2019

It looks like we might just have to remove the typehint. I'm not sure why this is not working now, as I haven't had any issues in the 4 sites I have running on Asgard v4 (or master as you say).

@ChristianGiupponi
Copy link
Contributor Author

Another solution could be rename the Illuminate\Carbon, but can't figured out why this error occurs only today, I have other project running it with no issue at all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants