Skip to content

[HttpKernel] Support typehint to deprecated FlattenException in controller #34662

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

Merged
merged 1 commit into from
Nov 28, 2019

Conversation

andrew-demb
Copy link
Contributor

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #34661
License MIT
Doc PR

We should support converting throwable to FlattenException with typehint to deprecated class also

Copy link
Member

@yceruto yceruto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the current ExceptionListener intended to preserve that compatibility?

Could you please elaborate a bit more on the actual use case?

@nicolas-grekas nicolas-grekas changed the title Fix #34661 Support typehint to deprecated FlattenException in controller [HttpKernel] Support typehint to deprecated FlattenException in controller Nov 28, 2019
@andrew-demb
Copy link
Contributor Author

andrew-demb commented Nov 28, 2019

My use case:
I replaced ExceptionListener usage in favor ErrorListener (as deprecation message describes) and I expect, that my (not updated - with used old-namespaced exception class in argument typehint) controller will work.

@nicolas-grekas
Copy link
Member

Thank you @andrew-demb.

nicolas-grekas added a commit that referenced this pull request Nov 28, 2019
…on in controller (andrew-demb)

This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[HttpKernel] Support typehint to deprecated FlattenException in controller

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34661
| License       | MIT
| Doc PR        |

We should support converting throwable to `FlattenException` with typehint to deprecated class also

Commits
-------

26b4e37 [HttpKernel] Support typehint to deprecated FlattenException in controller
@nicolas-grekas nicolas-grekas merged commit 26b4e37 into symfony:4.4 Nov 28, 2019
@andrew-demb andrew-demb deleted the patch-1 branch November 28, 2019 08:16
This was referenced Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants