From 0af354f60a856f1178c91eefbc62b29fc2f7c208 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 26 Jul 2014 21:54:19 +0200 Subject: [PATCH 01/13] fix parent form types The parent type of both the email type and the textarea type is not the form type but instead the text type. --- reference/forms/types/email.rst | 2 +- reference/forms/types/textarea.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/forms/types/email.rst b/reference/forms/types/email.rst index 33908563a9a..b27a919db92 100644 --- a/reference/forms/types/email.rst +++ b/reference/forms/types/email.rst @@ -23,7 +23,7 @@ The ``email`` field is a text field that is rendered using the HTML5 | | - `error_mapping`_ | | | - `mapped`_ | +-------------+---------------------------------------------------------------------+ -| Parent type | :doc:`form ` | +| Parent type | :doc:`text ` | +-------------+---------------------------------------------------------------------+ | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\EmailType` | +-------------+---------------------------------------------------------------------+ diff --git a/reference/forms/types/textarea.rst b/reference/forms/types/textarea.rst index da27d4e9efb..19e65434c57 100644 --- a/reference/forms/types/textarea.rst +++ b/reference/forms/types/textarea.rst @@ -22,7 +22,7 @@ Renders a ``textarea`` HTML element. | | - `error_mapping`_ | | | - `mapped`_ | +-------------+------------------------------------------------------------------------+ -| Parent type | :doc:`form ` | +| Parent type | :doc:`text ` | +-------------+------------------------------------------------------------------------+ | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\TextareaType` | +-------------+------------------------------------------------------------------------+ From 646a00c6b683ef88e74f4064fafd206239e718c9 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 30 Jul 2014 08:52:32 +0200 Subject: [PATCH 02/13] Added a note about permissions in the Quick Tour --- quick_tour/the_big_picture.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/quick_tour/the_big_picture.rst b/quick_tour/the_big_picture.rst index 25ea4597693..b0e6f994283 100644 --- a/quick_tour/the_big_picture.rst +++ b/quick_tour/the_big_picture.rst @@ -89,6 +89,14 @@ main concepts. Go to the following URL to be greeted by Symfony2 (replace .. image:: /images/quick_tour/hello_fabien.png :align: center +.. note:: + + Instead of the greeting page, you may see a blank or error page. This is + caused by a directory permission misconfiguration. There are several possible + solutions depending on your operating system. Check out them all in the + :doc:`installation chapter ` + of the official book. + What's going on here? Have a look at each part of the URL: * ``app_dev.php``: This is a :term:`front controller`. It is the unique entry From 93b457e13d28e83b4a544dc1176744ffb282c738 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 30 Jul 2014 09:54:50 +0200 Subject: [PATCH 03/13] Fixed a wrong documentation reference (thanks @WouterJ) --- quick_tour/the_big_picture.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/quick_tour/the_big_picture.rst b/quick_tour/the_big_picture.rst index b0e6f994283..6fc64b29fef 100644 --- a/quick_tour/the_big_picture.rst +++ b/quick_tour/the_big_picture.rst @@ -93,9 +93,8 @@ main concepts. Go to the following URL to be greeted by Symfony2 (replace Instead of the greeting page, you may see a blank or error page. This is caused by a directory permission misconfiguration. There are several possible - solutions depending on your operating system. Check out them all in the - :doc:`installation chapter ` - of the official book. + solutions depending on your operating system. All of them are explained in + the :ref:`book-installation-permission` section of the official book. What's going on here? Have a look at each part of the URL: From bed26023274fa21f94461b4283c9825ebeba7335 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 30 Jul 2014 11:33:50 +0200 Subject: [PATCH 04/13] Minor rewording and fixed one reference --- quick_tour/the_big_picture.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/quick_tour/the_big_picture.rst b/quick_tour/the_big_picture.rst index 6fc64b29fef..80ed368ac68 100644 --- a/quick_tour/the_big_picture.rst +++ b/quick_tour/the_big_picture.rst @@ -91,10 +91,11 @@ main concepts. Go to the following URL to be greeted by Symfony2 (replace .. note:: - Instead of the greeting page, you may see a blank or error page. This is - caused by a directory permission misconfiguration. There are several possible - solutions depending on your operating system. All of them are explained in - the :ref:`book-installation-permission` section of the official book. + Instead of the greeting page, you may see a blank page or an error page. + This is caused by a directory permission misconfiguration. There are several + possible solutions depending on your operating system. All of them are + explained in the :ref:`book-installation-permissions` section of the + official book. What's going on here? Have a look at each part of the URL: From b6f921bfbb15b77bb0dfd1c1834d2562e947efe7 Mon Sep 17 00:00:00 2001 From: Wouter J Date: Wed, 30 Jul 2014 20:28:33 +0200 Subject: [PATCH 05/13] Reworded bundle requirement --- cookbook/security/entity_provider.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cookbook/security/entity_provider.rst b/cookbook/security/entity_provider.rst index 80e0b08270b..50783171908 100644 --- a/cookbook/security/entity_provider.rst +++ b/cookbook/security/entity_provider.rst @@ -25,8 +25,14 @@ Finally, the tutorial will demonstrate how to create a custom :class:`Symfony\\Bridge\\Doctrine\\Security\\User\\EntityUserProvider` object to retrieve users from a database with custom conditions. -This tutorial assumes there is a bootstrapped and loaded -``Acme\UserBundle`` bundle in the application kernel. +.. sidebar:: Code along with the Example + + If you want to follow along with the example in this chapter, create + an AcmeUserBundle via: + + .. code-block:: bash + + $ php app/console generate:bundle --namespace=Acme/UserBundle The Data Model -------------- From 891e9d13763b4eeebe73e9f02686d57a952b7016 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 31 Jul 2014 09:56:40 +0200 Subject: [PATCH 06/13] Fixed (again) a minor typo: Toolbet --> Toolbelt --- cookbook/deployment/heroku.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cookbook/deployment/heroku.rst b/cookbook/deployment/heroku.rst index 42a79292f13..22370e8152b 100644 --- a/cookbook/deployment/heroku.rst +++ b/cookbook/deployment/heroku.rst @@ -12,7 +12,7 @@ Setting up ---------- To setup a new Heroku website, first `signup with Heroku`_ or sign in -with your credentials. Then download and install the `Heroku Toolbet`_ on your +with your credentials. Then download and install the `Heroku Toolbelt`_ on your local computer. You can also check out the `getting Started with PHP on Heroku`_ guide to gain @@ -188,8 +188,8 @@ You should be seeing your Symfony2 application in your browser. .. _`the original article`: https://devcenter.heroku.com/articles/getting-started-with-symfony2 .. _`signup with Heroku`: https://signup.heroku.com/signup/dc -.. _`Heroku Toolbet`: https://devcenter.heroku.com/articles/getting-started-with-php#local-workstation-setup -.. _`getting Started with PHP on Heroku`: .. _`Heroku Toolbet`: https://devcenter.heroku.com/articles/getting-started-with-php +.. _`Heroku Toolbelt`: https://devcenter.heroku.com/articles/getting-started-with-php#local-workstation-setup +.. _`getting Started with PHP on Heroku`: https://devcenter.heroku.com/articles/getting-started-with-php .. _`ephemeral file system`: https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem .. _`Logplex`: https://devcenter.heroku.com/articles/logplex .. _`verified that the RSA key fingerprint is correct`: https://devcenter.heroku.com/articles/git-repository-ssh-fingerprints From 141cf5ef079a967f3c57634d82385effb39ace82 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 31 Jul 2014 12:27:33 +0200 Subject: [PATCH 07/13] Added the missing title for a reference --- quick_tour/the_big_picture.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quick_tour/the_big_picture.rst b/quick_tour/the_big_picture.rst index 80ed368ac68..7922ffdda7e 100644 --- a/quick_tour/the_big_picture.rst +++ b/quick_tour/the_big_picture.rst @@ -94,8 +94,8 @@ main concepts. Go to the following URL to be greeted by Symfony2 (replace Instead of the greeting page, you may see a blank page or an error page. This is caused by a directory permission misconfiguration. There are several possible solutions depending on your operating system. All of them are - explained in the :ref:`book-installation-permissions` section of the - official book. + explained in the :ref:`Setting up Permissions ` + section of the official book. What's going on here? Have a look at each part of the URL: From 9eb911786f09fbc3d7f4adf1835cf0acb7e8362e Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 14 Jul 2014 20:17:32 +0200 Subject: [PATCH 08/13] usage of a non-default entity manager in an entity user provider The cookbook on entity user providers for the Security component only describes how to create an entity provider using the default entity manager. This may not be sufficient enough if you have multiple entity managers and therefore be eplicit with the entity manager to use in the user provider. --- cookbook/security/entity_provider.rst | 63 +++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/cookbook/security/entity_provider.rst b/cookbook/security/entity_provider.rst index 80e0b08270b..40f88eb2bae 100644 --- a/cookbook/security/entity_provider.rst +++ b/cookbook/security/entity_provider.rst @@ -358,6 +358,69 @@ entity user provider to load User entity objects from the database by using the ``username`` unique field. In other words, this tells Symfony how to fetch the user from the database before checking the password validity. +.. note:: + + By default, the entity provider uses the default entity manager to fetch + user information from the database. If you, + :doc:`use multiple entity managers `, + you can specify which manager to use with the ``manager_name`` option: + + .. configuration-block:: + + .. code-block:: yaml + + # app/config/config.yml + security: + # ... + + providers: + administrators: + entity: + class: AcmeUserBundle:User + property: username + manager_name: customer + + # ... + + .. code-block:: xml + + + + + + + + + + + + + + + + .. code-block:: php + + // app/config/config.php + $container->loadFromExtension('security', array( + // ... + 'providers' => array( + 'administrator' => array( + 'entity' => array( + 'class' => 'AcmeUserBundle:User', + 'property' => 'username', + 'manager_name' => 'customer', + ), + ), + ), + // ... + )); + Forbid inactive Users --------------------- From 03990aeb41e6b1fa39196c22a12ab1f7fc2c26e9 Mon Sep 17 00:00:00 2001 From: timothymctim Date: Thu, 31 Jul 2014 22:05:44 +0200 Subject: [PATCH 09/13] Fixed typo in the yml validation The `Valid` property should be added to `Acme\HelloBundle\Entity\Author` instead of `Acme\HelloBundle\Author`. --- reference/constraints/Valid.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/constraints/Valid.rst b/reference/constraints/Valid.rst index 635f0bddfd2..1ba69a9262d 100644 --- a/reference/constraints/Valid.rst +++ b/reference/constraints/Valid.rst @@ -194,7 +194,7 @@ property. .. code-block:: yaml # src/Acme/HelloBundle/Resources/config/validation.yml - Acme\HelloBundle\Author: + Acme\HelloBundle\Entity\Author: properties: address: - Valid: ~ From 82d2903d94d310d2d738857c32d25bb0778fdac1 Mon Sep 17 00:00:00 2001 From: kohkimakimoto Date: Fri, 1 Aug 2014 12:08:56 +0900 Subject: [PATCH 10/13] Fixed typo in filesystem component --- components/filesystem.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/filesystem.rst b/components/filesystem.rst index 96dd7c2ba9b..16e7d27bab2 100644 --- a/components/filesystem.rst +++ b/components/filesystem.rst @@ -207,7 +207,7 @@ the relative path of a directory given another one:: '/var/lib/symfony/src/Symfony/', '/var/lib/symfony/src/Symfony/Component' ); - // returns 'videos' + // returns 'videos/' $fs->makePathRelative('/tmp/videos', '/tmp') mirror From ef1efd57e036b962b079e7adc5811f48ba573298 Mon Sep 17 00:00:00 2001 From: Sarah KHALIL Date: Tue, 29 Jul 2014 14:01:23 +0200 Subject: [PATCH 11/13] Fixed typo on tag service --- book/forms.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/book/forms.rst b/book/forms.rst index 1ace0e51b8b..bef2e0e92e5 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -1125,11 +1125,12 @@ easy to use in your application. + - - + + + .. code-block:: php From 5f2b63217715108e91f480d932001fea94186c31 Mon Sep 17 00:00:00 2001 From: Joel Doyle Date: Tue, 29 Jul 2014 16:23:28 -0400 Subject: [PATCH 12/13] Update inherit_data_option.rst --- cookbook/form/inherit_data_option.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cookbook/form/inherit_data_option.rst b/cookbook/form/inherit_data_option.rst index ee46305be2b..513f887e940 100644 --- a/cookbook/form/inherit_data_option.rst +++ b/cookbook/form/inherit_data_option.rst @@ -154,3 +154,7 @@ Finally, make this work by adding the location form to your two original forms:: That's it! You have extracted duplicated field definitions to a separate location form that you can reuse wherever you need it. + +.. note:: + + Forms with the "inherit_data" option set cannot have *_SET_DATA event listeners. From 8d103e14c8adfdf34e01cff0213dffc89e89d6b7 Mon Sep 17 00:00:00 2001 From: Joel Doyle Date: Wed, 30 Jul 2014 10:58:32 -0400 Subject: [PATCH 13/13] Updated styling of my edit --- cookbook/form/inherit_data_option.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/form/inherit_data_option.rst b/cookbook/form/inherit_data_option.rst index 513f887e940..75db174ea3e 100644 --- a/cookbook/form/inherit_data_option.rst +++ b/cookbook/form/inherit_data_option.rst @@ -155,6 +155,6 @@ Finally, make this work by adding the location form to your two original forms:: That's it! You have extracted duplicated field definitions to a separate location form that you can reuse wherever you need it. -.. note:: +.. caution:: - Forms with the "inherit_data" option set cannot have *_SET_DATA event listeners. + Forms with the ``inherit_data`` option set cannot have ``*_SET_DATA`` event listeners.