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

Type Error issue with latest Laravel 7.x #183

Closed
ssmusoke opened this issue Jul 28, 2020 · 4 comments · Fixed by #184
Closed

Type Error issue with latest Laravel 7.x #183

ssmusoke opened this issue Jul 28, 2020 · 4 comments · Fixed by #184

Comments

@ssmusoke
Copy link

Due to this PR laravel/framework#33539, the package throws an error

` TypeError

Illuminate\Container\Container::bind(): Argument #2 ($concrete) must be of type Closure|string|null

at vendor/laravel/framework/src/Illuminate/Container/Container.php:238
234| // bound into this container to the abstract type and we will just wrap it
235| // up inside its own Closure to give us more convenience when extending.
236| if (! $concrete instanceof Closure) {
237| if (! is_string($concrete)) {

238| throw new \TypeError(self::class.'::bind(): Argument #2 ($concrete) must be of type Closure|string|null');
239| }
240|
241| $concrete = $this->getClosure($abstract, $concrete);
242| }

+10 vendor frames
11 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
`

@AustinW
Copy link

AustinW commented Jul 28, 2020

Getting the same issue as described here. Will try to submit a PR later if still unresolved.

@Stefan-Dressler
Copy link

I am also waiting for this fix.

@vvanpo
Copy link
Contributor

vvanpo commented Jul 31, 2020

Considering Laravel just released a security vulnerability fix (https://blog.laravel.com/security-release-laravel-61827-7220), this is blocking projects from integrating this fix.

@vvanpo
Copy link
Contributor

vvanpo commented Jul 31, 2020

The bug is right here: https://github.com/antonioribeiro/health/blob/v0.10.1/src/ServiceProvider.php#L320, this needs to be a closure.

vvanpo added a commit to vvanpo/health that referenced this issue Jul 31, 2020
Laravel 7.22.0
(https://github.com/laravel/framework/releases/tag/v7.22.0) throws
`TypeError`s when passed an object instead of a closure or class name.

Fixes antonioribeiro#183
vvanpo added a commit to vvanpo/health that referenced this issue Jul 31, 2020
Laravel 7.22.0
(https://github.com/laravel/framework/releases/tag/v7.22.0) throws
`TypeError`s when passed an object instead of a closure or class name.

Fixes antonioribeiro#183
vvanpo added a commit to vvanpo/health that referenced this issue Jul 31, 2020
Laravel 7.22.0
(https://github.com/laravel/framework/releases/tag/v7.22.0) throws
`TypeError`s when passed an object instead of a closure or class name.

Fixes antonioribeiro#183
antonioribeiro pushed a commit that referenced this issue Apr 17, 2023
Laravel 7.22.0
(https://github.com/laravel/framework/releases/tag/v7.22.0) throws
`TypeError`s when passed an object instead of a closure or class name.

Fixes #183
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

Successfully merging a pull request may close this issue.

4 participants