Skip to content

Conversation

@yoeunes
Copy link
Contributor

@yoeunes yoeunes commented Nov 7, 2025

Q A
Branch? 6.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Issues Fixes #61425
License MIT

This PR fixes a bug in ReflectionExtractor::camelize where property names consisting only of underscores (e.g., $_) were incorrectly transformed into an empty string.

This caused getReadInfo to fail when finding the corresponding accessor (e.g., get_()), preventing the property from being detected, which impacts serialization and other component usages.

@yoeunes yoeunes requested a review from dunglas as a code owner November 7, 2025 04:00
@carsonbot carsonbot added this to the 6.4 milestone Nov 7, 2025
@yoeunes yoeunes force-pushed the propertyinfo-underscore-camelize branch from 901781e to 34605d0 Compare November 7, 2025 04:09
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove most/all comments, unless they really provide value

@yoeunes yoeunes force-pushed the propertyinfo-underscore-camelize branch 3 times, most recently from cf5fa78 to f98b0ed Compare November 12, 2025 13:44
@OskarStark OskarStark changed the title [PropertyInfo] Fix ReflectionExtractor handling of underscore-only property names [PropertyInfo] Fix ReflectionExtractor handling of underscore-only property names Nov 12, 2025
@yoeunes yoeunes force-pushed the propertyinfo-underscore-camelize branch from f98b0ed to 1a877f4 Compare November 12, 2025 13:47
@nicolas-grekas
Copy link
Member

Thank you @yoeunes.

@nicolas-grekas nicolas-grekas merged commit 979e7bf into symfony:6.4 Nov 12, 2025
11 checks passed
nicolas-grekas added a commit that referenced this pull request Nov 13, 2025
…p since PHP 8.1 (xabbuh)

This PR was merged into the 6.4 branch.

Discussion
----------

[PropertyInfo] ReflectionMethod::setAccessible() is no-op since PHP 8.1

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        |
| License       | MIT

added in #62334, this allows to entirely remove it after merging into `7.3` like we did everywhere else

Commits
-------

ef9e803 ReflectionMethod::setAccessible() is no-op since PHP 8.1
This was referenced Nov 13, 2025
This was referenced Dec 7, 2025
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.

4 participants