From d5d68ab7ac958dfce473d260a8fed9dcf2434bfd Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 1 Dec 2015 10:26:48 +0100 Subject: [PATCH 1/3] move filename comment to the top of the code block --- cookbook/service_container/shared.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/service_container/shared.rst b/cookbook/service_container/shared.rst index 92844d1958f..62ef094f426 100644 --- a/cookbook/service_container/shared.rst +++ b/cookbook/service_container/shared.rst @@ -36,9 +36,9 @@ in your service definition: .. code-block:: php + // app/config/services.php use Symfony\Component\DependencyInjection\Definition; - // app/config/services.php $definition = new Definition('...'); $definition->setShared(false); From bc8293b98db852996c52f5f8c8be71b161d914cd Mon Sep 17 00:00:00 2001 From: Henry Snoek Date: Sat, 5 Dec 2015 10:38:23 +0100 Subject: [PATCH 2/3] mark deep option as deprecated --- reference/constraints/Valid.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/reference/constraints/Valid.rst b/reference/constraints/Valid.rst index cdda877c7bf..67ec4bc86a6 100644 --- a/reference/constraints/Valid.rst +++ b/reference/constraints/Valid.rst @@ -9,7 +9,7 @@ an object and all sub-objects associated with it. | Applies to | :ref:`property or method ` | +----------------+---------------------------------------------------------------------+ | Options | - `traverse`_ | -| | - `deep`_ | +| | - `deep`_ (deprecated as of 2.5) | | | - `payload`_ | +----------------+---------------------------------------------------------------------+ | Class | :class:`Symfony\\Component\\Validator\\Constraints\\Valid` | @@ -271,6 +271,12 @@ set to ``true``. deep ~~~~ +.. caution:: + + The ``deep`` option was deprecated in Symfony 2.5 and will be removed + in Symfony 3.0. When traversing arrays, nested arrays are always traversed. + When traversing nested objects, their traversal strategy is used. + **type**: ``boolean`` **default**: ``false`` If this constraint is applied to a property that holds an array of objects, From 1337b319962b17b73ed31afe97dd5a2ac7b33c30 Mon Sep 17 00:00:00 2001 From: Jeroen Seegers Date: Tue, 1 Dec 2015 20:13:58 +0100 Subject: [PATCH 3/3] Add caution when returning null from createToken() --- cookbook/security/api_key_authentication.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cookbook/security/api_key_authentication.rst b/cookbook/security/api_key_authentication.rst index f2e9fc7e824..745a5792830 100644 --- a/cookbook/security/api_key_authentication.rst +++ b/cookbook/security/api_key_authentication.rst @@ -109,6 +109,11 @@ will cause authentication to fail. You might want to return ``null`` instead to just skip the authentication, so Symfony can fallback to another authentication method, if any. +.. caution:: + + In case you return ``null`` from your ``createToken()`` method, be sure to enable + ``anonymous`` in you firewall. This way you'll be able to get an ``AnonymousToken``. + 2. supportsToken ~~~~~~~~~~~~~~~~