Skip to content

[Serializer] GetSetNormalizer shouldn't set/get static methods #16454

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

Merged
merged 1 commit into from
Nov 5, 2015

Conversation

boekkooi
Copy link
Contributor

@boekkooi boekkooi commented Nov 4, 2015

Q A
Bug fix? yes
New feature? no
BC breaks? maybe
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

This PR fixes setting static getters and setters when serializing.
This is strictly speaking a BC break but in my opinion a needed one because the current behavior is unexpected.

@dunglas
Copy link
Member

dunglas commented Nov 4, 2015

👍

It's why it would be nice to optimize performance of PropertyAccess component: it will allow to deprecate all normalizers except ObjectNormalizer and ultimately ease maintenance.

@boekkooi
Copy link
Contributor Author

boekkooi commented Nov 5, 2015

@dunglas I'm not sure I agree with that since PropertyNormalizer and GetSetNormalizer are more limited in scope then ProperyAccess and sometimes that's exactly what I want 😄
It would be nice to have some sort of ReflectionCache that could be provided to a Normalizer to avoid recreating instances.

@boekkooi
Copy link
Contributor Author

boekkooi commented Nov 5, 2015

Status: Reviewed

@dunglas
Copy link
Member

dunglas commented Nov 5, 2015

I've introduced this cache system in the PropertyAccess component. It's why having a single normalizer relying on this component can enhance global performance and ease the maintenance.

@fabpot
Copy link
Member

fabpot commented Nov 5, 2015

Thank you @boekkooi.

@fabpot fabpot merged commit d8d4405 into symfony:2.7 Nov 5, 2015
fabpot added a commit that referenced this pull request Nov 5, 2015
…hods (boekkooi)

This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] GetSetNormalizer shouldn't set/get static methods

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | maybe
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This PR fixes setting static getters and setters when serializing.
This is strictly speaking a BC break but in my opinion a needed one because the current behavior is unexpected.

Commits
-------

d8d4405 [Serializer] GetSetNormalizer shouldn't set/get static methods
@fabpot fabpot mentioned this pull request Nov 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants