zeroem / deferred-request-bundle
Utilities for deferring request processing to some point in the future
Installs: 6
Dependents: 1
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/zeroem/deferred-request-bundle
Requires
- doctrine/orm: >=2.2,<2.4-dev
- symfony/symfony: dev-master
This package is not auto-updated.
Last update: 2025-10-05 08:50:19 UTC
README
Provides utilities to mark controller actions as deferred. By simply
adding the @Defer
annotation to any Controller or Action, the request
will be intercepted during the KernelEvents::CONTROLLER
phase of the
HttpKernel. At this point in time, the Request object will be serialized
and stored in the database for later processing via the deferred-request:process
console command.
When a Request is deferred, an appropriate HTTP 202 Response is returned containing :
- A Content-Location Header indicating where the deferred Response will be found
- A Link Header indicating where the status of the deferred Request may be monitored
Examples
Defer a single controller action
// ... /** * @Defer */ public function indexAction() { } // ...
Defer all actions on a controller
/** * @Defer */ class FooController extends Controller { // Actions... }