-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Application exit code not properly handled, when having fatal exceptions, Symfony 2.8, PHP7 #20110
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
Labels
Comments
Can this be related to #19078 ?? |
Brilliant. Just ringed a bell for me and I wanted to make sure. |
fabpot
added a commit
that referenced
this issue
Dec 5, 2016
…adus) This PR was squashed before being merged into the 2.7 branch (closes #20736). Discussion ---------- [Console] fixed PHP7 Errors when not using Dispatcher | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #17257, #20110, #20111 | License | MIT | Doc PR | n/a Original fix, #19813, works only when there is event dispatcher available. This PR fix the issue also for scenario without event dispatcher. Closes #20110 issue and #20111 PR connected to it. Closing #17257 , as everywhere the error is converted to exception and it should be handled Commits ------- 899fa79 [Console] fixed PHP7 Errors when not using Dispatcher
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
when a command throws a fatal error in PHP7, the exception produced is handled by global error handler, not application error handler.
thus the error message is properly handled, but the exit code is not.
such code for example (for tests or more) could lead to such behavior, under Symfony 2.8 / PHP 7
$a = null; $a->getSmth();
under PHP 5.3 the above command execution would exit with non zero exit code.
under PHP7.* this would end up with exit code being zero, which is not good.
the problem is in the - Symfony/Component/Console/Application.php:124,
where only \Exception class is catched
#20111
The text was updated successfully, but these errors were encountered: