Skip to content

fix: prevent exception handlers from restarting FrankenPHP workers - #10721

Merged
michalsn merged 2 commits into
codeigniter4:developfrom
michalsn:fix/worker-mode-exceptions
Nov 5, 2026
Merged

michalsn merged 2 commits into
codeigniter4:developfrom
michalsn:fix/worker-mode-exceptions

Conversation

@michalsn

@michalsn michalsn commented Nov 4, 2026

Copy link
Copy Markdown
Member

Description
This PR fixes a bug where exception handlers called exit() after rendering errors, causing FrankenPHP workers to restart even for 404 responses without a custom override.

The handlers now return to the worker loop so request cleanup can run. Retained exception, request, and response state is cleared before the next request. Traditional execution keeps its existing exit behavior.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn michalsn added the bug Verified issues on the current code behavior or pull requests that will fix them label Nov 4, 2026

@paulbalandan paulbalandan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just a nit.

@michalsn
michalsn force-pushed the fix/worker-mode-exceptions branch from fc8fde0 to f272a82 Compare November 5, 2026 06:41
@michalsn
michalsn merged commit d6dc2d5 into codeigniter4:develop Nov 5, 2026
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants