Skip to content
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 XmlEncoder::TYPE_CASE_ATTRIBUTES constant #33788

Merged
merged 1 commit into from Oct 2, 2019

Conversation

pierredup
Copy link
Contributor

@pierredup pierredup commented Oct 1, 2019

Q A
Branch? master
Bug fix? no
New feature? not really
Deprecations? yes (well, sort of)
Tickets N/A
License MIT
Doc PR N/A

There is a small typo in the XmlEncoder constant. This can only be fixed in the master branch for Symfony 5 as it is a breaking change. I'm not sure if it's possible to deprecate the usage of the old constant name in 4.4? As the constant just resolves to a string, there is no way of determining if someone used the constant or not (a quick search on Github, I can't find any direct usages of the constant outside of this class)

@pierredup pierredup changed the title Rename XmlEncoder::TYPE_CASE_ATTRIBUTES to XmlEncoder::TYPE_CAST_ATTRIBUTES [Serializer] Rename XmlEncoder::TYPE_CASE_ATTRIBUTES to XmlEncoder::TYPE_CAST_ATTRIBUTES Oct 1, 2019
@linaori
Copy link
Contributor

linaori commented Oct 1, 2019

One possibility for 4.4 is to have both constants and mark the old one with @deprecated

@pierredup
Copy link
Contributor Author

Deprecation added in #33789

fabpot added a commit that referenced this pull request Oct 1, 2019
…BUTES constant (pierredup)

This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer] Deprecate the XmlEncoder::TYPE_CASE_ATTRIBUTES constant

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | yes
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A
| Related       | #33788

Deprecate the `XmlEncoder::TYPE_CASE_ATTRIBUTES` constant in favour of `XmlEncoder::TYPE_CAST_ATTRIBUTES`

Commits
-------

9f51cf4 Deprecate the XmlEncoder::TYPE_CASE_ATTRIBUTES constant
@nicolas-grekas nicolas-grekas added this to the 5.0 milestone Oct 2, 2019
@pierredup pierredup changed the title [Serializer] Rename XmlEncoder::TYPE_CASE_ATTRIBUTES to XmlEncoder::TYPE_CAST_ATTRIBUTES [Serializer] Remove XmlEncoder::TYPE_CASE_ATTRIBUTES constant Oct 2, 2019
@nicolas-grekas
Copy link
Member

Thank you @pierredup.

nicolas-grekas added a commit that referenced this pull request Oct 2, 2019
…stant (pierredup)

This PR was merged into the 5.0-dev branch.

Discussion
----------

[Serializer] Remove XmlEncoder::TYPE_CASE_ATTRIBUTES constant

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | not really
| Deprecations? | yes (well, sort of)
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

There is a small typo in the `XmlEncoder` constant. This can only be fixed in the master branch for Symfony 5 as it is a breaking change. I'm not sure if it's possible to deprecate the usage of the old constant name in 4.4? As the constant just resolves to a string, there is no way of determining if someone used the constant or not (a quick search on Github, I can't find any direct usages of the constant outside of this class)

Commits
-------

001d0f1 Remove XmlEncoder::TYPE_CASE_ATTRIBUTES constant
@nicolas-grekas nicolas-grekas merged commit 001d0f1 into symfony:master Oct 2, 2019
@pierredup pierredup deleted the const-name-fix branch October 2, 2019 12:57
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.

None yet

4 participants