Skip to content

Exempt adding Type and Value Errors from BC break policy#27

Merged
TimWolla merged 5 commits intophp:mainfrom
Girgias:bc-type-value-exempt
Apr 5, 2026
Merged

Exempt adding Type and Value Errors from BC break policy#27
TimWolla merged 5 commits intophp:mainfrom
Girgias:bc-type-value-exempt

Conversation

@Girgias
Copy link
Copy Markdown
Member

@Girgias Girgias commented Feb 17, 2026

Girgias and others added 3 commits March 18, 2026 12:08
Co-authored-by: Theodore Brown <theodorejb@outlook.com>

- Adding TypeError and ValueError exceptions to validate inputs to functions
and methods. These are not classified as BC breaks because not adding them
allows incorrect code to run and thus leads to hard to debug code.
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.

Add hyphens to turn the adjective phrase into a compound word, increasing readability.

Suggested change
allows incorrect code to run and thus leads to hard to debug code.
allows incorrect code to run and thus leads to hard-to-debug code.


- Adding TypeError and ValueError exceptions to validate inputs to functions
and methods. These are not classified as BC breaks because not adding them
allows incorrect code to run and thus leads to hard to debug code.
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.

These are not classified as BC breaks because not adding them allows incorrect code to run and thus leads to hard to debug code.

IMO this wording is not great. Maybe:

Missing validation for undocumented or clearly unintended argument values are considered PHP core bugs with unpredictable or incorrect behavior. As such, adding the desired validation is not considered BC breaking.

Copy link
Copy Markdown
Member

@TimWolla TimWolla left a comment

Choose a reason for hiding this comment

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

I'm merging this, since this was the version that was approved in the RFC. Please submit typo fixes separately as a new PR.

@TimWolla TimWolla merged commit 59852ad into php:main Apr 5, 2026
1 check 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.

5 participants