Skip to content

Conversation

@yoeunes
Copy link
Contributor

@yoeunes yoeunes commented Nov 23, 2025

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

In CheckTypeDeclarationsPass, the loop counter $i was incorrectly overwritten with the parameter name when processing named arguments.

Comparing a string to an integer here (e.g. 'b' < 2) evaluates to false. This caused the loop to terminate early, skipping type validation for all subsequent arguments.

@carsonbot carsonbot added this to the 6.4 milestone Nov 23, 2025
@OskarStark OskarStark changed the title [DependencyInjection] Fix loop corruption in CheckTypeDeclarationsPass [DependencyInjection] Fix loop corruption in CheckTypeDeclarationsPass Nov 23, 2025
@yoeunes yoeunes force-pushed the di-fix-check-type-declarations-loop branch from 4810638 to 3866ff1 Compare November 23, 2025 11:33
@nicolas-grekas
Copy link
Member

Thank you @yoeunes.

@nicolas-grekas nicolas-grekas merged commit 20103a8 into symfony:6.4 Nov 24, 2025
11 checks passed
@fabpot fabpot mentioned this pull request Nov 27, 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