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

[Debug][BC Break] Fixed deserialization of FlattenException by the Serializer component#33630

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

@skalpa
Copy link
Contributor

QA
Branch?3.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#32719
LicenseMIT

As spotted in#32719, the Serializer component is unable to deserialize someFlattenException instances, which breaks the messenger component when used with the symfony serializer.

While this can't be fixed inFlattenException without breaking BC, as the main/sole purpose of this class is to be serialization friendly, I thought it was a real issue.

Also, it should only break classes that extendFlattenException and I couldn't find a single project on Github that does this, nor imagine why anyone would want to (actually, I believe this class should have been marked final).

Here are all the issues I identified, and how they are fixed by this PR:

  • getHeaders can returnnull orarray, butsetHeaders had anarray type-hint: I removed the type hint
  • getPrevious can returnnull orself, butsetPrevious had aself type-hint: I removed the type-hint
  • setTrace required 3 arguments, and added a new frame to the trace: the file and line arguments are now optional, and I try to detect whether the passed trace has already been processed or not. This may not be the best thing to do IMHO, but an attempt to limit the BC break to subclasses and ensure usage of the class doesn't get broken.

Note: The same issues affect theFlattenException class of the new ErrorRenderer component, but I will submit an new issue to discuss the best solution here, as I would also like to discuss#32873 and propose an alternate solution to#32473.

@skalpa
Copy link
ContributorAuthor

As I don't like the BC, even though you could consider it fixes an important problem in the class, I tried to find other fixes for#32719 (comment).

If one of them seems more acceptable, I'll just close this and work on the alternate solution.

@skalpa
Copy link
ContributorAuthor

As I found a better solution that maintains BC to the linked issue, I'm closing this.
I'll work on a new PR ASAP.

xabbuh and krewetka reacted with thumbs up emoji

@skalpaskalpa closed thisSep 19, 2019
@skalpaskalpa deleted the fix-serialize-debug-flatten branchSeptember 19, 2019 01:18
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@skalpa@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp