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

When dumping a ServiceClosureArgument wrapping a nullable TypedReference (e.g. ?Foo), PhpDumper generates an invalid return type hint: : \?Foo.

This occurs because the dumper prepends \ to the type string to ensure it is fully qualified.

@carsonbot carsonbot added this to the 6.4 milestone Nov 23, 2025
@OskarStark OskarStark changed the title [DependencyInjection] Fix invalid PHP syntax for nullable TypedReference in PhpDumper [DependencyInjection] Fix invalid PHP syntax for nullable TypedReference in PhpDumper Nov 23, 2025
@nicolas-grekas
Copy link
Member

Good catch, thanks @yoeunes.

@nicolas-grekas nicolas-grekas merged commit 8af1cb8 into symfony:6.4 Nov 24, 2025
10 of 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.

3 participants