Skip to content

Commit d6a17e7

Browse files
committed
Merge branch '2.3' into 2.4
2 parents fc28453 + 04cf9f8 commit d6a17e7

40 files changed

+247
-83
lines changed

book/controller.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ object that's returned from that controller::
475475
return $response;
476476
}
477477

478-
Notice that the `forward()` method uses the same string representation of
478+
Notice that the ``forward()`` method uses the same string representation of
479479
the controller used in the routing configuration. In this case, the target
480480
controller class will be ``HelloController`` inside some ``AcmeHelloBundle``.
481481
The array passed to the method becomes the arguments on the resulting controller.
@@ -794,7 +794,7 @@ The Request Object
794794
Besides the values of the routing placeholders, the controller also has access
795795
to the ``Request`` object. The framework injects the ``Request`` object in the
796796
controller if a variable is type-hinted with
797-
`Symfony\Component\HttpFoundation\Request`::
797+
:class:`Symfony\\Component\\HttpFoundation\\Request`::
798798

799799
use Symfony\Component\HttpFoundation\Request;
800800

book/forms.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ these cases you can set the ``validation_groups`` option to ``false``::
495495
Note that when you do that, the form will still run basic integrity checks,
496496
for example whether an uploaded file was too large or whether non-existing
497497
fields were submitted. If you want to suppress validation, you can use the
498-
:ref:`POST_SUBMIT event <cookbook-dynamic-form-modification-suppressing-form-validation>`
498+
:ref:`POST_SUBMIT event <cookbook-dynamic-form-modification-suppressing-form-validation>`.
499499

500500
.. index::
501501
single: Forms; Validation groups based on submitted data
@@ -1811,7 +1811,7 @@ an array.
18111811
18121812
$this->get('request')->request->get('name');
18131813
1814-
Be advised, however, that in most cases using the getData() method is
1814+
Be advised, however, that in most cases using the ``getData()`` method is
18151815
a better choice, since it returns the data (usually an object) after
18161816
it's been transformed by the form framework.
18171817
@@ -1853,7 +1853,7 @@ but here's a short example:
18531853
18541854
.. tip::
18551855
1856-
If you are using Validation Groups, you need to either reference the
1856+
If you are using validation groups, you need to either reference the
18571857
``Default`` group when creating the form, or set the correct group on
18581858
the constraint you are adding.
18591859
@@ -1891,7 +1891,7 @@ Learn more from the Cookbook
18911891
18921892
.. _`Symfony2 Form component`: https://github.com/symfony/Form
18931893
.. _`DateTime`: http://php.net/manual/en/class.datetime.php
1894-
.. _`Twig Bridge`: https://github.com/symfony/symfony/tree/2.2/src/Symfony/Bridge/Twig
1895-
.. _`form_div_layout.html.twig`: https://github.com/symfony/symfony/blob/2.2/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
1894+
.. _`Twig Bridge`: https://github.com/symfony/symfony/tree/2.3/src/Symfony/Bridge/Twig
1895+
.. _`form_div_layout.html.twig`: https://github.com/symfony/symfony/blob/2.3/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
18961896
.. _`Cross-site request forgery`: http://en.wikipedia.org/wiki/Cross-site_request_forgery
1897-
.. _`view on GitHub`: https://github.com/symfony/symfony/tree/2.2/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form
1897+
.. _`view on GitHub`: https://github.com/symfony/symfony/tree/2.3/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form

book/security.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ authentication (i.e. the old-school username/password box):
5151
realm: "Secured Demo Area"
5252
5353
access_control:
54-
- { path: ^/admin, roles: ROLE_ADMIN }
54+
- { path: ^/admin/, roles: ROLE_ADMIN }
55+
# Include the following line to also secure the /admin path itself
56+
# - { path: ^/admin$, roles: ROLE_ADMIN }
5557
5658
providers:
5759
in_memory:
@@ -79,7 +81,9 @@ authentication (i.e. the old-school username/password box):
7981
</firewall>
8082
8183
<access-control>
82-
<rule path="^/admin" role="ROLE_ADMIN" />
84+
<rule path="^/admin/" role="ROLE_ADMIN" />
85+
<!-- Include the following line to also secure the /admin path itself -->
86+
<!-- <rule path="^/admin$" role="ROLE_ADMIN" /> -->
8387
</access-control>
8488
8589
<provider name="in_memory">
@@ -108,7 +112,9 @@ authentication (i.e. the old-school username/password box):
108112
),
109113
),
110114
'access_control' => array(
111-
array('path' => '^/admin', 'role' => 'ROLE_ADMIN'),
115+
array('path' => '^/admin/', 'role' => 'ROLE_ADMIN'),
116+
// Include the following line to also secure the /admin path itself
117+
// array('path' => '^/admin$', 'role' => 'ROLE_ADMIN'),
112118
),
113119
'providers' => array(
114120
'in_memory' => array(

book/service_container.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,12 +1146,10 @@ with ``twig.extension`` and automatically registers them as extensions.
11461146
Tags, then, are a way to tell Symfony2 or other third-party bundles that
11471147
your service should be registered or used in some special way by the bundle.
11481148

1149-
The following is a list of tags available with the core Symfony2 bundles.
1150-
Each of these has a different effect on your service and many tags require
1151-
additional arguments (beyond just the ``name`` parameter).
1152-
11531149
For a list of all the tags available in the core Symfony Framework, check
1154-
out :doc:`/reference/dic_tags`.
1150+
out :doc:`/reference/dic_tags`. Each of these has a different effect on your
1151+
service and many tags require additional arguments (beyond just the ``name``
1152+
parameter).
11551153

11561154
Debugging Services
11571155
------------------

book/templating.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,14 +1036,14 @@ stylesheets and JavaScripts that you'll need throughout your site:
10361036
{# ... #}
10371037

10381038
{% block stylesheets %}
1039-
<link href="{{ asset('/css/main.css') }}" rel="stylesheet" />
1039+
<link href="{{ asset('css/main.css') }}" rel="stylesheet" />
10401040
{% endblock %}
10411041
</head>
10421042
<body>
10431043
{# ... #}
10441044

10451045
{% block javascripts %}
1046-
<script src="{{ asset('/js/main.js') }}"></script>
1046+
<script src="{{ asset('js/main.js') }}"></script>
10471047
{% endblock %}
10481048
</body>
10491049
</html>
@@ -1061,7 +1061,7 @@ page. From inside that contact page's template, do the following:
10611061
{% block stylesheets %}
10621062
{{ parent() }}
10631063

1064-
<link href="{{ asset('/css/contact.css') }}" rel="stylesheet" />
1064+
<link href="{{ asset('css/contact.css') }}" rel="stylesheet" />
10651065
{% endblock %}
10661066

10671067
{# ... #}
@@ -1326,7 +1326,7 @@ covered:
13261326
{% endfor %}
13271327
{% endblock %}
13281328

1329-
Notice that this template extends the section template -(``AcmeBlogBundle::layout.html.twig``)
1329+
Notice that this template extends the section template (``AcmeBlogBundle::layout.html.twig``)
13301330
which in-turn extends the base application layout (``::base.html.twig``).
13311331
This is the common three-level inheritance model.
13321332

book/translation.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,8 @@ use somewhere in your application::
546546
}
547547

548548
Add constraints though any of the supported methods. Set the message option to the
549-
translation source text. For example, to guarantee that the $name property is not
550-
empty, add the following:
549+
translation source text. For example, to guarantee that the ``$name`` property is
550+
not empty, add the following:
551551

552552
.. configuration-block::
553553

@@ -646,8 +646,8 @@ Translating Database Content
646646
----------------------------
647647

648648
The translation of database content should be handled by Doctrine through
649-
the `Translatable Extension`_. For more information, see the documentation
650-
for that library.
649+
the `Translatable Extension`_ or the `Translatable Bahavior`_ (PHP 5.4+).
650+
For more information, see the documentation for thes libraries.
651651

652652
Summary
653653
-------
@@ -672,3 +672,4 @@ steps:
672672
.. _`ISO 3166-1 alpha-2`: http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
673673
.. _`ISO 639-1`: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
674674
.. _`Translatable Extension`: https://github.com/l3pp4rd/DoctrineExtensions
675+
.. _`Translatable Bahavior`: https://github.com/KnpLabs/DoctrineBehaviors

book/validation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -985,9 +985,9 @@ entity and a new constraint group called ``Premium``:
985985
Acme\DemoBundle\Entity\User:
986986
properties:
987987
name:
988-
- NotBlank
988+
- NotBlank: ~
989989
creditCard:
990-
- CardScheme
990+
- CardScheme:
991991
schemes: [VISA]
992992
groups: [Premium]
993993

components/console/helpers/dialoghelper.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ from the command line, you need to overwrite the HelperSet used by the command::
277277
return $stream;
278278
}
279279

280-
By setting the inputStream of the ``DialogHelper``, you imitate what the
280+
By setting the input stream of the ``DialogHelper``, you imitate what the
281281
console would do internally with all user input through the cli. This way
282282
you can test any user interaction (even complex ones) by passing an appropriate
283283
input stream.

components/console/helpers/tablehelper.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ When building a console application it may be useful to display tabular data:
1111

1212
.. image:: /images/components/console/table.png
1313

14-
To display table, use the :class:`Symfony\\Component\\Console\\Helper\\TableHelper`,
14+
To display a table, use the :class:`Symfony\\Component\\Console\\Helper\\TableHelper`,
1515
set headers, rows and render::
1616

1717
$table = $app->getHelperSet()->get('table');

components/console/introduction.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ verbosity levels::
225225
}
226226

227227
When the quiet level is used, all output is suppressed as the default
228-
:method:`Symfony\Component\Console\Output::write <Symfony\\Component\\Console\\Output\\Output::write>`
229-
method returns without actually printing.
228+
:method:`Symfony\\Component\\Console\\Output\\Output::write` method returns
229+
without actually printing.
230230

231231
.. tip::
232232

@@ -321,13 +321,13 @@ Unlike arguments, options are not ordered (meaning you can specify them in any
321321
order) and are specified with two dashes (e.g. ``--yell`` - you can also
322322
declare a one-letter shortcut that you can call with a single dash like
323323
``-y``). Options are *always* optional, and can be setup to accept a value
324-
(e.g. ``dir=src``) or simply as a boolean flag without a value (e.g.
325-
``yell``).
324+
(e.g. ``--dir=src``) or simply as a boolean flag without a value (e.g.
325+
``--yell``).
326326

327327
.. tip::
328328

329329
It is also possible to make an option *optionally* accept a value (so that
330-
``--yell`` or ``yell=loud`` work). Options can also be configured to
330+
``--yell`` or ``--yell=loud`` work). Options can also be configured to
331331
accept an array of values.
332332

333333
For example, add a new option to the command that can be used to specify
@@ -379,7 +379,7 @@ Option Value
379379
InputOption::VALUE_IS_ARRAY This option accepts multiple values (e.g. ``--dir=/foo --dir=/bar``)
380380
InputOption::VALUE_NONE Do not accept input for this option (e.g. ``--yell``)
381381
InputOption::VALUE_REQUIRED This value is required (e.g. ``--iterations=5``), the option itself is still optional
382-
InputOption::VALUE_OPTIONAL This option may or may not have a value (e.g. ``yell`` or ``yell=loud``)
382+
InputOption::VALUE_OPTIONAL This option may or may not have a value (e.g. ``--yell`` or ``--yell=loud``)
383383
=========================== =====================================================================================
384384

385385
You can combine ``VALUE_IS_ARRAY`` with ``VALUE_REQUIRED`` or ``VALUE_OPTIONAL`` like this:

0 commit comments

Comments
 (0)