Skip to content

Add Limits section: why this cannot be a PSR-15 middleware - #5

Merged
mohaelmrabet merged 1 commit into
mainfrom
docs/psr15-limits
Sep 4, 2026
Merged

mohaelmrabet merged 1 commit into
mainfrom
docs/psr15-limits

Conversation

@mohaelmrabet

Copy link
Copy Markdown
Contributor

A PHP fatal is not a Throwable: no try/catch, PSR-15 pipeline included, ever intercepts it. PHP terminates execution immediately, and the call stack — the pipeline itself — is gone with it, before the next middleware could run. That's a constraint of the language, not a design choice.

Documents this explicitly, plus why no PSR-7 either (the shutdown handler fires after the framework's own response-emission machinery may no longer be usable) and where PSR-3 does apply (the optional logger).

A PHP fatal is not a Throwable: no try/catch, PSR-15 pipeline included,
ever intercepts it. The call stack — the pipeline itself — is destroyed
before the next middleware could run. A language constraint, not a
design choice.
@mohaelmrabet
mohaelmrabet merged commit bb4ea18 into main Sep 4, 2026
9 checks passed
@mohaelmrabet
mohaelmrabet deleted the docs/psr15-limits branch September 4, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant