Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Messenger] Add FlattenException Normalizer#37087
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
monteiro commentedJun 3, 2020
I still need to test well the priority, because it works on my symfony 5.0 (without it), but I want to try it on Symfony 4.4 to see if I have the same behavior. |
ro0NL left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
API platform normalizes FlattenException at a very low prio, is it an issue?
src/Symfony/Component/Serializer/Normalizer/FlattenExceptionNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/FlattenExceptionNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/FlattenExceptionNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/FlattenExceptionNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Tests/Normalizer/FlattenExceptionNormalizerTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
monteiro commentedJun 4, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I have 2 unit tests failing: @nicolas-grekas Maybe you can help me with this. I know that on theFlattenException Unit tests you never use the constructor without arguments. You did the change in thepast adding typehints to the FlattenException class methods, which makes total sense when you are creating this exception from throwable. But what can we do in this specific case? Should I still use the empty constructorhere or should I use reflection? If I use it, makes sense to test the empty constructor but since they have different type hints from the getters (Example: message is null in the empty constructor, but getMessage() has a string typehint) the test fails. Or should I follow the FlattenException unit tests and remove the empty constructor test? Note: This does not happen in this specific feature, because the normalizer does not call any getter without a full FlattenException. |
459b375 toa5aae27Comparea5aae27 to6c1b966Comparesrc/Symfony/Component/Serializer/Normalizer/FlattenExceptionNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/FlattenExceptionNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/FlattenExceptionNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/FlattenExceptionNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/FlattenExceptionNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/FlattenExceptionNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/FlattenExceptionNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/FlattenExceptionNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/FlattenExceptionNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/FlattenExceptionNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
6c1b966 to0981943Comparesrc/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
fabpot left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I understand the reasoning. That works for me.
src/Symfony/Component/Messenger/Transport/Serialization/Serializer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Resources/config/messenger.xml OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
c39cb1b toc528a31Comparesrc/Symfony/Component/Serializer/Normalizer/FlattenExceptionNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Tests/Normalizer/FlattenExceptionNormalizerTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
fabpot commentedAug 21, 2020
Tests need to be updated to pass. |
monteiro commentedAug 22, 2020
@fabpot I have updated the tests but some Travis tests are failing with the error that the FlattenExceptionNormalizer class does not exist (FrameworkBundle is fetching v5.0 in Travis). I suppose that will only be green when we merge this or am I missing something? |
fabpot left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Tests are broken because of the constraints in composer.json. I will fix it while merging.
c91b71a to78fbd0aComparefabpot commentedAug 23, 2020
Thank you@monteiro. |
Uh oh!
There was an error while loading.Please reload this page.
I have just duplicated the PR#33650 (from@skalpa) but using the new component ErrorHandler and removing the priority.
Project that reproduces the bug on Symfony 5.2:https://github.com/monteiro/serializer-pr37087 (all steps are on the README).
Since this adds a new class and changes behavior, we add this new feature on the 5.2 branch.