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

[Serializer] Remove AbstractObjectNormalizer::isAttributeToNormalize #20530

Closed
wants to merge 2 commits into
base: 3.1
from

Conversation

Projects
None yet
6 participants
@dunglas
Member

dunglas commented Nov 15, 2016

Q A
Branch? 3.1
Bug fix? yes
New feature? no
BC breaks? unclear
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

I've introduced this method by error in #17113. It has been forgotten during a refactoring. It has always been unused, is not covered by our test suite and has never been documented.

Technically it's a BC break (because this is a protected method), but I think that it's better to remove it has it has never be intended to be used, it's just a miss. An alternative is to deprecate it and remove it in v4.

@fabpot

This comment has been minimized.

Member

fabpot commented Nov 15, 2016

👍 to remove it as done by this PR.

@xabbuh

This comment has been minimized.

Member

xabbuh commented Nov 16, 2016

I would vote for deprecating the method to prevent unexpected BC breaks for users of this class.

@fabpot

This comment has been minimized.

Member

fabpot commented Nov 16, 2016

@xabbuh Is it really worth it?

@xabbuh

This comment has been minimized.

Member

xabbuh commented Nov 16, 2016

Judging by the name of the method and given the fact that people will use the AbstractObjectNormalizer as the base class for their own normalizers, I fear that there will be users out there who call this method before doing actual normalisation work which would then break.

@fabpot

This comment has been minimized.

Member

fabpot commented Nov 16, 2016

Ok, fair enough. Let's add a deprecation notice then.

@dunglas

This comment has been minimized.

Member

dunglas commented Nov 16, 2016

After a quick search, I wasn't able to find any public project using this method. Regarding the fact that it was introduced in 3.1 (only 6 months ago) and is useless, I really doubt than anybody has used it.

@ro0NL

This comment has been minimized.

Contributor

ro0NL commented Nov 16, 2016

Maybe add a changelog upgrade note about the silent removal of this method. As it was forgotten before...

Imo. we can totally be pragmatic on left-over code from one minor to another. But it should be documented.

@nicolas-grekas

This comment has been minimized.

Member

nicolas-grekas commented Nov 23, 2016

👍 on my side for an UPGRADE entry and no deprecation.

dunglas added some commits Nov 15, 2016

@nicolas-grekas nicolas-grekas added this to the 3.1 milestone Dec 6, 2016

@nicolas-grekas

This comment has been minimized.

Member

nicolas-grekas commented Dec 8, 2016

Thank you @dunglas.

nicolas-grekas added a commit that referenced this pull request Dec 8, 2016

bug #20530 [Serializer] Remove AbstractObjectNormalizer::isAttributeT…
…oNormalize (dunglas)

This PR was squashed before being merged into the 3.1 branch (closes #20530).

Discussion
----------

[Serializer] Remove AbstractObjectNormalizer::isAttributeToNormalize

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | unclear
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

I've introduced this method by error in #17113. It has been forgotten during a refactoring. It has always been unused, is not covered by our test suite and has never been documented.

Technically it's a BC break (because this is a protected method), but I think that it's better to remove it has it has never be intended to be used, it's just a miss. An alternative is to deprecate it and remove it in v4.

Commits
-------

fea18aa [Serializer] Remove AbstractObjectNormalizer::isAttributeToNormalize

This was referenced Dec 13, 2016

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