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

[Messenger] Fix JSON deserialization of ErrorDetailsStamp and normalization of FlattenException::$statusText#39004

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

Conversation

@Jean85
Copy link
Contributor

@Jean85Jean85 commentedNov 5, 2020
edited
Loading

QA
Branch?5.x (bugfix of a 5.x-only feature)
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#39003
LicenseMIT

WIP This is now complete and, thanks to@yceruto, I've fixed two bugs in this PR:

  • ErrorDetailsStamp couldn't be (de)serialized properly with that constructor argument
  • FlattenException::$statusText wasn't (de)normalized

@Jean85
Copy link
ContributorAuthor

@Nyholm you said in#38792 (comment) that we don't useFlattenException anymore, but it's still present inside theErrorDetailsStamp, and it still doesn't deserialize well, as the current test failure highlights:

Failed asserting that two objects are equal.--- Expected+++ Actual@@ @@         'message' => 'exception message'         'code' => 0         'previous' => null-        'trace' => Array (...)-        'traceAsString' => '#0 /home/alai/workspace/OSS/s...{main}'+        'trace' => null+        'traceAsString' => null         'class' => 'Exception'         'statusCode' => 500         'statusText' => 'Internal Server Error'@@ @@         'headers' => Array ()         'file' => '/home/alai/workspace/OSS/symf...st.php'         'line' => 52-        'asString' => null+        'asString' => 'Exception: exception message ...{main}'     ) )

What should I do?

@jderussejderusse added this to the5.2 milestoneNov 5, 2020
@Nyholm
Copy link
Member

@yceruto could you have a look at this PR please?

@yceruto
Copy link
Member

There is aFlattenExceptionNormalizer to serialize/deserialize it correctly, and alternatively you could usePropertyNormalizer too.

Did you find a new problem after this fix#38941?

@Jean85Jean85 marked this pull request as ready for reviewNovember 9, 2020 07:59
@Jean85Jean85 requested a review fromsroze as acode ownerNovember 9, 2020 07:59
@Jean85Jean85 changed the title[Messenger] Fix JSON deserialization of ErrorDetailsStamp[Messenger] Fix JSON deserialization of ErrorDetailsStamp and normalization of FlattenException::$statusTextNov 9, 2020
@Jean85Jean85 requested a review fromycerutoNovember 9, 2020 08:07
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.

Tests are still failing, please take a look. Thanks!

*/
publicfunction__construct(
string$exceptionClass,
$exceptionCode,
Copy link
Member

Choose a reason for hiding this comment

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

int?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

It was documented asint|mixed, probably for the same reason asvimeo/psalm#3175

@carsonbotcarsonbot changed the title[Messenger] Fix JSON deserialization of ErrorDetailsStamp and normalization of FlattenException::$statusText[Messenger] Fix JSON deserialization of ErrorDetailsStamp and normalization of FlattenException::$statusTextNov 9, 2020
@Jean85Jean85 requested a review fromycerutoNovember 9, 2020 15:36
@carsonbotcarsonbot changed the title[Messenger] Fix JSON deserialization of ErrorDetailsStamp and normalization of FlattenException::$statusText[Messenger] Fix JSON deserialization of ErrorDetailsStamp and normalization of FlattenException::$statusTextNov 9, 2020
@carsonbotcarsonbot changed the title[Messenger] Fix JSON deserialization of ErrorDetailsStamp and normalization of FlattenException::$statusText[Messenger] Fix JSON deserialization of ErrorDetailsStamp and normalization of FlattenException::$statusTextNov 9, 2020
@fabpotfabpotforce-pushed thefix-error-details-stamp-serialization branch fromb5f9889 to9af554cCompareNovember 10, 2020 06:17
@fabpot
Copy link
Member

Thank you@Jean85.

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

Reviewers

@NyholmNyholmNyholm left review comments

@ycerutoycerutoyceruto approved these changes

@srozesrozeAwaiting requested review from sroze

Assignees

No one assigned

Projects

None yet

Milestone

5.2

Development

Successfully merging this pull request may close these issues.

[Messenger | ErrorHandler] JSON serialization + ErrorDetailsStamp doesn't seem to deserialize correctly

6 participants

@Jean85@Nyholm@yceruto@fabpot@jderusse@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp