laminas/laminas-dependency-plugin
Composer plugin that eases migration from Zend Framework to Laminas by transparently replacing zendframework/* dependencies with their laminas/* equivalents during install and update, helping existing projects adopt Laminas without manual composer.json edits.
Architecture fit. Effectively nil for a Laravel codebase. laminas-dependency-plugin is a Composer plugin whose sole job is to rewrite zendframework/* and zfcampus/* requirements in the dependency graph to their laminas/* equivalents at install time. Laravel, Symfony components, and the mainstream Laravel ecosystem do not depend on Zend Framework packages, so the plugin has no work to do in a typical Laravel stack. The narrow case where it matters is a Laravel app that transitively pulls a stale package still requiring zendframework/zend-* (historically common with older HTTP/PSR-7, hydrator, or code-generation libraries). Even then, the plugin is a shim masking an upstream that has not migrated — a code smell rather than an architectural solution.
Integration feasibility. Trivial mechanically: one composer require --dev (or runtime) entry plus an allow-plugins entry in composer.json. The real friction is governance, not engineering. Composer 2.2+ blocks plugins by default, so the allow-list change must go through review. Because the plugin mutates requirements during resolution, it must live wherever composer install runs — including CI, container builds, and production image pipelines — which widens the blast radius beyond a dev-only convenience.
Technical risk.
Key questions.
composer.lock (including transitive deps) contain any zendframework/* or zfcampus/* entries today? If no, stop here — the package is not needed.Stack fit. Poor-to-conditional. Laravel's own dependency tree is Composer 2-native and Zend-free; the package only earns a place as a temporary compatibility bridge for a specific legacy dependency. Treat it as a scoped remediation tool, not a platform dependency.
Migration path.
composer why zendframework/zend-* and grep composer.lock for zendframework/ and zfcampus/. Quantify how many packages and which direct dependencies are implicated.laminas/*. Upgrading one dependency is strictly better than installing a graph-rewriting plugin.allow-plugins entries scoped in composer.json and a documented expiry date.composer.json/allow-plugins config is used in CI and runtime images so behavior does not diverge between environments.Compatibility. Requires Composer 2.x and the plugin API; verify against our pinned Composer version and the PHP runtime matrix (7.4–8.x range per Laminas conventions). Validate in a throwaway branch with a full composer update --dry-run before touching main.
Sequencing. Audit → attempt dependency upgrades → introduce plugin only for the residual set → verify composer install on a clean cache in CI → ship → schedule removal once upstreams migrate. Do not introduce the plugin and other Composer-level changes (repository additions, platform config, autoloader changes) in the same release; isolate the variable so regressions are attributable.
Maintenance. Near-zero ongoing effort if used — the plugin is passive. The burden is the removal ticket and the diligence of not letting a "temporary" shim calcify. Budget an explicit owner and a review date.
Support. Low call volume expected; when issues occur they will present as opaque dependency-resolution errors, so the platform team should document the plugin's presence in the repo README and in the Composer troubleshooting runbook. First-line support will otherwise misattribute failures to Laravel or CI.
Scaling. Irrelevant at the application layer — the plugin does not affect runtime performance, request throughput, or horizontal scaling. The only scaling concern is organizational: every new service that copies the template inherits the shim unless the audit is done per-repo.
Failure modes.
allow-plugins policy → install fails with a security-advisory-style error; recovery is a one-line config change but requires a release.laminas/* requirement that conflicts with the rewritten one → resolution errors that look unrelated to the plugin.Ramp-up. Minutes for an engineer who knows Composer; the plugin is declarative and has no API to learn. The real ramp-up cost is contextual: understanding why it is present, which requires the audit notes above. Onboarding documentation is the difference between a 5-minute and a 2-hour investigation.
How can I help you explore Laravel packages today?