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

[HttpKernel] fix handling of nested Error instances #27662

Merged
merged 1 commit into from Jun 21, 2018

Conversation

Projects
None yet
3 participants
@xabbuh
Member

xabbuh commented Jun 20, 2018

Q A
Branch? 4.1
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #27613
License MIT
Doc PR
@xabbuh

This comment has been minimized.

Member

xabbuh commented Jun 20, 2018

This can happen when the exception controller is registered as a private service and was removed (now that we catch every Error instance): https://github.com/symfony/symfony/blob/4.1/src/Symfony/Component/HttpKernel/Controller/ContainerControllerResolver.php#L48-L73

@xabbuh xabbuh changed the base branch from 4.0 to 4.1 Jun 20, 2018

@xabbuh xabbuh added this to the 4.1 milestone Jun 20, 2018

@nicolas-grekas

The "if" should be replaced by a ternary operator to select Exception or Error, to allow changing the previous of errors, isn't it?

@xabbuh

This comment has been minimized.

Member

xabbuh commented Jun 21, 2018

Yes, I was under the false impression that the Error class doesn't have this property. Fixed now.

@xabbuh

This comment has been minimized.

Member

xabbuh commented Jun 21, 2018

We could also merge this into 4.0 to account for the not so likely case that an ArgumentCountError is thrown during resolving the exception controller.

@nicolas-grekas

This comment has been minimized.

Member

nicolas-grekas commented Jun 21, 2018

Even 3.4 actually, but the check needs to be for Exception then, not Error, to account for polyfills.

@xabbuh xabbuh changed the base branch from 4.1 to 3.4 Jun 21, 2018

@xabbuh xabbuh modified the milestones: 4.1, 3.4 Jun 21, 2018

@xabbuh

This comment has been minimized.

Member

xabbuh commented Jun 21, 2018

indeed, done

@nicolas-grekas

This comment has been minimized.

Member

nicolas-grekas commented Jun 21, 2018

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit a6696d0 into symfony:3.4 Jun 21, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details

nicolas-grekas added a commit that referenced this pull request Jun 21, 2018

bug #27662 [HttpKernel] fix handling of nested Error instances (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] fix handling of nested Error instances

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27613
| License       | MIT
| Doc PR        |

Commits
-------

a6696d0 fix handling of nested Error instances

@xabbuh xabbuh deleted the xabbuh:issue-27613 branch Jun 21, 2018

This was referenced Jun 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment