Uh oh!
There was an error while loading. Please reload this page.
Deprecate the procedural API of ext/zip - #5746
Conversation
Girgias
commented
Jun 20, 2020
I'm not sure if this wouldn't need an RFC? Except if maintainers of the extension can call this sort of thing without going through that process? |
kocsismate
commented
Jun 22, 2020
I'm not exactly sure, too, so it perfectly fine for me if this needs an RFC. But I can also imagine that Remi has the final word on this. :) |
kocsismate
commented
Jun 23, 2020
@nikic We don't need an RFC in this case, right? |
nikic
commented
Jun 23, 2020
@kocsismate Don't think we need an RFC in this case. Please add some UPGRADING notes when merging though :) |
cmb69
commented
Jul 19, 2020
Please see https://bugs.php.net/bug.php?id=79874. In my opinion, we had to make ZipArchive traversable, before we deprecated the procedural API. The implementation is not hard, but probably we'll want to bikeshed the details (name of the Would it be better to actually postpone the deprecation to 8.1, so we have sufficient time to figure these details out? |
thelounge-zz
commented
Jul 20, 2020
in the real world you need that missing stuff in the eversion before the deprecations, i really started to migrate my code ZipArchive which looked good for open and replace the is_resource by a boolean check - anything else was "and how do that funny guys imagine that?" and no it is not a solution unpack the whole archive and make the foldername/filename sanitize and filters for allowed extensions after that becaue that would mean a from scratch implementation of sometzhing wroking for many years because someone was funny deprecating something for no benefit |
kocsismate
commented
Jul 20, 2020
@thelounge-zz It's not about being funny... -.- You can disagree with a decision, but please use a respectful tone. We can still revert the change easily. |
@thelounge-zz (aka rhsoft) is blocked from participation on all php.net properties. I apologize that this was not enforced on GitHub previously. |
remicollet
commented
Jul 20, 2020
The procedural API is deprecated as it is mostly unmaintained and haven't receive any update for lot ofr new feature (new compression, encryption...) IMHO ZipArchive is the way to go. |
nikic
commented
Jul 20, 2020
@remicollet I think there may still be some holes in the ZipArchive API, for example, I don't immediately see how one would replace zip_entry_filesize. |
remicollet
commented
Jul 20, 2020
zip_entry_filesize => use statIndex |
nikic
commented
Jul 20, 2020
@remicollet I see, thanks. Maybe we can update the zip_entry docs to point to the corresponding ZipArchive methods, as it is not always completely obvious. |
remicollet
commented
Jul 20, 2020
nikic
commented
Jul 20, 2020
@remicollet Thank you! |
As discussed in #5601 (comment) this seems to be the most sensible approach to get rid of resources.