ext/snmp: promote invalid-input warnings to ValueError#21319
ext/snmp: promote invalid-input warnings to ValueError#21319Girgias merged 5 commits intophp:masterfrom
Conversation
|
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. |
|
@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. |
|
@iluuu1994 Thanks again for the guidance. I started the internals discussion here: https://news-web.php.net/php.internals/130231 |
|
@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. |
|
@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? |
b177d74 to
4a448a7
Compare
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. :)
|
I'll wait for CI and merge afterwards :) |
This addresses #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: