Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Serializer] Normalize static methods when they have groups#63279

Merged
nicolas-grekas merged 1 commit into
symfony:6.4from
digilist:fix_normalizing_static_methods
Feb 5, 2026
Merged

[Serializer] Normalize static methods when they have groups#63279
nicolas-grekas merged 1 commit into
symfony:6.4from
digilist:fix_normalizing_static_methods

Conversation

@digilist
Copy link
Copy Markdown
Contributor

@digilist digilist commented Feb 5, 2026

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues https://github.com/symfony/symfony/pull/63136/files#r2761176730
License MIT

PR #63136 introduced a regression that stopped normalization of static methods when they had explicit groups defined. Before that changes, static methods with groups were normalized. Afterwards, these static methods are not normalized anymore.

The regression was caused because previously ObjectNormalizer::extractAttributes() ignored static methods while AttributeLoader::loadClassMetadata() did not, and the PR introduced a new getAttributeNameFromAccessor() method that is shared across those two methods. As a result the AttributeLoader::loadClassMetadata() method is now also ignoring static methods.

You can verify this regression by adding the test case from this PR to a commit before the PR was merged (e.g. 1db906a6802c54f8a28f79fbb928d5cb1d5a642c^)

@digilist digilist force-pushed the fix_normalizing_static_methods branch from 2705c36 to 78c509c Compare February 5, 2026 10:54
@nicolas-grekas
Copy link
Copy Markdown
Member

Thank you @digilist.

@nicolas-grekas nicolas-grekas merged commit 580da18 into symfony:6.4 Feb 5, 2026
11 of 12 checks passed
This was referenced Feb 26, 2026
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.

3 participants