From 6fa6d114596fe712168f37cd09eb7b29c92bcc1e Mon Sep 17 00:00:00 2001 From: Evgenij Efimov Date: Sun, 27 Dec 2015 17:22:12 +0300 Subject: [PATCH 1/2] Removed doc about getting original parameter value from ParameterBag --- components/http_foundation/introduction.rst | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/components/http_foundation/introduction.rst b/components/http_foundation/introduction.rst index 8b9073a1749..f4a65f4a9ee 100644 --- a/components/http_foundation/introduction.rst +++ b/components/http_foundation/introduction.rst @@ -151,11 +151,7 @@ exist:: When PHP imports the request query, it handles request parameters like ``foo[bar]=bar`` in a special way as it creates an array. So you can get the -``foo`` parameter and you will get back an array with a ``bar`` element. But -sometimes, you might want to get the value for the "original" parameter name: -``foo[bar]``. This is possible with all the ``ParameterBag`` getters like -:method:`Symfony\\Component\\HttpFoundation\\Request::get` via the third -argument:: +``foo`` parameter and you will get back an array with a ``bar`` element:: // the query string is '?foo[bar]=bar' @@ -165,8 +161,16 @@ argument:: $request->query->get('foo[bar]'); // returns null - $request->query->get('foo[bar]', null, true); - // returns 'bar' +.. versionadded:: 3.0 + It is no longer possible to get the value of "original" parameter ``foo[bar]``. + Prior, you were able to do this via the third argument of + :method:`Symfony\\Component\\HttpFoundation\\Request::get`: + + .. code-block:: php + + $request->query->get('foo[bar]', null, true); + // returns 'bar' + .. _component-foundation-attributes: From c1eb4f8f16d63c6ca03f47a1a8443eec6d4989fa Mon Sep 17 00:00:00 2001 From: Evgenij Efimov Date: Mon, 28 Dec 2015 20:29:09 +0300 Subject: [PATCH 2/2] Removed old behaviour note --- components/http_foundation/introduction.rst | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/components/http_foundation/introduction.rst b/components/http_foundation/introduction.rst index f4a65f4a9ee..6e66bbd7242 100644 --- a/components/http_foundation/introduction.rst +++ b/components/http_foundation/introduction.rst @@ -159,18 +159,7 @@ When PHP imports the request query, it handles request parameters like // returns array('bar' => 'bar') $request->query->get('foo[bar]'); - // returns null - -.. versionadded:: 3.0 - It is no longer possible to get the value of "original" parameter ``foo[bar]``. - Prior, you were able to do this via the third argument of - :method:`Symfony\\Component\\HttpFoundation\\Request::get`: - - .. code-block:: php - - $request->query->get('foo[bar]', null, true); - // returns 'bar' - + // returns null .. _component-foundation-attributes: