antonioribeiro / health

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

Installing on Larvel 10 fires error Illuminate\Container\Container::bind(): Argument #2 ($concrete) must be of type Closure|string|null #354

Open faridsa opened 4 months ago

faridsa commented 4 months ago

After being added PragmaRX\Health\ServiceProvider::class to the providers array my site shows that error:

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

  at vendor/laravel/framework/src/Illuminate/Container/Container.php:266
    262▕         // bound into this container to the abstract type and we will just wrap it
    263▕         // up inside its own Closure to give us more convenience when extending.
    264▕         if (! $concrete instanceof Closure) {
    265▕             if (! is_string($concrete)) {
  ➜ 266▕                 throw new TypeError(self::class.'::bind(): Argument #2 ($concrete) must be of type Closure|string|null');
    267▕             }
    268▕
    269▕             $concrete = $this->getClosure($abstract, $concrete);
    270▕         }

      +10 vendor frames

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

I'm using Laravel v.10.45.1 and PragmaRX/Health 0.3.3 under PHP 8.1.27

InspiredPrynce commented 3 months ago

Have you fixed this issue yet?