Skip to content

returntypewillchange.xml Add warning about future strict return type enforcement#5613

Open
mmalferov wants to merge 1 commit into
php:masterfrom
mmalferov:patch-4
Open

returntypewillchange.xml Add warning about future strict return type enforcement#5613
mmalferov wants to merge 1 commit into
php:masterfrom
mmalferov:patch-4

Conversation

@mmalferov

@mmalferov mmalferov commented Jun 14, 2026

Copy link
Copy Markdown
Member

Should we not explicitly mention that internal methods will strictly enforce return types in future PHP versions?

Currently, the documentation might give developers a false sense of security, making it look like #[ReturnTypeWillChange] is a permanent fix. In reality, it only works during the tentative phase. Once PHP 9.0 drops, any remaining signature mismatches in child classes will cause a fatal error, as far as I understand.

P. S. The checks did not pass in the previous PR. And something went wrong with rebase. So I created a new Pull Request, and closed the old one:

#5608

But even now the check doesn 't work 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant