zendframework/zend-mvc-plugin-prg
The Post/Redirect/Get plugin for zend-mvc prevents duplicate form submissions by redirecting after a successful POST. Configure it to redirect to a route or URL, keeping form data available for the next request.
Architecture fit: Poor for a Laravel codebase. zendframework/zend-mvc-plugin-prg is a controller plugin for the Zend Framework MVC event-driven dispatch layer, not Laravel's HTTP kernel or routing pipeline. It provides a PostRedirectGet controller plugin (prg() helper) that detects a non-GET request, stashes the request body in session, and issues a redirect. Laravel already offers equivalent primitives (redirect()->route(), session()->flash(), form request validation redirects), so adopting this package would mean importing a foreign MVC abstraction rather than extending Laravel's. It is only architecturally coherent in an existing zend-mvc application.
Integration feasibility: Low. The plugin registers through zend-mvc's ControllerPluginManager and depends on zend-mvc, zend-stdlib, and zend-eventmanager interfaces. There is no service provider, facade, or Laravel container binding. Making it usable in Laravel would require re-implementing the plugin against Laravel's RedirectResponse and session store — at which point you are not integrating the package, you are rewriting it in a few dozen lines.
Technical risk: Moderate-to-high and mostly organisational, not behavioural.
zendframework/* namespace is the legacy Apache/Foundation lineage; active development moved to laminas/*. Consuming zendframework/zend-mvc-plugin-prg means starting on a dead-end namespace with a known successor package (laminas/laminas-mvc-plugin-prg).zend-stdlib v2, narrowing the dependency to v3. This is a breaking change for any locked legacy install and will surface as a Composer solver conflict rather than a runtime error — cheap to detect, but it will block incremental upgrades.Key questions:
laminas-mvc-plugin-prg rather than adopting the deprecated namespace?$this->prg() directly, or is this a green-field decision?zendframework/* before adoption is finalised?Stack fit: No direct fit with Laravel. For Laravel, the PRG pattern is native and should not be outsourced to a package: validate with a FormRequest (which redirects back with errors on failure), then return redirect()->route(...) with flashed session data. Recommended action is do not adopt in Laravel services.
Migration path: If the intent is a legacy Zend application, the correct path is laminas/laminas-mvc-plugin-prg — the maintained fork of this exact component, with matching API. Treat zendframework/zend-mvc-plugin-prg v1.2.0 as a stop-gap only if an existing lock file already pins it and a full Laminas migration is not funded this cycle. If the intent is Laravel, the migration path is "delete the dependency and implement PRG with framework primitives."
Compatibility:
zend-stdlib: v3 only as of 1.2.0. Any transitive v2 pin elsewhere in the tree must be resolved first.composer why zend-stdlib before upgrading.Sequencing:
composer.lock for zend-stdlib v2 pins, resolve those first, then take 1.2.0.Maintenance: The zendframework/* packages are archived/feature-frozen; upstream fixes land in Laminas only. Adopting this release means owning a fork-or-migrate decision. Conversely, the component is small enough that "maintenance" mostly means tracking the dependency tree, not patching code.
Support: Community-only via the Laminas channels, which do not formally support the zendframework namespace. No vendor SLA. Documentation for this release is thin — the notes themselves are boilerplate and tell you nothing about behaviour beyond the two dependency changes.
Scaling: Negligible runtime footprint — a controller plugin with session write and redirect. No throughput, memory, or horizontal-scaling concerns. The plugin does write to session on every intercepted POST, so session store sizing and sticky-session/centralised-session design matter more than the package itself.
Failure modes:
zend-stdlib v2 lock — the most likely failure from this release, and it manifests at build time, not runtime.zendframework namespace; future CVEs in zend-mvc land in Laminas.prg() helper throws at dispatch time, which surfaces as a 500 on a specific controller action rather than at boot.Ramp-up: Low effort to understand — the PRG concept is well known and the plugin surface is one method. The real ramp-up cost is organisational: engineers must learn the zend-mvc dispatch and plugin-manager conventions, and must understand the zendframework → laminas history to avoid introducing further deprecated dependencies. Budget a day for the technical read and considerably more for the migration decision.
Recommendation: Does not warrant adoption for a Laravel stack. In a legacy zend-mvc stack, accept 1.2.0 only as a transitional pin and pair it with a funded Laminas migration; otherwise evaluate laminas/laminas-mvc-plugin-prg directly.
How can I help you explore Laravel packages today?