[php-src] PR #21205: ext/zip: add ZipArchive::openString method
| From: | tstarling | Date: | Thu, 12 Feb 2026 04:34:42 +0000 |
| Subject: | [php-src] PR #21205: ext/zip: add ZipArchive::openString method | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-34914@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/21205
Author: tstarling
* Remove ifdef guards around ZIP_RDONLY, not needed since a979e9f897a90a580e883b1f39ce5673686ffc67
* Add ZipArchive::openString().
* For consistency with ::open(), return int|bool, don't throw an exception on error. Provide
error information via existing properties and accessors.
* Share buffer handling with ZipArchive::addFromString().
* If there is an error from zip_close() during a call to ZipArchive::open(), emit a warning but
proceed to open the archive, don't return early. Add test.
* When buffers are saved by ZipArchive::addFromString(), release them in ZipArchive::close() and
::open(), don't accumulate buffers until the free_obj handler is called.
* Factor out buffer handling and reuse it in ZipArchive::openString()
Co-authored-by: @shyim
Forked from #14078