Skip to content

Commit 103def9

Browse files
committed
Merge branch '2.3' into 2.7
2 parents 61efc58 + 71469ff commit 103def9

File tree

8 files changed

+29
-29
lines changed

8 files changed

+29
-29
lines changed

book/forms.rst

+6-4
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,9 @@ object.
354354

355355
.. code-block:: php-annotations
356356
357-
// AppBundle/Entity/Task.php
357+
// src/AppBundle/Entity/Task.php
358+
namespace AppBundle\Entity;
359+
358360
use Symfony\Component\Validator\Constraints as Assert;
359361
360362
class Task
@@ -373,7 +375,7 @@ object.
373375
374376
.. code-block:: yaml
375377
376-
# AppBundle/Resources/config/validation.yml
378+
# src/AppBundle/Resources/config/validation.yml
377379
AppBundle\Entity\Task:
378380
properties:
379381
task:
@@ -384,7 +386,7 @@ object.
384386
385387
.. code-block:: xml
386388
387-
<!-- AppBundle/Resources/config/validation.xml -->
389+
<!-- src/AppBundle/Resources/config/validation.xml -->
388390
<?xml version="1.0" encoding="UTF-8"?>
389391
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
390392
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -404,7 +406,7 @@ object.
404406
405407
.. code-block:: php
406408
407-
// AppBundle/Entity/Task.php
409+
// src/AppBundle/Entity/Task.php
408410
use Symfony\Component\Validator\Mapping\ClassMetadata;
409411
use Symfony\Component\Validator\Constraints\NotBlank;
410412
use Symfony\Component\Validator\Constraints\Type;

book/validation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ class to have at least 3 characters.
537537

538538
.. code-block:: php-annotations
539539
540-
// AppBundle/Entity/Author.php
540+
// src/AppBundle/Entity/Author.php
541541
542542
// ...
543543
use Symfony\Component\Validator\Constraints as Assert;

components/dom_crawler.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ Usage
2828
The :class:`Symfony\\Component\\DomCrawler\\Crawler` class provides methods
2929
to query and manipulate HTML and XML documents.
3030

31-
An instance of the Crawler represents a set (:phpclass:`SplObjectStorage`)
32-
of :phpclass:`DOMElement` objects, which are basically nodes that you can
33-
traverse easily::
31+
An instance of the Crawler represents a set of :phpclass:`DOMElement` objects,
32+
which are basically nodes that you can traverse easily::
3433

3534
use Symfony\Component\DomCrawler\Crawler;
3635

cookbook/configuration/environments.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ The new environment is now accessible via::
328328
aren't accessible, the front controller is usually protected from external
329329
IP addresses via the following code at the top of the controller::
330330

331-
if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1'))) {
331+
if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1'))) {
332332
die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
333333
}
334334

cookbook/doctrine/registration_form.rst

+11-11
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ Your ``User`` entity will probably at least have the following fields:
2828
A nice piece of information to collect. You can also allow users to
2929
:ref:`login via email <registration-form-via-email>`.
3030

31-
* ``password``
31+
``password``
3232
The encoded password.
3333

34-
* ``plainPassword``
34+
``plainPassword``
3535
This field is *not* persisted: (notice no ``@ORM\Column`` above it). It
3636
temporarily stores the plain password from the registration form. This field
3737
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::
4949
/**
5050
* @ORM\Entity
5151
* @UniqueEntity(fields="email", message="Email already taken")
52-
* @UniqueEntity(fields="username", message="Username already taken")
52+
* @UniqueEntity(fields="username", message="Username already taken")
5353
*/
5454
class User implements UserInterface
5555
{
@@ -163,8 +163,8 @@ Next, create the form for the ``User`` entity::
163163
public function buildForm(FormBuilderInterface $builder, array $options)
164164
{
165165
$builder
166-
->add('email', 'email');
167-
->add('username', 'text');
166+
->add('email', 'email')
167+
->add('username', 'text')
168168
->add('plainPassword', 'repeated', array(
169169
'type' => 'password',
170170
'first_options' => array('label' => 'Password'),
@@ -250,7 +250,7 @@ controller for displaying the registration form::
250250

251251
If you decide to NOT use annotation routing (shown above), then you'll
252252
need to create a route to this controller:
253-
253+
254254
.. configuration-block::
255255

256256
.. code-block:: yaml
@@ -293,7 +293,7 @@ Next, create the template:
293293
.. code-block:: html+jinja
294294

295295
{# app/Resources/views/registration/register.html.twig #}
296-
296+
297297
{{ form_start(form) }}
298298
{{ form_row('form.username') }}
299299
{{ form_row('form.email') }}
@@ -302,7 +302,7 @@ Next, create the template:
302302

303303
<button type="submit">Register!</button>
304304
{{ form_end(form) }}
305-
305+
306306
.. code-block:: html+php
307307

308308
<!-- app/Resources/views/registration/register.html.php -->
@@ -367,12 +367,12 @@ registration form. The only trick is that you want to add this field to your for
367367
without adding an unnecessary new ``termsAccepted`` property to your ``User`` entity
368368
that you'll never need.
369369

370-
To do this, add a ``termsAccepted`` field to your form, but set its :ref:`mapped <reference-form-option-mapped>`
371-
option to ``false``::
370+
To do this, add a ``termsAccepted`` field to your form, but set its
371+
:ref:`mapped <reference-form-option-mapped>` option to ``false``::
372372

373373
// src/AppBundle/Form/UserType.php
374374
// ...
375-
use Symfony\\Component\\Validator\\Constraints\\IsTrue;
375+
use Symfony\Component\Validator\Constraints\IsTrue;
376376

377377
class UserType extends AbstractType
378378
{

cookbook/security/access_control.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ pattern so that it is only accessible by requests from the local server itself:
178178
# ...
179179
access_control:
180180
#
181-
- { path: ^/internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
181+
- { path: ^/internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, fe80::1, ::1] }
182182
- { path: ^/internal, roles: ROLE_NO_ACCESS }
183183
184184
.. code-block:: xml
@@ -195,7 +195,7 @@ pattern so that it is only accessible by requests from the local server itself:
195195
<!-- ... -->
196196
<rule path="^/internal"
197197
role="IS_AUTHENTICATED_ANONYMOUSLY"
198-
ips="127.0.0.1, ::1"
198+
ips="127.0.0.1, fe80::1, ::1"
199199
/>
200200
201201
<rule path="^/internal" role="ROLE_NO_ACCESS" />
@@ -211,7 +211,7 @@ pattern so that it is only accessible by requests from the local server itself:
211211
array(
212212
'path' => '^/internal',
213213
'role' => 'IS_AUTHENTICATED_ANONYMOUSLY',
214-
'ips' => '127.0.0.1, ::1'
214+
'ips' => '127.0.0.1, fe80::1, ::1'
215215
),
216216
array(
217217
'path' => '^/internal',
@@ -232,8 +232,8 @@ the external IP address ``10.0.0.1``:
232232
that does not match an existing role, it just serves as a trick to always
233233
deny access).
234234

235-
But if the same request comes from ``127.0.0.1`` or ``::1`` (the IPv6 loopback
236-
address):
235+
But if the same request comes from ``127.0.0.1``, ``::1`` (the IPv6 loopback
236+
address) or ``fe80::1`` (the IPv6 link-local address):
237237

238238
* Now, the first access control rule is enabled as both the ``path`` and the
239239
``ip`` match: access is allowed as the user always has the

cookbook/security/voters.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ authorization checker (i.e. the ``security.authorization_checker`` service). Eac
2929
one decides if the current user should have access to some resource.
3030

3131
Ultimately, Symfony takes the responses from all voters and makes the final
32-
decission (to allow or deny access to the resource) according to the strategy defined
32+
decision (to allow or deny access to the resource) according to the strategy defined
3333
in the application, which can be: affirmative, consensus or unanimous.
3434

3535
For more information take a look at

reference/constraints/UniqueEntity.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ your user table:
3333

3434
.. code-block:: php-annotations
3535
36-
// AppBundle/Entity/Author.php
36+
// src/AppBundle/Entity/Author.php
3737
namespace AppBundle\Entity;
3838
3939
use Symfony\Component\Validator\Constraints as Assert;
@@ -89,8 +89,7 @@ your user table:
8989
9090
.. code-block:: php
9191
92-
93-
// AppBundle/Entity/User.php
92+
// src/AppBundle/Entity/User.php
9493
namespace AppBundle\Entity;
9594
9695
use Symfony\Component\Validator\Constraints as Assert;

0 commit comments

Comments
 (0)