-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Work attribute MapQueryParameter
with UidValueResolver
#51618
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
Comments
MapQueryParameter
with UidValueResolver
Thank you for this suggestion. |
Friendly ping? Should this still be open? I will close if I don't hear anything. |
Hey, I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen! |
yes, this is still a valid request |
Would you like to give it a try? |
I would also be interested in a PR. We should take an example from the following PR : #51004 Should we modify the |
@pilot114 Do you feel capable of doing PR? |
…seb-jean) This PR was squashed before being merged into the 7.3 branch. Discussion ---------- [HttpKernel] Support `Uid` in `#[MapQueryParameter]` | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | Fix #51618 | License | MIT I added support `Uid` in `#[MapQueryParameter]`. To use it, you must do this: ```php #[Route(path: '/', name: 'user_show')] public function indexAction( #[MapQueryParameter] ?Ulid $groupId = null, ) ``` Commits ------- 9fd614a [HttpKernel] Support `Uid` in `#[MapQueryParameter]`
Description
Currently, UidValueResolver only works with request attributes. However, the MapQueryParameter accepts a "resolver" parameter, which means you can flexibly bind query parameters with different resolvers.
In general, it is possible that the problem is somewhat broader: resolvers could work on all attributes where "resolver" parameter passing is possible. At least within the package http-kernel
Example
It would be great if the following combination would work:
#[MapQueryParameter(resolver: UidValueResolver::class)] ?Uuid $groupId = null
The text was updated successfully, but these errors were encountered: