Skip to content

[Serializer] BC break introduced in MetadataAwareNameConverter #58294

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

Closed
aurimasrim opened this issue Sep 17, 2024 · 0 comments
Closed

[Serializer] BC break introduced in MetadataAwareNameConverter #58294

aurimasrim opened this issue Sep 17, 2024 · 0 comments

Comments

@aurimasrim
Copy link
Contributor

Symfony version(s) affected

7.1

Description

We were trying to update the Symfony version to 7.1 and noticed that name converting isn't working correctly for us.
We found out that the issue was caused by the removal of the interface AdvancedNameConverterInterface in MetadataAwareNameConverter here.
As I understand, removing interface implementation from a class is a breaking change and shouldn't be introduced in a minor version.
image

Generally, it wouldn't cause problems, but for us it did because we are decorating NameConverterInterface and we were explicitly checking $this->decoratedNameConverter instanceof AdvancedNameConverterInterface

How to reproduce

N/A

Possible Solution

Add AdvancedNameConverterInterface back to MetadataAwareNameConverter

Additional Context

No response

@aurimasrim aurimasrim added the Bug label Sep 17, 2024
nicolas-grekas added a commit that referenced this issue Sep 24, 2024
…ataAwareNameConverter (aurimasrimkusnfq, aurimasrim)

This PR was merged into the 7.1 branch.

Discussion
----------

[Serializer] Readd AdvancedNameConverterInterface to MetadataAwareNameConverter

[Serializer] Readd AdvancedNameConverterInterface to MetadataAwareNameConverter

| Q             | A
| ------------- | ---
| Branch?       | 7.1 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Issues        | Fix #58294  <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->
| License       | MIT

Fixes BC break introduced in a minor version 7.1
<!--
Replace this notice by a description of your feature/bugfix.
This will help reviewers and should be a good start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the latest branch.
 - For new features, provide some code snippets to help understand usage.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
 - Never break backward compatibility (see https://symfony.com/bc).
-->

Commits
-------

cd85382 [Serializer] Readd AdvancedNameConverterInterface to MetadataAwareNameConverter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants