Skip to content

Commit d7ae2a0

Browse files
committed
Merge branch '2.8'
2 parents 71d51f8 + e406c3b commit d7ae2a0

File tree

8 files changed

+29
-29
lines changed

8 files changed

+29
-29
lines changed

book/forms.rst

Lines changed: 6 additions & 4 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 11 additions & 11 deletions
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'),
@@ -245,7 +245,7 @@ controller for displaying the registration form::
245245

246246
If you decide to NOT use annotation routing (shown above), then you'll
247247
need to create a route to this controller:
248-
248+
249249
.. configuration-block::
250250

251251
.. code-block:: yaml
@@ -288,7 +288,7 @@ Next, create the template:
288288
.. code-block:: html+jinja
289289

290290
{# app/Resources/views/registration/register.html.twig #}
291-
291+
292292
{{ form_start(form) }}
293293
{{ form_row('form.username') }}
294294
{{ form_row('form.email') }}
@@ -297,7 +297,7 @@ Next, create the template:
297297

298298
<button type="submit">Register!</button>
299299
{{ form_end(form) }}
300-
300+
301301
.. code-block:: html+php
302302

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

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

368368
// src/AppBundle/Form/UserType.php
369369
// ...
370-
use Symfony\\Component\\Validator\\Constraints\\IsTrue;
370+
use Symfony\Component\Validator\Constraints\IsTrue;
371371

372372
class UserType extends AbstractType
373373
{

cookbook/security/access_control.rst

Lines changed: 5 additions & 5 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 3 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy