Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Fix BC Compatibility to use old FlattenException in ExceptionController#33918
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
yceruto left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Same opinion as#33916 (review) (:-1:)
The solution will be requiresymfony/debug as hard dependecy to avoid BC break.
We provide no guarantee at the dependency level: if ppl use Debug but have it transitively, it's accepted policy to require them to make it an explicit dep as of the next version (minor included)
Said another way: the BC policy covers the API, not the deps.
alexander-schranz commentedOct 8, 2019
@yceruto Sorry this does not work in this case. I change to have symfony/debug as requirement in my library and it is installed but as you see here:
Symfony ExceptionListener create a new FlattenException and as that does not extend from the old one. You will get an error that a false FlattenException is given. |
alexander-schranz commentedOct 9, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I think its a similiar issue we had with the KernelBrowser and the Client here: #31762 which was then later fixed in:#31881 The change in this PR is maybe not correct. Think the only correct fix would be to keep backward compatibility is that a new added class extends the old one and not the other way around. |
alexander-schranz commentedOct 9, 2019
Want to move this discussion to an issue:#33929 |
If you create a CustomExceptionController and typehinted the showAction with the old FlattenException this will break.
Maybe a better solution would to change that the new extend from the old inhttps://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/ErrorRenderer/Exception/FlattenException.php#L381 instead of the old extending the new.