Uh oh!
There was an error while loading. Please reload this page.
ext/snmp: promote invalid-input warnings to ValueError - #21319
Conversation
iluuu1994
commented
Mar 2, 2026
Hi @prateekbhujel! Thanks for your contribution. Per new policy, promotions of errors are considered breaking and require a discussion on the internals mailing list and frequently an RFC. |
prateekbhujel
commented
Mar 3, 2026
@iluuu1994 Thanks for clarifying the new policy. I will start an internals thread for this BC change and link it here before moving this PR forward. |
prateekbhujel
commented
Mar 3, 2026
@iluuu1994 Thanks again for the guidance. I started the internals discussion here: https://news-web.php.net/php.internals/130231 |
prateekbhujel
commented
Mar 19, 2026
@iluuu1994 Quick update — I noticed the related policy RFC has since been published: https://wiki.php.net/rfc/policy-exempt-type-value-error-bc-policy. I'm waiting for that vote to conclude before proceeding. Happy to move forward once the policy direction is clear. |
prateekbhujel
commented
Apr 6, 2026
@iluuu1994 The policy RFC has been accepted, so I think this PR fits the current BC policy now. Could you re-review when you get a chance? |
Uh oh!
There was an error while loading. Please reload this page.
b177d74 to
4a448a7CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Girgias
left a comment
There was a problem hiding this comment.
I think the only final remark I have would be to add UNEXPECTED() compiler hints for the exception code paths. :)
Uh oh!
There was an error while loading. Please reload this page.
Girgias
commented
Apr 6, 2026
I'll wait for CI and merge afterwards :) |
Uh oh!
There was an error while loading. Please reload this page.
This now also specifies which argument is causing the error.
Fixes#21318 by promoting remaining invalid-input warning paths in ext/snmp to ValueError for consistency with PHP 8+ argument validation behavior.
Changed paths:
snmp_session_init)php_snmp_parse_oid)snmp_session_set_contextEngineID)Tests updated accordingly: