squareboat / sneaker

An easy way to send emails whenever an exception occurs on server.
MIT License
222 stars 46 forks source link

Laravel 6 BindingResolutionException #49

Open ITwrx opened 4 years ago

ITwrx commented 4 years ago

hi. trying to run "php artisan config:cache" with L6 i get:

Configuration cache cleared!

Illuminate\Contracts\Container\BindingResolutionException : Target class [sneaker] does not exist.

at /srv/http/l6_app/vendor/laravel/framework/src/Illuminate/Container/Container.php:805 801| 802| try { 803| $reflector = new ReflectionClass($concrete); 804| } catch (ReflectionException $e) {

805| throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e); 806| } 807| 808| // If the type is not instantiable, the developer is attempting to resolve 809| // an abstract type such as an Interface or Abstract Class and there is

Exception trace:

1 Illuminate\Foundation\Bootstrap\HandleExceptions::handleException(Object(Illuminate\Contracts\Container\BindingResolutionException))

2 ReflectionException::("Class sneaker does not exist") /srv/http/l6_app/vendor/laravel/framework/src/Illuminate/Container/Container.php:803

Please use the argument -v to see more details.

any ideas?

thanks

smenzer commented 4 years ago

i'm getting the same type of error if i try to upgrade my laravel to 6.0 with composer:

...
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover

Fatal error: Uncaught ReflectionException: Class sneaker does not exist in /laravel6-app/vendor/laravel/framework/src/Illuminate/Container/Container.php:803
Stack trace:
#0 /laravel6-app/vendor/laravel/framework/src/Illuminate/Container/Container.php(803): ReflectionClass->__construct('sneaker')
#1 /laravel6-app/vendor/laravel/framework/src/Illuminate/Container/Container.php(681): Illuminate\Container\Container->build('sneaker')
#2 /laravel6-app/vendor/laravel/framework/src/Illuminate/Container/Container.php(629): Illuminate\Container\Container->resolve('sneaker', Array)
#3 /laravel6-app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(769): Illuminate\Container\Container->make('sneaker', Array)
#4 /laravel6-app/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(121): Illuminate\Foundation\Application->make('sneaker', Array)
#5 /laravel6-app/app/Exceptions/Handler.php(39): app('snea in /laravel6-app/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 805
PHP Fatal error:  Uncaught ReflectionException: Class sneaker does not exist in /laravel6-app/vendor/laravel/framework/src/Illuminate/Container/Container.php:803
Stack trace:
#0 /laravel6-app/vendor/laravel/framework/src/Illuminate/Container/Container.php(803): ReflectionClass->__construct('sneaker')
#1 /laravel6-app/vendor/laravel/framework/src/Illuminate/Container/Container.php(681): Illuminate\Container\Container->build('sneaker')
#2 /laravel6-app/vendor/laravel/framework/src/Illuminate/Container/Container.php(629): Illuminate\Container\Container->resolve('sneaker', Array)
#3 /laravel6-app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(769): Illuminate\Container\Container->make('sneaker', Array)
#4 /laravel6-app/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(121): Illuminate\Foundation\Application->make('sneaker', Array)
#5 /laravel6-app/app/Exceptions/Handler.php(39): app('snea in /laravel6-app/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 805
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255
adiafora commented 4 years ago

Try removing the line app('sneaker')->captureException($exception); in App\Exceptions\Handler::report()

This error is probably not related to this package. You just get an exception, and at the moment it can't send it