Skip to content

Commit 264aaf1

Browse files
committed
[HttpFoundation] Document HeaderUtils::parseQuery()
1 parent fcf2eba commit 264aaf1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

components/http_foundation.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,14 @@ this complexity and defines some methods for the most common tasks::
272272
HeaderUtils::unquote('"foo \"bar\""');
273273
// => 'foo "bar"'
274274

275+
// Parses a query string but maintains dots (PHP parse_str() replaces '.' by '_')
276+
HeaderUtils::parseQuery('foo[bar.baz]=qux');
277+
// => ['foo' => ['bar.baz' => 'qux']]
278+
279+
.. versionadded:: 5.2
280+
281+
The ``parseQuery()`` method was introduced in Symfony 5.2.
282+
275283
Accessing ``Accept-*`` Headers Data
276284
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
277285

0 commit comments

Comments
 (0)