We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi. Thank you for the great libraries.
What do you think about making Middlewares\Utils\Dispatcher to implement Psr\Http\Server\RequestHandlerInterface?
Middlewares\Utils\Dispatcher
Psr\Http\Server\RequestHandlerInterface
Dispatcher already has method dispatch(ServerRequestInterface $request): ResponseInterface, that, except the name, resemble handle(ServerRequestInterface $request): ResponseInterface from RequestHandlerInterface.
Dispatcher
dispatch(ServerRequestInterface $request): ResponseInterface
handle(ServerRequestInterface $request): ResponseInterface
RequestHandlerInterface
Making Dispatcher a middleware composite enables to pass it to some runners, for example zendframework/zend-httphandlerrunner:
$runner = new RequestHandlerRunner( $container->get(ApplicationRequestHandler::class), $container->get(EmitterStack::class), $container->get('ServerRequestFactory'), $container->get('ServerRequestErrorResponseGenerator') ); $runner->run();
What do you think about this?
I have tested such approach localy, so can provide PR if needed.
Thak you in advance.
The text was updated successfully, but these errors were encountered:
Yes, why not. Your PR is welcome! 👍
Sorry, something went wrong.
@oscarotero thank you for merging PR. Can you, please, make a new patch release?
Sorry for the late. New version released.
No branches or pull requests
Hi. Thank you for the great libraries.
What do you think about making
Middlewares\Utils\Dispatcher
to implementPsr\Http\Server\RequestHandlerInterface
?Dispatcher
already has methoddispatch(ServerRequestInterface $request): ResponseInterface
, that, except the name, resemblehandle(ServerRequestInterface $request): ResponseInterface
fromRequestHandlerInterface
.Making
Dispatcher
a middleware composite enables to pass it to some runners, for example zendframework/zend-httphandlerrunner:What do you think about this?
I have tested such approach localy, so can provide PR if needed.
Thak you in advance.
The text was updated successfully, but these errors were encountered: