From ede42dada6552b4f5ee69ebaecc477c1e73d881d Mon Sep 17 00:00:00 2001 From: Dorozhko Anton Date: Fri, 16 Oct 2015 13:06:07 +0600 Subject: [PATCH 1/9] Fix typo in UserType class delete extra ';' --- cookbook/doctrine/registration_form.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/doctrine/registration_form.rst b/cookbook/doctrine/registration_form.rst index 956026248c1..47e6873b008 100644 --- a/cookbook/doctrine/registration_form.rst +++ b/cookbook/doctrine/registration_form.rst @@ -163,8 +163,8 @@ Next, create the form for the ``User`` entity:: public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('email', 'email'); - ->add('username', 'text'); + ->add('email', 'email') + ->add('username', 'text') ->add('plainPassword', 'repeated', array( 'type' => 'password', 'first_options' => array('label' => 'Password'), From a4b7207f3618cd563b72418aa501a391cee4b90c Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Sat, 17 Oct 2015 12:34:59 +0200 Subject: [PATCH 2/9] fix use statement --- cookbook/doctrine/registration_form.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/doctrine/registration_form.rst b/cookbook/doctrine/registration_form.rst index 47e6873b008..b8b74b8d11f 100644 --- a/cookbook/doctrine/registration_form.rst +++ b/cookbook/doctrine/registration_form.rst @@ -375,7 +375,7 @@ option to ``false``:: // src/AppBundle/Form/UserType.php // ... - use Symfony\\Component\\Validator\\Constraints\\IsTrue; + use Symfony\Component\Validator\Constraints\IsTrue; class UserType extends AbstractType { From 91cb3a0fa15ee99b6a967338bdbd6785372008d0 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 16 Oct 2015 08:58:52 +0200 Subject: [PATCH 3/9] Minor tweaks for the registration form article --- cookbook/doctrine/registration_form.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cookbook/doctrine/registration_form.rst b/cookbook/doctrine/registration_form.rst index 956026248c1..b1d76ad4f54 100644 --- a/cookbook/doctrine/registration_form.rst +++ b/cookbook/doctrine/registration_form.rst @@ -28,10 +28,10 @@ Your ``User`` entity will probably at least have the following fields: A nice piece of information to collect. You can also allow users to :ref:`login via email `. -* ``password`` +``password`` The encoded password. -* ``plainPassword`` +``plainPassword`` This field is *not* persisted: (notice no ``@ORM\Column`` above it). It temporarily stores the plain password from the registration form. This field can be validated then used to populate the ``password`` field. @@ -49,7 +49,7 @@ With some validation added, your class may look something like this:: /** * @ORM\Entity * @UniqueEntity(fields="email", message="Email already taken") - * @UniqueEntity(fields="username", message="Username already taken") + * @UniqueEntity(fields="username", message="Username already taken") */ class User implements UserInterface { @@ -253,7 +253,7 @@ controller for displaying the registration form:: If you decide to NOT use annotation routing (shown above), then you'll need to create a route to this controller: - + .. configuration-block:: .. code-block:: yaml @@ -296,7 +296,7 @@ Next, create the template: .. code-block:: html+jinja {# app/Resources/views/registration/register.html.twig #} - + {{ form_start(form) }} {{ form_row('form.username') }} {{ form_row('form.email') }} @@ -305,7 +305,7 @@ Next, create the template: {{ form_end(form) }} - + .. code-block:: html+php @@ -370,8 +370,8 @@ registration form. The only trick is that you want to add this field to your for without adding an unnecessary new ``termsAccepted`` property to your ``User`` entity that you'll never need. -To do this, add a ``termsAccepted`` field to your form, but set its :ref:`mapped ` -option to ``false``:: +To do this, add a ``termsAccepted`` field to your form, but set its +:ref:`mapped ` option to ``false``:: // src/AppBundle/Form/UserType.php // ... From 1615efd45db87946341bf03310fd65f204345939 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Sat, 17 Oct 2015 12:10:09 +0200 Subject: [PATCH 4/9] make file path consitent with other articles --- book/forms.rst | 8 ++++---- book/validation.rst | 2 +- reference/constraints/UniqueEntity.rst | 5 ++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/book/forms.rst b/book/forms.rst index 8aaf2848978..38534bfadbf 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -354,7 +354,7 @@ object. .. code-block:: php-annotations - // AppBundle/Entity/Task.php + // src/AppBundle/Entity/Task.php use Symfony\Component\Validator\Constraints as Assert; class Task @@ -373,7 +373,7 @@ object. .. code-block:: yaml - # AppBundle/Resources/config/validation.yml + # src/AppBundle/Resources/config/validation.yml AppBundle\Entity\Task: properties: task: @@ -384,7 +384,7 @@ object. .. code-block:: xml - + Date: Sun, 18 Oct 2015 23:39:15 +0200 Subject: [PATCH 5/9] [#5799] add namespace --- book/forms.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/book/forms.rst b/book/forms.rst index 38534bfadbf..e88b08a0c99 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -355,6 +355,8 @@ object. .. code-block:: php-annotations // src/AppBundle/Entity/Task.php + namespace AppBundle\Entity; + use Symfony\Component\Validator\Constraints as Assert; class Task From c5859dab76e6d85857556336c3e18dc5fec447b3 Mon Sep 17 00:00:00 2001 From: Jose Diaz Date: Tue, 13 Oct 2015 10:53:15 +0100 Subject: [PATCH 6/9] Add fe80::1 Same reason as in https://github.com/symfony/symfony-standard/blob/2.8/web/app_dev.php#L15 --- cookbook/security/access_control.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/security/access_control.rst b/cookbook/security/access_control.rst index 07ea923651b..1ca5d6b585c 100644 --- a/cookbook/security/access_control.rst +++ b/cookbook/security/access_control.rst @@ -176,7 +176,7 @@ pattern so that it is only accessible by requests from the local server itself: # ... access_control: # - - { path: ^/internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] } + - { path: ^/internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, fe80::1, ::1] } - { path: ^/internal, roles: ROLE_NO_ACCESS } .. code-block:: xml From 0ea34918b42898f94bbd428cc522444cbb55fa99 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 18 Oct 2015 23:51:23 +0200 Subject: [PATCH 7/9] [#5784] add missing fe80::1 --- cookbook/configuration/environments.rst | 2 +- cookbook/security/access_control.rst | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cookbook/configuration/environments.rst b/cookbook/configuration/environments.rst index 4f40b9d3d2d..a7b3ac22ba3 100644 --- a/cookbook/configuration/environments.rst +++ b/cookbook/configuration/environments.rst @@ -328,7 +328,7 @@ The new environment is now accessible via:: aren't accessible, the front controller is usually protected from external IP addresses via the following code at the top of the controller:: - if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1'))) { + if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1'))) { die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); } diff --git a/cookbook/security/access_control.rst b/cookbook/security/access_control.rst index 1ca5d6b585c..ecc177e7a50 100644 --- a/cookbook/security/access_control.rst +++ b/cookbook/security/access_control.rst @@ -193,7 +193,7 @@ pattern so that it is only accessible by requests from the local server itself: @@ -209,7 +209,7 @@ pattern so that it is only accessible by requests from the local server itself: array( 'path' => '^/internal', 'role' => 'IS_AUTHENTICATED_ANONYMOUSLY', - 'ips' => '127.0.0.1, ::1' + 'ips' => '127.0.0.1, fe80::1, ::1' ), array( 'path' => '^/internal', @@ -230,8 +230,8 @@ the external IP address ``10.0.0.1``: that does not match an existing role, it just serves as a trick to always deny access). -But if the same request comes from ``127.0.0.1`` or ``::1`` (the IPv6 loopback -address): +But if the same request comes from ``127.0.0.1``, ``::1`` (the IPv6 loopback +address) or ``fe80::1`` (the IPv6 link-local address): * Now, the first access control rule is enabled as both the ``path`` and the ``ip`` match: access is allowed as the user always has the From a216b8751d4f120d5856be1526e30f9151366d80 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 19 Oct 2015 17:05:56 +0200 Subject: [PATCH 8/9] Fixed a typo --- cookbook/security/voters.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/security/voters.rst b/cookbook/security/voters.rst index 3da6cd8253f..2d149398361 100644 --- a/cookbook/security/voters.rst +++ b/cookbook/security/voters.rst @@ -25,7 +25,7 @@ security context (i.e. the ``security.context`` service). Each one decides if the current user should have access to some resource. Ultimately, Symfony takes the responses from all voters and makes the final -decission (to allow or deny access to the resource) according to the strategy defined +decision (to allow or deny access to the resource) according to the strategy defined in the application, which can be: affirmative, consensus or unanimous. For more information take a look at @@ -207,7 +207,7 @@ and tag it with ``security.voter``: // app/config/services.php use Symfony\Component\DependencyInjection\Definition; - + $definition = new Definition('AppBundle\Security\Authorization\Voter\PostVoter'); $definition ->setPublic(false) From 065d28cc326dc75d7c5ee4a19e82bfbbe633a461 Mon Sep 17 00:00:00 2001 From: Benjamin Paap Date: Fri, 16 Oct 2015 19:36:09 +0200 Subject: [PATCH 9/9] Fix for #5783 I can confirm, that this is the only place where the `SplStorageObject` and its methods are referenced. --- components/dom_crawler.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/dom_crawler.rst b/components/dom_crawler.rst index 01f3f2aba40..8e356c3e95d 100644 --- a/components/dom_crawler.rst +++ b/components/dom_crawler.rst @@ -28,9 +28,8 @@ Usage The :class:`Symfony\\Component\\DomCrawler\\Crawler` class provides methods to query and manipulate HTML and XML documents. -An instance of the Crawler represents a set (:phpclass:`SplObjectStorage`) -of :phpclass:`DOMElement` objects, which are basically nodes that you can -traverse easily:: +An instance of the Crawler represents a set of :phpclass:`DOMElement` objects, +which are basically nodes that you can traverse easily:: use Symfony\Component\DomCrawler\Crawler;