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

[ErrorRenderer] Add alias to FlattenException to avoid BC break#32873

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

Merged
fabpot merged 1 commit intosymfony:4.4fromyceruto:flatten_exception_alias
Aug 5, 2019

Conversation

@yceruto
Copy link
Member

@ycerutoyceruto commentedAug 1, 2019
edited
Loading

QA
Branch?4.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#32473
LicenseMIT
Doc PR-

Devristo reacted with thumbs up emoji
@yceruto
Copy link
MemberAuthor

yceruto commentedAug 1, 2019
edited
Loading

I wonder if should we create an alias for each exception class in the ErrorHandler component?

/cc@Tobion@nicolas-grekas

@nicolas-grekas
Copy link
Member

this won't solve the linked issue, as the alias will never be loaded...
the only way is to create the alias when loading the new class
so we could add the file you have here at the end of the real one

@ycerutoycerutoforce-pushed theflatten_exception_alias branch from948f32e to4f071dfCompareAugust 1, 2019 20:16
@yceruto
Copy link
MemberAuthor

yceruto commentedAug 1, 2019
edited
Loading

this won't solve the linked issue, as the alias will never be loaded...
the only way is to create the alias when loading the new class
so we could add the file you have here at the end of the real one

That's the case when we (the HttpKernel or ErrorRenderer component) throws the new exception, but shouldn't we also cover the case when someone is throwning the old one? The lastest changes cover both cases.

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

(we should do this only for a very limited subset of the classes in Debug - this one only maybe?)

@ycerutoycerutoforce-pushed theflatten_exception_alias branch from4f071df to7b11821CompareAugust 1, 2019 20:40
@ycerutoycerutoforce-pushed theflatten_exception_alias branch from5445a1d to44b0e7dCompareAugust 1, 2019 21:59
@yceruto
Copy link
MemberAuthor

Done!
Thank you Nicolas :)

class_alias(\Symfony\Component\ErrorRenderer\Exception\FlattenException::class, FlattenException::class);
}

if (false) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the purpose of "if (false)" this case?

@fabpot
Copy link
Member

Thank you@yceruto.

@fabpotfabpot merged commit44b0e7d intosymfony:4.4Aug 5, 2019
fabpot added a commit that referenced this pull requestAug 5, 2019
…break (yceruto)This PR was merged into the 4.4 branch.Discussion----------[ErrorRenderer] Add alias to FlattenException to avoid BC break| Q             | A| ------------- | ---| Branch?       | 4.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#32473| License       | MIT| Doc PR        | -Commits-------44b0e7d Created alias to FlattenException to avoid BC break
@ycerutoyceruto deleted the flatten_exception_alias branchAugust 5, 2019 11:52
@nicolas-grekasnicolas-grekas modified the milestones:next,4.4Oct 27, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

+1 more reviewer

@seriquynhseriquynhseriquynh left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

5 participants

@yceruto@nicolas-grekas@fabpot@seriquynh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp