Problem Statement
The doNotUseClassResponse() method calls die() after outputting the file. This makes the code path untestable and is hostile to middleware/framework integration where the response lifecycle should be managed by the caller.
Proposed Solution
Remove the die() call. Let the caller decide whether to terminate the script. If needed, add a parameter to control this behavior.
Alternatives Considered
- Adding a
bool $terminate = true parameter to view()
- Throwing an exception instead of dying
Breaking Change
No — removing die() only affects scripts that rely on implicit termination after view().
Problem Statement
The
doNotUseClassResponse()method callsdie()after outputting the file. This makes the code path untestable and is hostile to middleware/framework integration where the response lifecycle should be managed by the caller.Proposed Solution
Remove the
die()call. Let the caller decide whether to terminate the script. If needed, add a parameter to control this behavior.Alternatives Considered
bool $terminate = trueparameter toview()Breaking Change
No — removing
die()only affects scripts that rely on implicit termination afterview().