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 compatiblity between ErrorRenderer FlattenException and Debug FlattenException#33916
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• 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.
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.
Hi@alexander-schranz thanks for taking care of this, but I think we already have changed all the calls fromFlattenException::create() toFlattenException::createFromThrowable() in 4.4 codebase. If your project or 3rd-party bundles useFlattenException::create() fromDebug component for something, it must requiresymfony/debug package as a hard dependency instead of relying on it as a transitive one.
Thus, you'll be able to migrate without BC break. See discussion about this topic here#32873 (comment)
I'm 👎 on these changes.
alexander-schranz commentedOct 8, 2019
@yceruto Thank you for clarification. I still would add the function as it don't really hurt if its there and for people who relying on this don't get hurt when they update from 4.3 and 4.4. |
| returnstatic::createFromThrowable($exception,$statusCode,$headers); | ||
| } | ||
| publicstaticfunctioncreateFromThrowable(\Throwable$exception,int$statusCode =null,array$headers = []):self |
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.
what about renaming this one tocreate instead? that would make the most sense to me as the current name is due to history - but this is a new component now
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.
But if somebody did usecreateFromThrowable which did also exist on the Debug FlattenException it will get there an error. I think in 4.4 we still should provide both functions.
stof commentedOct 9, 2019
I don't see how this help at all regarding BC. If you want to migrate from one FlattenException to the other one, you have to change the class name used for the static call, not only the name of the method. Using the same method name in both cases will not remove the need for a |
Uh oh!
There was an error while loading.Please reload this page.
I'm currently trying to test 4.4-dev and did get over this issue when using FosRestBundle.
I also created afixthere but think this should not break in 4.4.
The old FlattenException did implement a
createfunction.