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

Closed

Conversation

@alexander-schranz
Copy link
Contributor

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix #...
LicenseMIT
Doc PR

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.

Copy link
Member

@ycerutoyceruto left a 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.

#32873 (comment)

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

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

'exception' => FlattenException::createFromThrowable($exception),

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

alexander-schranz commentedOct 9, 2019
edited
Loading

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

Want to move this discussion to an issue:#33929

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

Reviewers

@ycerutoycerutoyceruto requested changes

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

4 participants

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

[8]ページ先頭

©2009-2025 Movatter.jp