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] BC break on isers following #54148 #54488

Closed
ninsuo opened this issue Apr 4, 2024 · 2 comments
Closed

[Serializer] BC break on isers following #54148 #54488

ninsuo opened this issue Apr 4, 2024 · 2 comments

Comments

@ninsuo
Copy link

ninsuo commented Apr 4, 2024

Symfony version(s) affected

6.4.6

Description

The following PR fixes a bug, but changes how isers are serialized: https://github.com/symfony/symfony/pull/54148/files

  • In 6.4.4, a property named $isSomething is serialized something

  • In 6.4.6, that property is now serialized: isSomething

Even though previous behaviour was a bug, it is there since years and needs the right migration on our codebase. I'd advise that such a backward compatibility break could be updated on the next major upgrade.

How to reproduce

    private bool $isAdmin = false;

    public function isAdmin(): bool
    {
        return $this->isAdmin;
    }

    public function setIsAdmin(bool $isAdmin): self
    {
        $this->isAdmin = $isAdmin;

        return $this;
    }

Possible Solution

No response

Additional Context

No response

@ninsuo ninsuo added the Bug label Apr 4, 2024
@ninsuo ninsuo changed the title [Serializer] BC break following #54148 [Serializer] BC break on isers following #54148 Apr 5, 2024
@mtarld
Copy link
Contributor

mtarld commented Apr 13, 2024

Indeed, I think that #54148 should be reverted and merged in 7.2 instead.

@henrythethird
Copy link

henrythethird commented Apr 16, 2024

The 5.4.38 Version is affected as well. 5.4.36 was not yet affected (we rolled back to that one)

This introduces a backward compatibility issue. Wouldn't this be a breaking change to the serializer component?

Our current workaround (maybe useful for someone):

    "extra": {
        "symfony": {
            "require": "5.4.*,!=5.4.38"
        }
    }

NeilPeyssard added a commit to NeilPeyssard/symfony that referenced this issue Apr 17, 2024
nicolas-grekas added a commit that referenced this issue Apr 17, 2024
… has the same name as their accessor" - it was a BC Break (NeilPeyssard)

This PR was merged into the 5.4 branch.

Discussion
----------

[Serializer] Revert "Fix object normalizer when properties has the same name as their accessor" - it was a BC Break

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Fix #54488
| License       | MIT

Revert changes from this PR #54148 (BC Break).

Commits
-------

f6b4c65 [Serializer] Revert #54488 to fix BC Break
nicolas-grekas added a commit that referenced this issue Apr 17, 2024
* 5.4:
  [Messenger] Fix reading pending messages with Redis
  [Serializer] Revert #54488 to fix BC Break
  [Validator] reviewed Polish translation for unit 113
  [Validator] Missing translations for Croatian (hr)
  review and fix hungarian validation message
  Update translation
  review uk translations v2
  [Validator] Update message translations for unit 113 (TLD)
  [Intl] Remove resources data from classmap generation
nicolas-grekas added a commit that referenced this issue Apr 17, 2024
* 6.4:
  [Cache] Fix test failure related to Redis6Proxy on appveyor
  [Messenger] Fix reading pending messages with Redis
  [Serializer] Revert #54488 to fix BC Break
  [Validator] reviewed Polish translation for unit 113
  [Validator] Missing translations for Croatian (hr)
  Add hint which version of Symfony not longer require proxy manager bridge
  review and fix hungarian validation message
  Update translation
  review uk translations v2
  [Validator] Update message translations for unit 113 (TLD)
  [Intl] Remove resources data from classmap generation
nicolas-grekas added a commit that referenced this issue Apr 17, 2024
* 7.0:
  [Cache] Fix test failure related to Redis6Proxy on appveyor
  [Messenger] Fix reading pending messages with Redis
  [Serializer] Revert #54488 to fix BC Break
  [Validator] reviewed Polish translation for unit 113
  [Validator] Missing translations for Croatian (hr)
  Add hint which version of Symfony not longer require proxy manager bridge
  review and fix hungarian validation message
  Update translation
  review uk translations v2
  [Validator] Update message translations for unit 113 (TLD)
  [Intl] Remove resources data from classmap generation
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

5 participants