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:
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
- 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".
Sounds good! :+1: To publicise this package we could write a blog post on http://piwik.org/blog/
Done in #6376!