zendframework/zend-mvc-plugin-fileprg
A Zend Framework MVC controller plugin that implements the File Post/Redirect/Get pattern, letting you validate uploads before redirecting and preserve file upload state across requests.
zend-mvc-plugin-fileprg is a thin, single-purpose controller plugin that implements Post/Redirect/Get for forms containing file uploads: it stashes uploaded files in session between the POST and the follow-up GET, then re-injects them into the request on redirect. That is roughly a day of custom work plus ongoing edge-case maintenance — cheap to buy, cheap to replace, so treat it as a low-stakes dependency decision rather than an architectural one.redirect()->withInput() plus its own session/upload handling already covers PRG. Adopting this constrains you to zend-mvc (ZF2/ZF3), which is in maintenance mode with the ecosystem migrated to Laminas. That is a roadmap input, not a blocker: plan the laminas-mvc-plugin-fileprg swap (near drop-in rename) alongside any PHP 7.2+ modernization.Adopt when all of the following hold:
Look elsewhere when:
laminas-mvc-plugin-fileprg instead of adopting an EOL-branded dependency.For executives: A tiny, free component that prevents users from losing their file uploads when a form submission fails or a page is refreshed — a small but real UX and duplicate-submission win, at effectively zero cost. The caveat is lifecycle, not capability: it belongs to the Zend Framework family, which is now in maintenance and has moved to Laminas. Recommendation is to adopt only where already on zend-mvc, and to budget the rename-style migration to laminas-mvc-plugin-fileprg as part of the next platform upgrade. No action required for our Laravel services.
For engineering: Version 1.1.0 is a compatibility release — PHP 7.1/7.2 support added (PR #10), HHVM support removed, no functional changes, no deprecations, no breaking changes for supported runtimes. Safe to bump within a zend-mvc codebase. Two things to log: (1) HHVM is now unsupported, so any lingering HHVM CI job must be retired or pinned to 1.0.x; (2) the upstream namespace is Zend, not Laminas — treat this as a stopgap and schedule the migration. Scope of the library is intentionally narrow: session-backed file stashing across a redirect. It does not handle storage, scanning, or upload transport, so don't scope those expectations onto it.
How can I help you explore Laravel packages today?