@mnapoli opened this issue on October 2nd 2014

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 keep Piwik\Unzip for backward compatibility (until a future refactoring with dependency injection maybe).

The benefits from this: - a smaller package on a separate topic, much easier to maintain - less tests to run in Piwik (the faster they are the better) - the opportunity to write more extensive tests and improve coverage - 2 less libraries in libs/ (Archive_Tar/ and PclZip/) - an independent package that can be reused outside of Piwik!

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), and UncompressInterface seems to be not correct english. It seems Decompress is more appropriate. Extract could also be a good candidate but it seems a bit more generic and less evocative of "compressing files".

@mattab commented on October 2nd 2014

Sounds good! :+1: To publicise this package we could write a blog post on http://piwik.org/blog/

@mnapoli commented on October 2nd 2014

WIP: https://github.com/piwik/component-decompress

@mnapoli commented on October 3rd 2014

Done in #6376!

This issue was closed on October 3rd 2014
Powered by GitHub Issue Mirror