samson / unexpected-response-bundle
Allows throwing a response from virtually anywhere
Installs: 7 624
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 15
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.0
- symfony/http-foundation: *
- symfony/http-kernel: *
Requires (Dev)
This package is auto-updated.
Last update: 2025-02-20 20:55:42 UTC
README
Hooks into the deepest level of Symfony exceptions to allow throwing an UnexpectedResponseException, which is caught and forwarded to the client.
This means that you can throw an exception from any level in code, current code flow is aborted, and the response object passed to the UnexpectedResponseException is sent back to the client.