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.
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
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:
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.
Most helpful comment
Have you tried
composer dump-autoload
?