etshy/php-zip-bundle
A Symfony bundle that brings convenient ZIP archive handling to PHP applications. It provides services and configuration around native ZIP support so you can create, inspect, and extract compressed files with less boilerplate.
Architecture fit (product lens). From a TPM standpoint this is a capability, not a platform decision. The package delivers a narrow, commodity capability — create/extract/inspect ZIP archives — that PHP already provides natively via ext-zip. The only differentiated value is Symfony DI/config integration, which has zero applicability to a Laravel shop. Any roadmap item this supports ("download all," DSAR export, report bundles, release packaging) can be satisfied by ~1 engineer-day of first-party code. There is no strategic leverage here: it does not unlock new product surface, differentiate the offering, or reduce time-to-market in a meaningful way.
Integration feasibility. Low. Direct consumption in Laravel is not viable — it would pull Symfony's container/kernel layers to invoke a service we can trivially write. There is no documented framework-agnostic public API. Treat it strictly as a reference implementation whose patterns (service-oriented, testable, config-driven) we should copy, not whose code we should depend on.
Technical risk (business-weighted).
| Risk | Severity | Business impact |
|---|---|---|
| Unmaintained / no release cadence | High | We absorb all future fixes; no escalation path |
| Zero adoption (0 stars, 0 dependents) | High | No de-risking via production precedent |
| File I/O + extraction = attack surface (Zip Slip, zip bombs) | High | Security incident / data-loss exposure |
| Framework mismatch (Symfony → Laravel) | Medium | Wasted integration effort, Composer conflict risk |
| Ambiguous dependency ("using php-zip") | Medium | Unknown transitive supply chain |
Key questions to answer before any decision.
ext-zip directly or a third-party wrapper (changes the transitive risk)?../absolute paths, and reject symlinks? Is there any size/entry-count guard?symfony/* versions?Stack fit. Poor for Laravel; acceptable only if the host application is already Symfony and wants archive settings managed through config/packages/*.yaml. The TPM framing: this is a reuse-vs-build trade where build wins on cost, control, and risk. Recommend build in-house behind an ArchiveService interface and keep the vendor-swap option open.
Migration path. If any team already depends on it, port rather than bridge. Inventory which service methods are actually called, which config keys are read, and which exceptions are caught; reimplement those exact behaviors behind an app-owned interface (create, extract, list, stream). Budget one engineer-day.
Compatibility. Two hard gates: (1) Composer constraint collisions with Laravel's pinned Symfony components, and (2) ext-zip availability — not enabled by default in many PHP base images; requires libzip-dev + docker-php-ext-install zip in runtime images and CI. Capture both in environment docs so "it doesn't work" never becomes a surprise in prod.
Sequencing (decision-gate order).
ZipArchive with explicit path-traversal guard, size/entry limits, and unique per-job temp dirs.ZipStream-PHP if scale demands).Maintenance. Assume abandoned. Adoption transfers full ownership: Symfony bundle/DI schema drift, PHP version drift, and all bug fixes become ours. For a Laravel consumer there is no upstream alignment whatsoever — every future change is internal.
Support. No community footprint, no issue triage history, no Stack Overflow corpus; escalation is one maintainer on GitLab. That is not an acceptable support posture for a production dependency performing file writes and extraction against user-triggered paths.
Scaling. ZipArchive typically operates on a fully materialized file, so memory and temp-disk scale with archive size — multi-GB exports will hit memory_limit and max_execution_time. Concurrency is a real hazard: shared temp paths collide across queue workers, and ephemeral containers lose partial archives on restart. Any adoption needs per-job working directories, queue-based execution, and timeout policy. This is a product-feature ceiling decision: if large exports are on the roadmap, a thin wrapper is the wrong foundation — plan for a streaming writer (ZipStream-PHP) instead.
Failure modes to design error paths for. Truncated/corrupt archives; unsupported compression; encrypted archives failing silently; permission errors on extraction target; disk exhaustion mid-write; non-UTF-8 entry names; path traversal / symlink escape; zip bombs; open_basedir restrictions; PHP limit exhaustion. A thin wrapper surfaces these as generic exceptions, which is insufficient for reliable ops alerting.
Ramp-up. Technically negligible — any PHP developer reads the source in an hour. The real cost is security review plus opportunity cost of owning a fork: ~half a day to audit, ~one day to reimplement cleanly, plus ongoing ownership. No training budget, no licensing cost, no procurement cycle — the decision hinges entirely on risk appetite and roadmap scale.
Recommendation. Reject as a production dependency. Justification is framework mismatch plus abandonment risk, not code quality. Revisit only if upstream ships a framework-agnostic, tagged, tested core with a maintained security posture. For stakeholders: the roadmap capability is deliverable in-house in roughly a day, with full control, no supply-chain exposure, and no framework mismatch — a straightforward cost-avoidance win.
How can I help you explore Laravel packages today?