antonioribeiro / health

Laravel Health Panel
BSD 3-Clause "New" or "Revised" License
1.94k stars 198 forks source link

Type Error issue with latest Laravel 7.x #183

Closed ssmusoke closed 4 years ago

ssmusoke commented 4 years ago

Due to this PR https://github.com/laravel/framework/pull/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 commented 4 years ago

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

Stefan-Dressler commented 4 years ago

I am also waiting for this fix.

vvanpo commented 4 years ago

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 commented 4 years ago

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