Skip to content

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

@faridsa

Description

@faridsa

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions