Stdlib: zip_open named filename + zip_* stub param names (#24666) - #32169
Merged
Conversation
Wire php-src php_zip.stub.php names so zip_entry_close(zip_entry:) binds (InternalArgInfo still zip_ent) and TypeError labels use $zip / $zip_dp instead of $filename. Co-authored-by: Cursor <cursoragent@cursor.com>
3 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
BuiltinParamNamesfor proceduralzip_*to php-srcext/zip/php_zip.stub.phpso named calls match Zend (zip_open(filename:);zip_entry_close(zip_entry:)instead of InternalArgInfozip_ent).VmZipProcedural::requireArchiveHandle()sozip_close/zip_readuse$zipandzip_entry_openuses$zip_dp(was hardcoded$filenamefor arg Php stdlib specs implementation #1).ext/ziporPHP_COMPILER_ENABLE_ZIP=1(Regression: extension_loaded('zip')/ZipArchive/zip_open phantom under PROFILE=8.4 — Zend ext/zip absent (re-#18137, ext/zip) #25010).Closes #24666
php-src reference
ext/zip/php_zip.stub.php—zip_open(string $filename),zip_close($zip),zip_entry_close($zip_entry), …PHP implementation
lib/BuiltinParamNames.php— explicit stub namesext/zip/VmZipProcedural.php+zip_close.php/zip_read.php/zip_entry_open.php— TypeError labelsTest plan
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter ZipModuleTest test/unit/ZipModuleTest.php'— OK (2 tests)vendor/bin/phpunit --filter testZipProceduralZendStubNamedParams— OK (29 assertions)vendor/bin/phpunit test/unit/ZipArchiveTest.php test/unit/ZipExtensionPolicyTest.php— OK (80 assertions)ci-fast.sh, AOT (procedural zip is VM-only, Stdlib: zip_open()/zip_read()/zip_close()/zip_entry_*() — procedural zip API missing (ext/zip/php_zip.c) #6370),north-star5-verifyMade with Cursor