-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
Add routing params to request query params for middleware usage #250
Conversation
From my point of view: Routing args and a query string is conceptionally someting different and should not be mixed. Mixing the query string arguments ( |
A |
I forgot to tag this issue in the pull request #249. You can't get any routing params in any middleware, so we do need this! |
Just had a discussion in ##php and it has been suggested than the route vars get put into PSR-7 ServerRequestInterface attributes. https://github.com/php-fig/http-message/blob/master/src/ServerRequestInterface.php#L202:L204 The docblock itself says: |
sorry for the delay on this, looking at a release the first week in the new year so will look at bringing this in for that |
Hello @philipobenito, is there anything how we can help to get this pull request merged? I would like to use route specific vars in a Middleware and i think this is the one big missing part of this router, to make it completly middleware ready 🙂 |
Ah, I got delayed on the major release and forgot about this, will take a look tomorrow
Sent from ProtonMail mobile
…-------- Original Message --------
On 5 Feb 2020, 20:11, Jan Dittrich wrote:
Hello ***@***.***(https://github.com/philipobenito), is there anything how we can help to get this pull request merged? I would like to use route specific vars in a Middleware and i think this is the one big missing part of this router, to make it completly middleware ready 🙂
Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#250?email_source=notifications&email_token=AAP3E2NQTDTY5VCJEYAPPB3RBMMPJA5CNFSM4IDWWPX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEK4Z5AQ#issuecomment-582590082), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AAP3E2JLXSIAJB6UTFXLSU3RBMMPJANCNFSM4IDWWPXQ).
|
tests/DispatchIntegrationTest.php
Outdated
@@ -19,7 +19,7 @@ class DispatchIntegrationTest extends TestCase | |||
* | |||
* @return void | |||
*/ | |||
public function testDispatchesFoundRoute(): void | |||
/* public function testDispatchesFoundRoute(): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh! let me sort that just now!! apologies
src/Dispatcher.php
Outdated
* @param Route $route | ||
* @return ServerRequestInterface | ||
*/ | ||
private function requestWithRouteAttributes(ServerRequestInterface $request, Route $route): ServerRequestInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protected
please
break; | ||
} | ||
|
||
return $this->handle($request); | ||
} | ||
|
||
/** | ||
* @param ServerRequestInterface $request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please format doc comments in line with others
I'll look at getting these merged and released at some point today or tomorrow 👍 |
I’ll get to these next week, had some personal stuff going on so got myself behind on things
Sent from ProtonMail Mobile
…On Wed, May 13, 2020 at 17:46, Derek Stephen McLean ***@***.***> wrote:
***@***.***(https://github.com/delboy1978uk) requested your review on: [#250](#250) Add routing params to request query params for middleware usage.
—
You are receiving this because your review was requested.
Reply to this email directly, [view it on GitHub](#250 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AAP3E2PY2B6E5YFBBNX6M7LRRLFGBANCNFSM4IDWWPXQ).
|
As per issue here #249