madnest/madzipper
Madzipper is a Laravel package that wraps PHP’s ZipArchive with a fluent, chainable API for creating, extracting, and manipulating ZIP archives. Add files or folders, extract specific patterns, and manage archives using readable methods—ideal for backups, downloads, and file packaging in Laravel app...
Architecture fit
madnest/madzipper is a thin, opinionated adapter over PHP's ext-zip (ZipArchive). It ships a Laravel service provider plus a Facade and exposes a fluent, chainable API (make, add, extractTo, listFiles, close).Integration feasibility
composer require madnest/madzipper plus package auto-discovery; first working archive typically inside an hour. Legacy apps may need manual alias registration.illuminate/support constraint rather than new code. Low risk for existing installs on 1.6.x.Technical risk
ext-zip being compiled in. Missing extension fails at call time, not install time.memory_limit and max_execution_time are the practical ceilings; there is no streaming path for large archives.Key questions
composer.json constraint widening only, or does CI actually run the suite against Laravel 13 and its PHP floor?ZipArchive, a Flysystem zip adapter, or spatie/laravel-zip warranted before committing?Stack fit
Migration path
composer require madnest/madzipper, rely on discovery, resolve the Facade (or inject behind an interface).Chumper/Zipper: namespace and facade alias swap (Chumper\Zipper → Madnest\Madzipper). Method surface is largely compatible; audit make()/zip() argument handling, close() semantics, and any getArchive() usage.ZipArchive: wrap incrementally behind an internal service so domain code never imports the package.Compatibility
ext-zip on every runtime image and CI runner. Debian-based php:*-fpm images ship it; Alpine builds need libzip-dev at build time.illuminate/support.Sequencing
ext-zip and PHP-version assertions to CI, plus one integration test that creates and extracts an archive.ArchiveService wrapper so call sites don't touch the facade directly.Maintenance
ZipArchive is contained and cheap.Support
ZipArchive error strings and return codes surface in logs rather than being swallowed by the wrapper.Scaling
memory_limit before anything else. Cap archive size and push anything beyond a modest threshold (tens of MB) to a queue worker with raised limits.Failure modes
ext-zip → class-not-found or falsy returns at runtime; catch with a boot-time health check.ZipArchive::open failure; validate before extraction.open_basedir, or read-only filesystem errors on target paths.try/finally cleanup.Ramp-up
How can I help you explore Laravel packages today?