New component/decompress: extracted Piwik\Unzip into a separate package #6367
Labels
Task
Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone
Just like the PiwikTracker being extracted into its own package, I believe it would be interesting to do the same for small and isolated components that are inside Piwik's code. The
Piwik\Unzip
component is a perfect candidate for that as it contains the following classes:UncompressInterface
Gzip
PclZip
Tar
ZipArchive
All of those classes/interface are not used directly in the codebase as they are abstracted behind the
Piwik\Unzip
factory. So it seems pretty safe to move all the classes and keepPiwik\Unzip
for backward compatibility (until a future refactoring with dependency injection maybe).The benefits from this:
libs/
(Archive_Tar/
andPclZip/
)Just a side note regarding the name of the future package:
Unzip
seems too targeted (since the library can handle zips as well as tars and all), andUncompressInterface
seems to be not correct english. It seemsDecompress
is more appropriate.Extract
could also be a good candidate but it seems a bit more generic and less evocative of "compressing files".The text was updated successfully, but these errors were encountered: