Skip to content

feat!: BREAKING - provide the request to the handler factory - #13

Merged
acoulton merged 2 commits into
feat-further-rectorfrom
feat-request-to-handler-factory
Nov 4, 2026
Merged

acoulton merged 2 commits into
feat-further-rectorfrom
feat-request-to-handler-factory

Conversation

@acoulton

@acoulton acoulton commented Nov 4, 2026

Copy link
Copy Markdown
Member

End-users can now implement simple routing to different RequestHandler
classes, because the factory function now has access to the request as
well as the logger.

Rather than adding this as a second argument, I've refactored the
callables to receive a new HandlerFactoryArgs DTO, which would make it
easier for us to provide additional dependencies / variables / context
to the handler factory in future without a BC break.


Stack created with GitHub Stacks CLI • Give Feedback 💬

@acoulton
acoulton added this pull request to stack #11 November 4, 2026 13:56
@acoulton
acoulton requested a review from craig410 November 4, 2026 13:56
End-users can now implement simple routing to different RequestHandler
classes, because the factory function now has access to the request as
well as the logger.

Rather than adding this as a second argument, I've refactored the
callables to receive a new HandlerFactoryArgs DTO, which would make it
easier for us to provide additional dependencies / variables / context
to the handler factory in future without a BC break.
To account for variation between guzzlehttp/psr7 v2 and v3.
@acoulton
acoulton force-pushed the feat-request-to-handler-factory branch from c1d9a6e to 0ed62f9 Compare November 4, 2026 16:27
@acoulton
acoulton merged commit 63c83b1 into 2.x Nov 4, 2026
3 checks passed
@acoulton
acoulton deleted the feat-request-to-handler-factory branch November 4, 2026 16:39
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.

2 participants