Skip to content

ext/zip: add ZipArchive::openBuffer method #14078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shyim
Copy link

@shyim shyim commented Apr 29, 2024

Allow opening read-only zips by string.

An example use-case would be to download a zip file and without saving it to disk, to open it and get one file out of it.

See also #11594

It's my first PR, I run the test with also Valgrind. Did I miss something 🤔?

@shyim shyim force-pushed the add-ziparchive-openbuffer branch from 023e619 to b9495a6 Compare April 29, 2024 18:47
@Girgias Girgias requested a review from remicollet April 30, 2024 18:08
@michaljusiega
Copy link

Hi php-team! It's possible to push this new feature into PHP-8.4 ?

Thanks for reply!

@shyim shyim requested a review from kocsismate June 22, 2024 06:46
@@ -641,7 +641,6 @@ class ZipArchive implements Countable
/** @tentative-return-type */
public function open(string $filename, int $flags = 0): bool|int {}

/** @tentative-return-type */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you also have to regenerate the arginfo file when changing the stub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants