Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed

Conversation

@alexander-schranz
Copy link
Contributor

@alexander-schranzalexander-schranz commentedOct 8, 2019
edited
Loading

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
Tickets-
LicenseMIT
Doc PRsymfony/symfony-docs#...

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 acreate function.

Copy link
Member

@ycerutoyceruto left a comment
edited
Loading

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
Copy link
ContributorAuthor

@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.

@nicolas-grekasnicolas-grekas added this to thenext milestoneOct 9, 2019
returnstatic::createFromThrowable($exception,$statusCode,$headers);
}

publicstaticfunctioncreateFromThrowable(\Throwable$exception,int$statusCode =null,array$headers = []):self

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

Copy link
ContributorAuthor

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
Copy link
Member

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 aif in FOSRestBundle. So I'm -1 on this PR.

@alexander-schranz
Copy link
ContributorAuthor

@stoff its not about migrating from one to another its a bc break which break current projects but want to move the discussion to an issue#33929 as there is a related#33918 which I think can be fixed by changing where the new FlattenException extend.

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

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@ycerutoycerutoyceruto requested changes

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

5 participants

@alexander-schranz@stof@nicolas-grekas@yceruto@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp