Skip to content

Commit e33be6d

Browse files
committed
Merge branch '2.4'
Conflicts: book/forms.rst
2 parents 5cda1c7 + d6a17e7 commit e33be6d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+285
-99
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: 3 additions & 3 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

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
@@ -1024,14 +1024,14 @@ stylesheets and JavaScripts that you'll need throughout your site:
10241024
{# ... #}
10251025

10261026
{% block stylesheets %}
1027-
<link href="{{ asset('/css/main.css') }}" rel="stylesheet" />
1027+
<link href="{{ asset('css/main.css') }}" rel="stylesheet" />
10281028
{% endblock %}
10291029
</head>
10301030
<body>
10311031
{# ... #}
10321032

10331033
{% block javascripts %}
1034-
<script src="{{ asset('/js/main.js') }}"></script>
1034+
<script src="{{ asset('js/main.js') }}"></script>
10351035
{% endblock %}
10361036
</body>
10371037
</html>
@@ -1049,7 +1049,7 @@ page. From inside that contact page's template, do the following:
10491049
{% block stylesheets %}
10501050
{{ parent() }}
10511051

1052-
<link href="{{ asset('/css/contact.css') }}" rel="stylesheet" />
1052+
<link href="{{ asset('css/contact.css') }}" rel="stylesheet" />
10531053
{% endblock %}
10541054

10551055
{# ... #}
@@ -1314,7 +1314,7 @@ covered:
13141314
{% endfor %}
13151315
{% endblock %}
13161316

1317-
Notice that this template extends the section template -(``AcmeBlogBundle::layout.html.twig``)
1317+
Notice that this template extends the section template (``AcmeBlogBundle::layout.html.twig``)
13181318
which in-turn extends the base application layout (``::base.html.twig``).
13191319
This is the common three-level inheritance model.
13201320

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/class_loader/debug_class_loader.rst

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@
44
Debugging a Class Loader
55
========================
66

7-
The :class:`Symfony\\Component\\ClassLoader\\DebugClassLoader` attempts to
8-
throw more helpful exceptions when a class isn't found by the registered
9-
autoloaders. All autoloaders that implement a ``findFile()`` method are replaced
10-
with a ``DebugClassLoader`` wrapper.
11-
12-
Using the ``DebugClassLoader`` is as easy as calling its static
13-
:method:`Symfony\\Component\\ClassLoader\\DebugClassLoader::enable` method::
14-
15-
use Symfony\Component\ClassLoader\DebugClassLoader;
16-
17-
DebugClassLoader::enable();
7+
Since Symfony 2.4, the ``DebugClassLoader`` of the Class Loader component is
8+
deprecated. Use the
9+
:doc:`DebugClassLoader provided by the Debug component </components/debug/class_loader>`.

components/console/helpers/dialoghelper.rst

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

267-
By setting the inputStream of the ``DialogHelper``, you imitate what the
267+
By setting the input stream of the ``DialogHelper``, you imitate what the
268268
console would do internally with all user input through the cli. This way
269269
you can test any user interaction (even complex ones) by passing an appropriate
270270
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');

0 commit comments

Comments
 (0)