From 912a3c88cce28e1c43a1aab61ff49a3f064935d5 Mon Sep 17 00:00:00 2001 From: Victor Bocharsky Date: Fri, 18 Nov 2016 21:38:40 +0200 Subject: [PATCH 1/4] Acme\AppBundle => AppBundle --- doctrine/resolve_target_entity.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doctrine/resolve_target_entity.rst b/doctrine/resolve_target_entity.rst index e5fc217a8e6..56b461d505b 100644 --- a/doctrine/resolve_target_entity.rst +++ b/doctrine/resolve_target_entity.rst @@ -39,9 +39,9 @@ brevity) to explain how to set up and use the ``ResolveTargetEntityListener``. A Customer entity:: - // src/Acme/AppBundle/Entity/Customer.php + // src/AppBundle/Entity/Customer.php - namespace Acme\AppBundle\Entity; + namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Acme\CustomerBundle\Entity\Customer as BaseCustomer; @@ -118,7 +118,7 @@ about the replacement: orm: # ... resolve_target_entities: - Acme\InvoiceBundle\Model\InvoiceSubjectInterface: Acme\AppBundle\Entity\Customer + Acme\InvoiceBundle\Model\InvoiceSubjectInterface: AppBundle\Entity\Customer .. code-block:: xml @@ -132,7 +132,7 @@ about the replacement: - Acme\AppBundle\Entity\Customer + AppBundle\Entity\Customer @@ -144,7 +144,7 @@ about the replacement: 'orm' => array( // ... 'resolve_target_entities' => array( - 'Acme\InvoiceBundle\Model\InvoiceSubjectInterface' => 'Acme\AppBundle\Entity\Customer', + 'Acme\InvoiceBundle\Model\InvoiceSubjectInterface' => 'AppBundle\Entity\Customer', ), ), )); From 2fb3fddb59ac336dda8a037a4fa411f45a892fae Mon Sep 17 00:00:00 2001 From: Victor Bocharsky Date: Fri, 18 Nov 2016 22:18:14 +0200 Subject: [PATCH 2/4] Add missing parenthesis for method name --- doctrine/event_listeners_subscribers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doctrine/event_listeners_subscribers.rst b/doctrine/event_listeners_subscribers.rst index a2026e03543..028bfcea970 100644 --- a/doctrine/event_listeners_subscribers.rst +++ b/doctrine/event_listeners_subscribers.rst @@ -122,7 +122,7 @@ Creating the Listener Class In the previous example, a service ``my.listener`` was configured as a Doctrine listener on the event ``postPersist``. The class behind that service must have -a ``postPersist`` method, which will be called when the event is dispatched:: +a ``postPersist()`` method, which will be called when the event is dispatched:: // src/AppBundle/EventListener/SearchIndexer.php namespace AppBundle\EventListener; From d53ee184cc8dd0870804eeea650ca25805a1330c Mon Sep 17 00:00:00 2001 From: Victor Bocharsky Date: Fri, 18 Nov 2016 22:21:07 +0200 Subject: [PATCH 3/4] Add missing parenthesis for PHP function --- doctrine/mapping_model_classes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doctrine/mapping_model_classes.rst b/doctrine/mapping_model_classes.rst index acace8725f2..09df8940871 100644 --- a/doctrine/mapping_model_classes.rst +++ b/doctrine/mapping_model_classes.rst @@ -96,7 +96,7 @@ be adapted for your case:: } } -Note the :phpfunction:`class_exists` check. This is crucial, as you do not want your +Note the :phpfunction:`class_exists()` check. This is crucial, as you do not want your bundle to have a hard dependency on all Doctrine bundles but let the user decide which to use. From 3aa9d236762ba19fd94e70d637a56ed82cbc26ba Mon Sep 17 00:00:00 2001 From: Victor Bocharsky Date: Fri, 18 Nov 2016 22:26:27 +0200 Subject: [PATCH 4/4] Add missing method and fix coding styles --- doctrine/registration_form.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doctrine/registration_form.rst b/doctrine/registration_form.rst index feb929b4f8c..921a8ffa59f 100644 --- a/doctrine/registration_form.rst +++ b/doctrine/registration_form.rst @@ -120,6 +120,11 @@ With some validation added, your class may look something like this:: $this->plainPassword = $password; } + public function getPassword() + { + return $this->password; + } + public function setPassword($password) { $this->password = $password; @@ -180,8 +185,8 @@ Next, create the form for the ``User`` entity:: 'type' => 'password', 'first_options' => array('label' => 'Password'), 'second_options' => array('label' => 'Repeat Password'), - ) - ); + )) + ; } public function configureOptions(OptionsResolver $resolver)