Stdlib: stream_context_set_option incomplete string form → ValueError (#30645) - #30692
Merged
Merged
Conversation
…#30645) Match php-src streamsfuncs.c overload guards: 2-arg/3-arg string form throws Zend ValueError instead of LogicException or silent true. Co-authored-by: Cursor <cursoragent@cursor.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ext/standard/streamsfuncs.cPHP_FUNCTION(stream_context_set_option)overload guards: 2-arg string form and 3-arg string form throw ZendValueErrorinstead ofLogicException/ silenttrue.VmStreamContext::setOptionno longer synthesizes a null$valuefor omitted arg Stdlib: round, sqrt, gettype and expanded PHPT specs #4; JIT/AOT lowering uses the same messages viaExceptionBridge::emitValueErrorAndAbort.ext/standard/VmStreamContext.php,ext/standard/stream_context_set_option.php,ext/standard/JitStreamContextSetOption.php. No new C.Closes #30645
php-src reference
ext/standard/streamsfuncs.c—Z_PARAM_ARRAY_HT_OR_STR+zend_argument_value_error(3/4, …)Test plan
StreamContextSetOptionIncomplete30645VMTest,StreamContextSetOptionIncomplete30645JITTest,Issue30645StreamContextSetOptionIncompleteTest, AOT@group llvmstream_context_set_option*suite (29 tests)Verification
Zend + VM + JIT output (all identical):
PHPUnit: OK (3 tests) VM; OK (4 tests) JIT/AOT; OK (29 tests) related stream-context suite.
./script/ci-fast.sh: AOT smoke OK; failed oncheck-rebuild-examples-009-sync(examples/README.md009-FastCGIWeb AOT columns) — this tree did not touchexamples/; same README as master.Not covered
VMTest/JITTestcompliance suitesnorth-star5-verify --strictMade with Cursor