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

Stubs and generated arginfo: remove tentative returns from final methods #16213

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

DanielEScherzer
Copy link
Contributor

A tentative return type is used to allow userland code that overrides a method to not include a typehint without a fatal error; this is inapplicable to final methods (including all methods of final classes), which cannot be overridden. Remove the tentative return declarations, and update the build script to complain about future additions.

A tentative return type is used to allow userland code that overrides a method
to not include a typehint without a fatal error; this is inapplicable to final
methods (including all methods of final classes), which cannot be overridden.
Remove the tentative return declarations, and update the build script to
complain about future additions.
Copy link
Member

@kocsismate kocsismate left a comment

Choose a reason for hiding this comment

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

Nice catch, thanks!

@kocsismate kocsismate merged commit 2501cad into php:master Oct 4, 2024
10 checks passed
@DanielEScherzer DanielEScherzer deleted the final-tentative branch October 4, 2024 20:02
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.

2 participants