Skip to content

Conversation

@yoeunes
Copy link
Contributor

@yoeunes yoeunes commented Nov 14, 2025

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

This PR fixes an inconsistency between isWritable and getWriteInfo in the ReflectionExtractor.

isWritable() correctly found mutators for snake_case properties because it had a fallback mechanism:

  1. Check for setSnakeProperty
  2. If not found, check for setSnake_method

The getWriteInfo() method only checked for the camelCase version (setSnakeProperty)

This caused isWritable(..., 'snake_method') to return true, while getWriteInfo(..., 'snake_method') would incorrectly return TYPE_NONE.

@yoeunes yoeunes requested a review from dunglas as a code owner November 14, 2025 10:55
@carsonbot carsonbot added this to the 6.4 milestone Nov 14, 2025
@yoeunes yoeunes force-pushed the fix-reflection-writeinfo-fallback branch 2 times, most recently from 7a4dc98 to efd0979 Compare November 14, 2025 11:44
@yoeunes yoeunes force-pushed the fix-reflection-writeinfo-fallback branch from efd0979 to 340d3f9 Compare November 14, 2025 11:58
@nicolas-grekas
Copy link
Member

Thank you @yoeunes.

@nicolas-grekas nicolas-grekas merged commit e642384 into symfony:6.4 Dec 10, 2025
11 checks passed
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