Skip to content

Update ReturnTypeWillChange intro for clarity#5614

Merged
kamil-tekiela merged 10 commits into
php:masterfrom
mmalferov:patch-4
Jul 24, 2026
Merged

Update ReturnTypeWillChange intro for clarity#5614
kamil-tekiela merged 10 commits into
php:masterfrom
mmalferov:patch-4

Conversation

@mmalferov

@mmalferov mmalferov commented Jun 15, 2026

Copy link
Copy Markdown
Member

I know I'm revisiting this topic so soon, but the clarity of the current phrasing leaves a lot to be desired. What if we structure and present the page the way this PR suggests?

@mmalferov mmalferov changed the title returntypewillchange.xml Update ReturnTypeWillChange intro for clarity Update ReturnTypeWillChange intro for clarity Jun 17, 2026
Comment thread language/predefined/attributes/returntypewillchange.xml Outdated
Comment thread language/predefined/attributes/returntypewillchange.xml Outdated
Comment on lines +22 to +24
Return type compatibility checks for internal class extensions remain in a soft mode
until a future PHP version enforces strict checking.
At that point, mismatches will cause a fatal error instead of a deprecation notice.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's not very clear what the soft mode is. I assume it means that a deprecation is thrown instead of the fatal error, but that's what the paragraph above says. So is this paragraph entirely redundant?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You're right, the paragraph looks overloaded, but at the same time, we must warn the reader that in a future version of PHP, the signature compatibility check will become strict. I have fixed the "lame" paragraph. Please check if everything is in order now

mmalferov and others added 2 commits July 24, 2026 23:46
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
@kamil-tekiela
kamil-tekiela merged commit 52e8875 into php:master Jul 24, 2026
1 of 2 checks passed
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.

3 participants