Skip to content

$request->query->get() can't return array anymore #15613

Closed
@ThomasTr

Description

@ThomasTr

According to the documentation here:
https://symfony.com/doc/current/components/http_foundation.html#accessing-request-data

// the query string is '?foo[bar]=baz'

$request->query->get('foo');
// returns ['bar' => 'baz']

$request->query->get() can return arrays, but since pull request 34363 arrays are no more supported.

I would like to replace the line

$request->query->get('foo');

with

$request->query->all()['foo'];

to hint how arrays can be accessed.
If it's ok, i can prepare a pull request.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions