-
-
Notifications
You must be signed in to change notification settings - Fork 352
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
Getting a BindingResolutionException on Pest with coverage #253
Comments
@manuglopez Try this: |
This is working. Thanks @nunomaduro, but I wonder why in my Mac I have to pass xdebug_mode and in Ubuntu it works without passing mode. |
@manuglopez, on Ubuntu is the |
Probably is there, I can't tell you now but, I have modified xdebug.mode section in php.ini and now all is working with no need to setup enviroment variable to coverage as @nunomaduro wisely stated to me in the post before. Anyway, the main difference between my two setups is the xdebug version, in Ubuntu I think I have version 2 and in mac Version 3.
And by default mode is develop There has been many changes in Xdebug configuration from version 2 to 3. https://xdebug.org/docs/upgrade_guide#changed-xdebug.coverage_enable |
Ah, yeah. I was going to ask if the |
@owenvoke Wondering if we can do something here? https://github.com/pestphp/pest-plugin-coverage/blob/master/src/Coverage.php#L38 |
Hello Good job with pest, but I`m having a problem with Pest code coverage in mac.
I`m running my app in
Pest is running test correctly but with xdebug 3.0.2 is throwing this error (only in coverage mode).
Uninstalling Pest and running code coverage with phpunit does work, and phpunit show coverage.
¿Is this a Bug?
Thanks.
PHP Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php:1038
Stack trace:
#0 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(839): Illuminate\Container\Container->notInstantiable('Illuminate\Cont...')
#1 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(712): Illuminate\Container\Container->build('Illuminate\Cont...')
#2 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(796): Illuminate\Container\Container->resolve('Illuminate\Cont...', Array, true)
#3 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Foundation\Application->resolve('Illuminate\Cont...', Array)
#4 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(781): Illuminate\Co in /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1038
Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1038
Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1038
Call Stack:$line = 38; private $ {Exception}trace = [0 => [...], 1 => [...], 2 => [...], 3 => [...], 4 => [...]]; private ${Exception}previous = class Exception { protected $message = 'Coverage not found in path: /Users/mgl/Code/avapp/vendor/pestphp/.temp/coverage.php.'; private $string = ''; protected $code = 0; protected $file = '/Users/mgl/Code/avapp/vendor/pestphp/pest/src/Exceptions/ShouldNotHappen.php'; protected $line = 38; private $trace = [...]; private $previous = NULL }; public $xdebug_message = '\nPest\Exceptions\ShouldNotHappen: \nThis should not happen - please create an new issue here: https://github.com/pestphp/pest.\n\n- Issue: Coverage not found in path: /Users/mgl/Code/avapp/vendor/pestphp/.temp/coverage.php.\n- PHP version: 7.4.9\n- Operating system: Darwin in /Users/mgl/Code/avapp/vendor/pestphp/pest/src/Exceptions/ShouldNotHappen.php on line 38\n\nCall Stack:\n 0.0004 400896 1. {main}() /Users/mgl/Code/avapp/vendor/pestphp/pest/bin/pest:0\n 0.0006 401216 2. {closure:/U' }) /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:0$message = 'Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable.'; private $ {Exception}string = ''; protected $code = 0; protected $file = '/Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php'; protected $line = 1038; private $ {Exception}trace = [0 => [...], 1 => [...], 2 => [...], 3 => [...], 4 => [...], 5 => [...], 6 => [...], 7 => [...]]; private ${Exception}previous = NULL; public $xdebug_message = '\nIlluminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1038\n\nCall Stack:\n 3.8439 39657320 1. Illuminate\Foundation\Bootstrap\HandleExceptions->handleException($e = class Pest\Exceptions\ShouldNotHappen { protected $message = '\nThis should not happen - please create an new issue here: https://github.com/pestphp' }) /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:94
3.8439 39657320 1. Illuminate\Foundation\Bootstrap\HandleExceptions->handleException($e = class Pest\Exceptions\ShouldNotHappen { protected $message = '\nThis should not happen - please create an new issue here: https://github.com/pestphp/pest.\n\n- Issue: Coverage not found in path: /Users/mgl/Code/avapp/vendor/pestphp/.temp/coverage.php.\n- PHP version: 7.4.9\n- Operating system: Darwin'; private ${Exception}string = ''; protected $code = 1; protected $file = '/Users/mgl/Code/avapp/vendor/pestphp/pest/src/Exceptions/ShouldNotHappen.php'; protected
3.8442 39658536 2. Illuminate\Foundation\Bootstrap\HandleExceptions->renderForConsole($e = class Illuminate\Contracts\Container\BindingResolutionException { protected
3.8442 39658536 3. Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler() /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:108
3.8442 39658536 4. Illuminate\Foundation\Application->make($abstract = 'Illuminate\Contracts\Debug\ExceptionHandler', $parameters = ???) /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:164
3.8442 39658536 5. Illuminate\Foundation\Application->make($abstract = 'Illuminate\Contracts\Debug\ExceptionHandler', $parameters = []) /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:781
3.8443 39658536 6. Illuminate\Foundation\Application->resolve($abstract = 'Illuminate\Contracts\Debug\ExceptionHandler', $parameters = [], $raiseEvents = ???) /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php:651
3.8443 39658536 7. Illuminate\Foundation\Application->resolve($abstract = 'Illuminate\Contracts\Debug\ExceptionHandler', $parameters = [], $raiseEvents = TRUE) /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:796
3.8443 39658536 8. Illuminate\Foundation\Application->build($concrete = 'Illuminate\Contracts\Debug\ExceptionHandler') /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php:712
3.8443 39658632 9. Illuminate\Foundation\Application->notInstantiable($concrete = 'Illuminate\Contracts\Debug\ExceptionHandler') /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php:839
Whoops\Exception\ErrorException
Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php:1038
Stack trace:
#0 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(839): Illuminate\Container\Container->notInstantiable('Illuminate\Cont...')
#1 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(712): Illuminate\Container\Container->build('Illuminate\Cont...')
#2 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(796): Illuminate\Container\Container->resolve('Illuminate\Cont...', Array, true)
#3 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Foundation\Application->resolve('Illuminate\Cont...', Array)
#4 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(781): Illuminate\Co
at vendor/laravel/framework/src/Illuminate/Container/Container.php:1038
1034▕ } else {
1035▕ $message = "Target [$concrete] is not instantiable.";
1036▕ }
1037▕
➜ 1038▕ throw new BindingResolutionException($message);
1039▕ }
1040▕
1041▕ /**
1042▕ * Throw an exception for an unresolvable primitive.
2 [internal]:0
Whoops\Run::handleShutdown()
PHP Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php:1038
Stack trace:
#0 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(839): Illuminate\Container\Container->notInstantiable('Illuminate\Cont...')
#1 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(712): Illuminate\Container\Container->build('Illuminate\Cont...')
#2 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(796): Illuminate\Container\Container->resolve('Illuminate\Cont...', Array, true)
#3 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Foundation\Application->resolve('Illuminate\Cont...', Array)
#4 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(781): Illuminate\Co in /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1038
Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1038
Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1038
Call Stack:$message = 'Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php:1038\nStack trace:\n#0 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(839): Illuminate\Container\Container->notInstantiable('Illuminate\\Cont...')\n#1 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Contain'; private $ {Error}string = ''; protected $code = 0; protected $file = '/Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php'; protected $line = 1038; private $ {Error}trace = [0 => [...], 1 => [...], 2 => [...]]; private ${Error}previous = NULL }) /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:130$message = 'Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable.'; private $ {Exception}string = ''; protected $code = 0; protected $file = '/Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php'; protected $line = 1038; private $ {Exception}trace = [0 => [...], 1 => [...], 2 => [...], 3 => [...], 4 => [...], 5 => [...], 6 => [...], 7 => [...], 8 => [...]]; private ${Exception}previous = NULL; public $xdebug_message = '\nIlluminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1038\n\nCall Stack:\n 3.9446 39729744 1. Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown() /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:0\n 3.9450 39748552 2. Illuminate\Foundation' }) /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:94
3.9446 39729744 1. Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown() /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:0
3.9450 39748552 2. Illuminate\Foundation\Bootstrap\HandleExceptions->handleException($e = class Symfony\Component\ErrorHandler\Error\FatalError { private $error = ['type' => 1, 'message' => 'Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php:1038\nStack trace:\n#0 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(839): Illuminate\Container\Container->notInstantiable('Illuminate\\Cont...')\n#1 /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Contain', 'file' => '/Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php', 'line' => 1038]; protected
3.9451 39760592 3. Illuminate\Foundation\Bootstrap\HandleExceptions->renderForConsole($e = class Illuminate\Contracts\Container\BindingResolutionException { protected
3.9451 39760592 4. Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler() /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:108
3.9451 39760592 5. Illuminate\Foundation\Application->make($abstract = 'Illuminate\Contracts\Debug\ExceptionHandler', $parameters = ???) /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:164
3.9451 39760592 6. Illuminate\Foundation\Application->make($abstract = 'Illuminate\Contracts\Debug\ExceptionHandler', $parameters = []) /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:781
3.9451 39760592 7. Illuminate\Foundation\Application->resolve($abstract = 'Illuminate\Contracts\Debug\ExceptionHandler', $parameters = [], $raiseEvents = ???) /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php:651
3.9451 39760592 8. Illuminate\Foundation\Application->resolve($abstract = 'Illuminate\Contracts\Debug\ExceptionHandler', $parameters = [], $raiseEvents = TRUE) /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:796
3.9451 39760592 9. Illuminate\Foundation\Application->build($concrete = 'Illuminate\Contracts\Debug\ExceptionHandler') /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php:712
3.9451 39760688 10. Illuminate\Foundation\Application->notInstantiable($concrete = 'Illuminate\Contracts\Debug\ExceptionHandler') /Users/mgl/Code/avapp/vendor/laravel/framework/src/Illuminate/Container/Container.php:839
The text was updated successfully, but these errors were encountered: