From 4422c101a278e1cbe00e2cf5286f9fd3fde253af Mon Sep 17 00:00:00 2001 From: rs Date: Wed, 18 Feb 2015 21:29:10 +0100 Subject: [PATCH 1/3] tip for mapping definition If you follow the link from the security documentation (http://symfony.com/doc/current/book/security.html#loading-users-from-the-database), it's easy to miss the necessary mapping definition for the repository. --- cookbook/security/entity_provider.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cookbook/security/entity_provider.rst b/cookbook/security/entity_provider.rst index 98df1da6a69..3b545389b6a 100644 --- a/cookbook/security/entity_provider.rst +++ b/cookbook/security/entity_provider.rst @@ -583,6 +583,11 @@ The code below shows the implementation of the } } +.. tip:: + + Don't forget to + :ref: `add the repository class to the mapping definition of your entity `. + To finish the implementation, the configuration of the security layer must be changed to tell Symfony to use the new custom entity provider instead of the generic Doctrine entity provider. It's trivial to achieve by removing the From 38dcfc87e58d5866e69bcf9a38f1e2336aef5829 Mon Sep 17 00:00:00 2001 From: rs Date: Fri, 20 Feb 2015 12:06:26 +0100 Subject: [PATCH 2/3] fixed intendation and shortened the link --- cookbook/security/entity_provider.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/security/entity_provider.rst b/cookbook/security/entity_provider.rst index 3b545389b6a..b6ce0cfc676 100644 --- a/cookbook/security/entity_provider.rst +++ b/cookbook/security/entity_provider.rst @@ -585,8 +585,8 @@ The code below shows the implementation of the .. tip:: - Don't forget to - :ref: `add the repository class to the mapping definition of your entity `. + Don't forget to add the repository class to the mapping definition of + :ref: ` your entity `. To finish the implementation, the configuration of the security layer must be changed to tell Symfony to use the new custom entity provider instead of the From 7ae3a281a102e0152e5f404b52fa12be4d9ae55e Mon Sep 17 00:00:00 2001 From: rs Date: Fri, 20 Feb 2015 12:13:30 +0100 Subject: [PATCH 3/3] improved link --- cookbook/security/entity_provider.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/security/entity_provider.rst b/cookbook/security/entity_provider.rst index b6ce0cfc676..125f8d6a184 100644 --- a/cookbook/security/entity_provider.rst +++ b/cookbook/security/entity_provider.rst @@ -585,8 +585,8 @@ The code below shows the implementation of the .. tip:: - Don't forget to add the repository class to the mapping definition of - :ref: ` your entity `. + Don't forget to add the repository class to the + :ref: `mapping definition of your entity `. To finish the implementation, the configuration of the security layer must be changed to tell Symfony to use the new custom entity provider instead of the