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

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

Open
faridsa opened this issue Feb 25, 2024 · 1 comment

Comments

@faridsa
Copy link

faridsa commented Feb 25, 2024

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
Copy link

Have you fixed this issue yet?

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