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

Zend Mvc Plugin Prg Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • The 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).
  • v1.2.0 removes support for 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.
  • PHP 7.3 support was added; the release is effectively pinned to a PHP branch that is long past end-of-life. There is no signal here of PHP 8 readiness.
  • Functional scope is tiny and stable, so the code itself is low-risk. The dependency graph is the risk.

Key questions:

  • Is there an actual zend-mvc/zend-framework service in the estate, or is this being evaluated speculatively against Laravel?
  • If a legacy service exists, why not go straight to laminas-mvc-plugin-prg rather than adopting the deprecated namespace?
  • What is the target PHP version, and does the wider application already run stdlib v3?
  • Does any existing code call $this->prg() directly, or is this a green-field decision?
  • Who owns the upgrade path off zendframework/* before adoption is finalised?

Integration Approach

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:

  • PHP: 7.3 supported by this release; no evidence of PHP 8 support. Incompatible with a modern Laravel runtime (Laravel 9+ requires PHP 8.0+).
  • zend-stdlib: v3 only as of 1.2.0. Any transitive v2 pin elsewhere in the tree must be resolved first.
  • Framework: requires zend-mvc + zend-eventmanager; cannot coexist meaningfully with Laravel's container.
  • v1.2.0 is a dependency-breaking release. Pin exact versions and verify composer why zend-stdlib before upgrading.

Sequencing:

  1. Confirm whether a zend-mvc application actually exists in scope — this is the go/no-go gate.
  2. If yes: audit composer.lock for zend-stdlib v2 pins, resolve those first, then take 1.2.0.
  3. Immediately after, schedule the Laminas rename migration as a separate, scoped work item.
  4. If no zend-mvc application exists: close the evaluation and record the Laravel-native PRG pattern as the standard.

Operational Impact

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:

  • Composer solve failure on zend-stdlib v2 lock — the most likely failure from this release, and it manifests at build time, not runtime.
  • Namespace abandonment — no security patches for the zendframework namespace; future CVEs in zend-mvc land in Laminas.
  • PHP version ceiling — no PHP 8 path via this package, which will block framework upgrades later.
  • Silent session coupling — PRG relies on session state; misconfigured session drivers (e.g. per-node file sessions behind a load balancer) cause the redirect to lose the stashed data. This is a deployment-configuration risk, not a package bug.
  • Plugin registration drift — if the plugin manager config is not wired, the 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.

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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
adachsoft/php-code-style