Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VarExporter] fix ProxyHelper::generateLazyProxy() when a method returns null #54850

Merged
merged 1 commit into from
May 7, 2024

Conversation

nikophil
Copy link
Contributor

@nikophil nikophil commented May 6, 2024

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

When a methods has such a signature:

public function foo(): null

the method ProxyHelper::generateLazyProxy() produces a wrong code:

public function foo(): ?null

This PR fixes this.

@carsonbot carsonbot added this to the 6.4 milestone May 6, 2024
@nikophil nikophil force-pushed the fix/allow-null-return-type branch 2 times, most recently from 6fd1794 to 330dcc7 Compare May 6, 2024 14:51
@nikophil nikophil force-pushed the fix/allow-null-return-type branch from 330dcc7 to aeecd29 Compare May 6, 2024 15:16
@nikophil nikophil force-pushed the fix/allow-null-return-type branch from aeecd29 to 673bb6b Compare May 6, 2024 15:18
@nikophil nikophil force-pushed the fix/allow-null-return-type branch from 673bb6b to 59b3b7a Compare May 7, 2024 07:13
@nicolas-grekas
Copy link
Member

Can you also please update src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php? It has the same issue (two times)

@nikophil nikophil force-pushed the fix/allow-null-return-type branch 2 times, most recently from b3ab90f to 37ba6e7 Compare May 7, 2024 07:47
@nikophil nikophil force-pushed the fix/allow-null-return-type branch from 37ba6e7 to 0067eab Compare May 7, 2024 07:51
@nikophil nikophil force-pushed the fix/allow-null-return-type branch 2 times, most recently from 0842909 to 23c16c6 Compare May 7, 2024 08:05
@nikophil nikophil force-pushed the fix/allow-null-return-type branch from 23c16c6 to dc083fe Compare May 7, 2024 08:56
@fabpot
Copy link
Member

fabpot commented May 7, 2024

Thank you @nikophil.

@fabpot fabpot merged commit 0704e4e into symfony:6.4 May 7, 2024
6 of 10 checks passed
@fabpot fabpot mentioned this pull request May 17, 2024
This was referenced Jun 2, 2024
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.

None yet

5 participants