{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/10808","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/10808/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/10808/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/10808/events","html_url":"https://github.com/laravel/framework/issues/10808","id":115067795,"number":10808,"title":"[5.1] [5.2] Error handler hides PHPUnit errors","user":{"login":"sebastianbergmann","id":25218,"avatar_url":"https://avatars.githubusercontent.com/u/25218?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastianbergmann","html_url":"https://github.com/sebastianbergmann","followers_url":"https://api.github.com/users/sebastianbergmann/followers","following_url":"https://api.github.com/users/sebastianbergmann/following{/other_user}","gists_url":"https://api.github.com/users/sebastianbergmann/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastianbergmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastianbergmann/subscriptions","organizations_url":"https://api.github.com/users/sebastianbergmann/orgs","repos_url":"https://api.github.com/users/sebastianbergmann/repos","events_url":"https://api.github.com/users/sebastianbergmann/events{/privacy}","received_events_url":"https://api.github.com/users/sebastianbergmann/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/laravel/framework/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":28,"created_at":"2015-11-04T14:45:19Z","updated_at":"2016-03-31T08:41:40Z","closed_at":"2016-03-30T18:52:44Z","body":"I discovered a bug in PHPUnit (https://github.com/sebastianbergmann/phpunit/issues/1935) while working on a Laravel 5.1 project:\r\n\r\n```\r\n$ composer create-project laravel/laravel --prefer-dist\r\n\r\n$ cd laravel\r\n\r\n$ ./vendor/bin/phpunit --coverage-html /does-not-exist\r\nPHPUnit 4.8.16 by Sebastian Bergmann and contributors.\r\n\r\n.\r\n\r\nTime: 429 ms, Memory: 18.75Mb\r\n\r\nOK (1 test, 2 assertions)\r\n\r\nGenerating code coverage report in HTML format ...PHP Fatal error:  Uncaught exception 'Illuminate\\Contracts\\Container\\BindingResolutionException' with message 'Target [Illuminate\\Contracts\\Debug\\ExceptionHandler] is not instantiable.' in /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:745\r\nStack trace:\r\n#0 /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(627): Illuminate\\Container\\Container->build('Illuminate\\\\Cont...', Array)\r\n#1 /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\\Container\\Container->make('Illuminate\\\\Cont...', Array)\r\n#2 /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(154): Illuminate\\Foundation\\Application->make('Illuminate\\\\Cont...')\r\n#3 /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(79): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->getExceptionHandler()\r\n#4 [internal function]: Illuminate\\Foundation\\Bootstrap\\Handle in /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 745\r\nPHP Fatal error:  Uncaught exception 'Illuminate\\Contracts\\Container\\BindingResolutionException' with message 'Target [Illuminate\\Contracts\\Debug\\ExceptionHandler] is not instantiable.' in /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:745\r\nStack trace:\r\n#0 /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(627): Illuminate\\Container\\Container->build('Illuminate\\\\Cont...', Array)\r\n#1 /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\\Container\\Container->make('Illuminate\\\\Cont...', Array)\r\n#2 /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(154): Illuminate\\Foundation\\Application->make('Illuminate\\\\Cont...')\r\n#3 /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(79): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->getExceptionHandler()\r\n#4 /home/sb/test/laravel/vendor/laravel/framework/src/Illumina in /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 745\r\n```\r\n\r\nThe reason why I am opening this ticket is because nowhere in the stacktrace do I see PHPUnit and/or PHP_CodeCoverage. The fact that PHPUnit was not handling an exception raised by PHP_CodeCoverage was not apparent at all from looking at the error I got. Maybe the error handler is too eager?"},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/203822001","html_url":"https://github.com/laravel/framework/issues/10808#issuecomment-203822001","issue_url":"https://api.github.com/repos/laravel/framework/issues/10808","id":203822001,"user":{"login":"shehi","id":653569,"avatar_url":"https://avatars.githubusercontent.com/u/653569?v=3","gravatar_id":"","url":"https://api.github.com/users/shehi","html_url":"https://github.com/shehi","followers_url":"https://api.github.com/users/shehi/followers","following_url":"https://api.github.com/users/shehi/following{/other_user}","gists_url":"https://api.github.com/users/shehi/gists{/gist_id}","starred_url":"https://api.github.com/users/shehi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shehi/subscriptions","organizations_url":"https://api.github.com/users/shehi/orgs","repos_url":"https://api.github.com/users/shehi/repos","events_url":"https://api.github.com/users/shehi/events{/privacy}","received_events_url":"https://api.github.com/users/shehi/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T08:41:40Z","updated_at":"2016-03-31T08:41:40Z","body":"@GrahamCampbell , that must be the reason: my tests run without error, without your fix of laravel/laravel#3725 and I don't have routes file in my App (it's all inside RouteServiceProvider class). Guess that was the reason. Thanks!"}}