Framework: PHP Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /app/vendor/laravel/framework/src/Illuminate/Container/Container.php:958

Created on 11 Jun 2019  路  5Comments  路  Source: laravel/framework

  • Laravel Version: 5.8.21
  • PHP Version: 7.3.4
  • Database Driver & Version: mysql 8.0.16
  • PHPUnit: 8.2.1

likely a duplicate of: https://github.com/laravel/framework/issues/26874, but it was close 6 months ago. but there have been a few comments in the last month or so. perhaps others, like me are getting an issue still.

Description:

i'm getting this error (after adding https://github.com/sebastiaanluca/laravel-auto-morph-map via composer). when i run phpunit i get a few fatal errors. not sure how/why the package would have messed it up. so any help would be great!

PHP Fatal error:  Cannot declare class App\Middleware\FixedStartSession, because the name is already in use in /app/app/Http/Middleware/FixedStartSession.php on line 21

PHP Fatal error:  Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /app/vendor/laravel/framework/src/Illuminate/Container/Container.php:958

Fatal error: Cannot declare class App\Middleware\FixedStartSession, because the name is already in use in /app/app/Http/Middleware/FixedStartSession.php on line 21

Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /app/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 958

Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /app/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 958

Most helpful comment

Have you tried composer dump-autoload?

All 5 comments

Have you tried composer dump-autoload?

Have you tried composer dump-autoload?

yes. i read that from some other thread/issue whilst in this google rabbit hole. it still doesn't work.

Have you tried removing the package?

Unfortunately this GitHub area is not a support area for general application issues. This is only for issues/bugs with the framework code itself.

I will be closing your ticket here. Instead please try asking your question on one of the many great community support areas that will likely give you a better answer more quickly:

  • Laravel Slack (https://larachat.co/)
  • Laravel.io Forum (https://laravel.io/forum)
  • Laracasts Forum (https://laracasts.com/discuss)
  • StackOverflow (http://stackoverflow.com/questions/tagged/laravel)

If you feel I've closed this issue in error, please provide more information about how this is a framework issue, and I'll reopen the ticket.

Thanks in advance.

For me it turned out to be access rights. This might be an issue for vm/container environments.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lzp819739483 picture lzp819739483  路  3Comments

fideloper picture fideloper  路  3Comments

JamborJan picture JamborJan  路  3Comments

iivanov2 picture iivanov2  路  3Comments

shopblocks picture shopblocks  路  3Comments