8000 Merge branch '2.8' into 3.3 · symfony/symfony-docs@b8d7a49 · GitHub
[go: up one dir, main page]

Skip to content

Commit b8d7a49

Browse files
committed
Merge branch '2.8' into 3.3
* 2.8: Use escaped backslashes Add information about default value for decoration_priority Adding the missing attr option to the ChoiceType Update choice.rst Minor fixes in the bundles article
2 parents 7d6d47b + 89bcd82 commit b8d7a49

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

bundles.rst

Lines changed: 2 additions & 2 deletions
70
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Creating a Bundle
6767
`SensioGeneratorBundle`_ is an optional bundle that includes commands to create
6868
different elements of your application, such as bundles. If you create lots of
6969
bundles, consider using it. However, this section creates and enables a new
-
bundle by hand to show how simple is to do it.
70+
bundle by hand to show how simple it is to do it.
7171

7272
The new bundle is called AcmeTestBundle, where the ``Acme`` portion is just a
7373
dummy name that should be replaced by some "vendor" name that represents you or
@@ -179,4 +179,4 @@ Learn more
179179
bundles/*
180180

181181
.. _`third-party bundles`: https://github.com/search?q=topic%3Asymfony-bundle&type=Repositories
182-
.. _`SensioGeneratorBundle`: https://github.com/sensiolabs/SensioGeneratorBundle
182+
.. _`SensioGeneratorBundle`: https://symfony.com/doc/current/bundles/SensioGeneratorBundle/index.html

reference/forms/types/choice.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ To use this field, you must specify *either* ``choices`` or ``choice_loader`` op
3030
| options | - `empty_data`_ |
3131
| | - `error_bubbling`_ |
3232
+-------------+------------------------------------------------------------------------------+
33-
| Inherited | - `by_reference`_ |
34-
| options | - `data`_ |
33+
| Inherited | - `attr`_ |
34+
| options | - `by_reference`_ |
35+
| | - `data`_ |
3536
| | - `disabled`_ |
3637
| | - `error_mapping`_ |
3738
| | - `inherit_data`_ |
@@ -99,6 +100,7 @@ method::
99100
'choice_attr' => function($category, $key, $index) {
100101
return ['class' => 'category_'.strtolower($category->getName())];
101102
},
103+
102104
'group_by' => function($category, $key, $index) {
103105
// randomly assign things into 2 groups
104106
return rand(0, 1) == 1 ? 'Group A' : 'Group B';
@@ -263,6 +265,8 @@ Inherited Options
263265

264266
These options inherit from the :doc:`FormType </reference/forms/types/form>`:
265267

268+
.. include:: /reference/forms/types/options/attr.rst.inc
269+
266270
.. include:: /reference/forms/types/options/by_reference.rst.inc
267271

268272
.. include:: /reference/forms/types/options/data.rst.inc

routing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ Troubleshooting
696696

697697
Here are some common errors you might see while working with routing:
698698

699-
Controller "AppBundle\Controller\BlogController::showAction()" requires that you
699+
Controller "AppBundle\\Controller\\BlogController::showAction()" requires that you
700700
provide a value for the "$slug" argument.
701701

702702
This happens when your controller method has an argument (e.g. ``$slug``)::

service_container/service_decoration.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ replaces the ``app.mailer`` service. The old ``app.mailer`` service is renamed t
170170
Decoration Priority
171171
-------------------
172172

173-
If you want to apply more than one decorator to a service, you can control their
174-
order by configuring the priority of decoration, this can be any integer number
175-
(decorators with higher priorities will be applied first).
173+
When applying multiple decorators to a service, you can control their order with
174+
the ``decoration_priority`` option. Its value is an integer that defaults to
175+
``0`` and higher priorities mean that decorators will be applied earlier.
176176

177177
.. configuration-block::
178178

0 commit comments

Comments
 (0)
0