-
-
Notifications
You must be signed in to change notification settings - Fork 1
refactor(http): Remove error handler unregistration from StatelessApplication constructor for cleaner initialization.
#157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…plication` constructor for cleaner initialization.
WalkthroughRemoved explicit error handler unregistration within StatelessApplication::reset. The reset flow otherwise remains: reinitialize parent, clear request-related state, rebind PSR-7 request, sync cookie validation, manage session lifecycle, and bootstrap. Error handler state is affected only via setResponse; unregister() is no longer invoked during reset. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Caller
participant App as StatelessApplication
participant EH as ErrorHandler
participant Req as Request/Session/Cookies
rect rgb(245,245,255)
note over Caller,App: Old reset() flow (before this change)
Caller->>App: reset()
App->>EH: unregister() %% Removed in new flow
App->>App: parent::__construct(...)
App->>Req: reset request state
App->>Req: rebind PSR-7 request
App->>Req: sync cookie validation
App->>Req: manage session lifecycle
App->>App: bootstrap()
end
sequenceDiagram
autonumber
actor Caller
participant App as StatelessApplication
participant EH as ErrorHandler
participant Req as Request/Session/Cookies
rect rgb(240,255,240)
note over Caller,App: New reset() flow (after this change)
Caller->>App: reset()
note over EH: No explicit unregister() call
App->>App: parent::__construct(...)
App->>Req: reset request state
App->>Req: rebind PSR-7 request
App->>Req: sync cookie validation
App->>Req: manage session lifecycle
App->>App: bootstrap()
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #157 +/- ##
===========================================
Coverage 100.00% 100.00%
+ Complexity 318 317 -1
===========================================
Files 12 12
Lines 805 803 -2
===========================================
- Hits 805 803 -2 ☔ View full report in Codecov by Sentry. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary by CodeRabbit