Skip to content
Discussion options

You must be logged in to vote

Here is how to handle it:

    // use this if the value comes from route placeholders or custom attributes
    $value = $request->attributes->get('some_key');

    // use this for GET query parameters
    $value = $request->query->get('some_key');

    // use this for POST-submitted data
    $value = $request->request->get('some_key');

as per:
https://symfony.com/blog/new-in-symfony-7-4-request-class-improvements

Replies: 10 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mariopro
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #57962 on December 02, 2025 02:29.