-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] Apps can no longer expect their fatal error handlers to be triggered #22678
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
This was referenced May 9, 2017
I confirm the bug, up to master. console.exception|error listeners should be able to handle throwables, but if they don't, the error should reach the error handler (original error should be rethrown), which is not the case anymore (neither the Debug one nor custom error handlers are reached). |
@ciaranmcnulty Could you try #22690? |
fabpot
added a commit
that referenced
this issue
May 11, 2017
…onsole.error listeners (chalasr) This PR was merged into the 2.7 branch. Discussion ---------- [Console] Fix errors not rethrown even if not handled by console.error listeners | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #22678 | License | MIT | Doc PR | n/a #22261 has been squashed while revisiting error handling, this fixes it again while keeping latest changes intact. __code__ ```php public function execute(InputInterface $input, OutputInterface $output) { $this->barr(); } public function bar() { } ``` __before__  __after__  Commits ------- 75f098f Fix errors not rethrown even if not handled by console.error listeners
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is a behaviour change in this version; previously a
Throwable
that occurred during a console command'srun
would be thrown upwards. It's now caught and turned into anException
.The change in question is here:
https://github.com/symfony/symfony/pull/22435/files#r115471431
For an example of how this causes an issue, in PhpSpec we maintain a
2.5
bugfix branch that does not know how to handle Throwables, instead relying on a mechanism that usesregister_shutdown_function
to format a nice error message when a fatal error occurs. As of Symfony 3.2.8 this message is no longer shown, because the shutdown function never executes.This is something we could of course code around, but it's not a change I'd expect to be introduced in a patch.
The text was updated successfully, but these errors were encountered: