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

[Serializer] PropertyNormalizer doesn't support DiscriminatorMap#36695

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

agven
Copy link

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

KonstantinCodes, Guuzen, and robertvansteen reacted with thumbs up emoji
@agvenagven requested a review fromdunglas as acode ownerMay 5, 2020 08:51
@agvenagvenforce-pushed theserializer_property_normalizer branch froma5e2916 to3434775CompareMay 5, 2020 09:04
@nicolas-grekasnicolas-grekas added this to the4.4 milestoneMay 5, 2020
@agvenagvenforce-pushed theserializer_property_normalizer branch 3 times, most recently from0bafcf0 to25e9d9fCompareMay 5, 2020 13:07
@agven
Copy link
Author

@dunglas what do you think ?

@agven
Copy link
Author

@dunglas,@nicolas-grekas please take a look and answer the question what do I need to do in order to make my pull request acceptable ?

@@ -412,11 +412,6 @@ public function testNoTraversableSupport()
$this->assertFalse($this->normalizer->supportsNormalization(new \ArrayObject()));
}

public function testNoStaticPropertySupport()
Copy link
Member

Choose a reason for hiding this comment

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

Tests must not be removed, and they must pass to prevent BC breaks.

Copy link
Author

@agvenagvenMay 30, 2020
edited
Loading

Choose a reason for hiding this comment

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

I deleted this test because there isn't reason to leave it. If you have another opinion, please give explanation. What does wrong if class contains static properties ? (not in general) I mean in serialization context.

Also I would like to tell you that this PR contains BC, because we need to fix base normalizer class. Why we need to do it - please see description ofticket #36585

}

return $attribute === $this->discriminatorCache[$cacheKey] ? $this->classDiscriminatorResolver->getTypeForMappedObject($object) : $this->propertyAccessor->getValue($object, $attribute);
return $this->propertyAccessor->getValue($object, $attribute);
Copy link
Member

Choose a reason for hiding this comment

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

This looks like a BC break.

Copy link
Author

@agvenagvenMay 20, 2020
edited
Loading

Choose a reason for hiding this comment

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

Sorry, could you explain Why does backward compatibility break ?

Copy link
Author

Choose a reason for hiding this comment

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

@dunglas do you have any update on this for me ?

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

@dunglas ,@nicolas-grekas Let's try to make a decision. What will we do next ?
There are two options:

  1. We will fix this issue together. It means that I am waiting your propose how we fix it because my propose contains into this PR.
  2. I'll close this issue and bug because of "looks like a BC break"

Copy link
Member

Choose a reason for hiding this comment

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

The changes done in this PR look like a new feature according to our definition, so this should target 5.4, where we can handle the BC break is possible.

@agvenagvenforce-pushed theserializer_property_normalizer branch 6 times, most recently from1abf867 tof17fcf5CompareMay 30, 2020 08:26
@agvenagvenforce-pushed theserializer_property_normalizer branch fromf17fcf5 to2b070b2CompareJuly 15, 2020 06:58
@fabpotfabpot modified the milestones:4.4,5.4Aug 26, 2021
@fabpotfabpot modified the milestones:5.4,6.1Nov 16, 2021
@fabpotfabpot modified the milestones:6.1,6.2May 20, 2022
@nicolas-grekasnicolas-grekas modified the milestones:6.2,6.3Nov 5, 2022
@nicolas-grekasnicolas-grekas modified the milestones:6.3,6.4May 23, 2023
@imba28
Copy link

Since this pull requests seems to have been stale for a while: Are there any plans to fix#36585?

@nicolas-grekas
Copy link
Member

Replaced by#52681

nicolas-grekas added a commit that referenced this pull requestNov 24, 2023
…ormalizer (mtarld)This PR was merged into the 5.4 branch.Discussion----------[Serializer] Fix support for DiscriminatorMap in PropertyNormalizer| Q             | A| ------------- | ---| Branch?       | 5.4| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Issues        |Fix#36585| License       | MITFollow up of#36695Commits-------50d086c [Serializer] Move discrimination to abstract
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot left review comments

@dunglasdunglasdunglas requested changes

Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

6 participants
@agven@imba28@nicolas-grekas@fabpot@dunglas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp