Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Madzipper Laravel Package

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...

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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).
  • It sits in the convenience layer, not the infrastructure layer: no queue integration, no Flysystem/Storage disk abstraction, no streaming. You hand it real filesystem paths.
  • That is a deliberate design constraint and should be accepted up front: archive work is synchronous and in-process.
  • Coupling is low — one Facade, optional config publish, no global state beyond the facade root.

Integration feasibility

  • composer require madnest/madzipper plus package auto-discovery; first working archive typically inside an hour. Legacy apps may need manual alias registration.
  • v1.7.0 is reported as a single change: "Laravel 13 support." In practice this almost always means widening the illuminate/support constraint rather than new code. Low risk for existing installs on 1.6.x.
  • The signal is weak, though: one PR, one line of changelog, no test or dependency changes enumerated. Treat this as declared compatibility, not verified compatibility until we exercise our own matrix against it.

Technical risk

  • Single-maintainer project with low release cadence and terse changelogs. Bus factor and abandonment risk dominate the long-term risk profile — more than code correctness, which is straightforward.
  • Hard runtime dependency on ext-zip being compiled in. Missing extension fails at call time, not install time.
  • Synchronous zip/unzip means memory_limit and max_execution_time are the practical ceilings; there is no streaming path for large archives.
  • Error handling is not exception-first in all paths; some operations return falsy on failure. Call sites must wrap and check.
  • Laravel 13 is early in its lifecycle; same-day support claims frequently mean "installs" rather than "tested against release candidates."

Key questions

  1. Is v1.7.0 a composer.json constraint widening only, or does CI actually run the suite against Laravel 13 and its PHP floor?
  2. What PHP minimum does the widened constraint imply, and does that match our runtime images?
  3. What are our realistic archive sizes and volumes — do they exceed safe in-memory bounds?
  4. Is a comparison against native ZipArchive, a Flysystem zip adapter, or spatie/laravel-zip warranted before committing?
  5. Are there undocumented API or semver changes between 1.6.0 and 1.7.0 outside the single PR?

Integration Approach

Stack fit

  • Good fit for ad-hoc archive work in a Laravel app: user data exports, ingesting uploaded zips, packaging generated documents.
  • Poor fit for high-volume or streaming pipelines, or anything needing disk-abstraction semantics.

Migration path

  • Greenfield: composer require madnest/madzipper, rely on discovery, resolve the Facade (or inject behind an interface).
  • From 1.6.x: patch-level bump, no code changes anticipated. Re-run archive-related tests.
  • From 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.
  • From raw ZipArchive: wrap incrementally behind an internal service so domain code never imports the package.

Compatibility

  • Verify ext-zip on every runtime image and CI runner. Debian-based php:*-fpm images ship it; Alpine builds need libzip-dev at build time.
  • Confirm Laravel 13 and the implied PHP floor align with our base images before bumping.
  • Check for constraint conflicts with other packages pinning illuminate/support.

Sequencing

  1. Inspect the actual v1.7.0 diff — composer constraint only, or code too (~30 min).
  2. Add ext-zip and PHP-version assertions to CI, plus one integration test that creates and extracts an archive.
  3. Introduce an internal ArchiveService wrapper so call sites don't touch the facade directly.
  4. Upgrade dev → CI matrix (current LTS + Laravel 13) → staging → production.
  5. Only then move the application itself to Laravel 13, with the package already proven on the new constraint.

Operational Impact

Maintenance

  • Expected ongoing work is dependency-constraint bumps, not feature work. Budget a few hours per Laravel major plus a standing watch item on repo activity and open issues.
  • Pin exact minor versions and upgrade deliberately; with a one-line changelog, the diff is the source of truth.
  • Because usage sits behind our own wrapper, the exit path to native ZipArchive is contained and cheap.

Support

  • Community-only, no vendor SLA. Internal ownership must be explicit: name a service owner, keep the wrapper documented.
  • Ensure ZipArchive error strings and return codes surface in logs rather than being swallowed by the wrapper.

Scaling

  • CPU- and memory-bound, in-request. Large archives hit 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.
  • Concurrency: temp and target paths must be unique per request/job to avoid collisions on shared volumes.
  • Disk: create and extract roughly double footprint; monitor temp and storage volumes.

Failure modes

  • Missing ext-zip → class-not-found or falsy returns at runtime; catch with a boot-time health check.
  • Corrupt or partial uploads → ZipArchive::open failure; validate before extraction.
  • Zip-slip path traversal on untrusted archives — sanitize entry names before extracting; this is a security control, not a nicety.
  • Permission, open_basedir, or read-only filesystem errors on target paths.
  • Timeouts mid-write leaving orphaned partial files; wrap in try/finally cleanup.
  • Indirect breakage from a Laravel 13 upgrade if the package was never genuinely exercised on it.

Ramp-up

  • Very low for anyone with Laravel experience — the fluent API is self-documenting and productive within an hour.
  • The real ramp-up cost is the operational guardrails (size limits, validation, extraction sanitization, cleanup), not the API. Ship a short internal README with the sanctioned usage pattern and the "no facade calls from domain code" rule.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mydnic/volet-feature-board-filament-plugin
wmde/email-address
refinery29/test-util
dees040/laravel-api-responses
teamzac/geocoder
ideatica/config-writer
keaton-php/pipe-dream
jacksonwebservices/laravel-user-suite
maksimru/conditional-laravel-debugbar
gismatul/nova-support-chat
gismatul/laravel-support-chat
networkrailbusinesssystems/oracle-api
alphabalex/messaging-made-easy
rawphp/warp
shootkiran/merobug
narakode/fineauth
numencode/wn-syncops-plugin
ibnnajjaar/mib-global-pay
refinery29/php-cs-fixer-config
parsnick/steak