-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PropertyAccess][Serializer] Fix "type unknown" on denormalize #52879
[PropertyAccess][Serializer] Fix "type unknown" on denormalize #52879
Conversation
003dbee
to
927f1bd
Compare
src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
Outdated
Show resolved
Hide resolved
Even if it looks like a bug, I have doubts about whether this should go to |
927f1bd
to
810f4dd
Compare
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.
Even if it looks like a bug, I have doubts about whether this should go to 7.1 as an improvement.
I agree with this sentiment. Technically it's a new feature because it adds a new class so let's target 7.1.
810f4dd
to
5eda809
Compare
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.
LGTM, Thank you Farhad!
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.
The low deps failures are related. We need to bump the dev requirement on symfony/property-access
to ^7.1
.
8eb8e6c
to
f345c20
Compare
the |
@xabbuh correct me if I am wrong but these unit tests on HttpKernel component runs with Serializer & ProperyAccess with version 7.1.x-dev, not with the code that are on the PR. That's why they fail. |
@seferov Can you please rebase your changes on the latest |
61acfb1
to
849db42
Compare
In fact, our pipeline is a bit more complex and takes the changes from the PR into account: https://github.com/symfony/symfony/blob/7.1/.github/workflows/unit-tests.yml#L91 |
@xabbuh I see. Btw, only 8.2 (high deps) is failing now. The rest is passing |
@@ -33,7 +33,7 @@ | |||
"symfony/http-kernel": "^6.4|^7.0", | |||
"symfony/messenger": "^6.4|^7.0", | |||
"symfony/mime": "^6.4|^7.0", | |||
"symfony/property-access": "^6.4|^7.0", | |||
"symfony/property-access": "^7.1", |
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 don't think we need the bump here. Let's rather skip the added test when the new exception class does not exist. Otherwise we won't be able to test the Serializer component with the real lowest allowed release of the PropertyAccess component.
34d6030
to
4a665ac
Compare
Thank you @seferov. |
Question, @fabpot set the milestone here for both 6.3 and 7.1, but the merge only happened for 7.1. This inscrutability for the error messages still persists on 6.4.x -- the LTS branch. Could we get an official patch for that? |
This is a new feature and will not be backported to 6.4 and the milestone is set for 7.1 only. |
Thanks for the response even if it's not the one I hoped for. |
The bug can clearly be seen on tests for
RequestPayloadValueResolver
on https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/RequestPayloadValueResolverTest.php#L255Even though
title
is string, the error message shown to user is ambiguous: "This value should be of type unknown.". Instead, the message should be "This value should be of type string."