Skip to content

Commit 06bc489

Browse files
committed
Merge branch '2.3' into 2.5
* 2.3: Fixed typos Update web_server_configuration.rst Update web_server_configuration.rst remove service class parameters Some fixes backport service factory improvements Minor standard fix for best practices guide Minor tweak Don't use form() helper Apply best practices to forms Use AppBundle instead of AcmeStoreBundle Other minor fixes Use AppBundle instead of AcmeDemoBundle link to a bundle's current (not master) docs finish #3744 [WIP] - Console add Console arguments page Added a little sample on Option uses with "spaces" Conflicts: components/map.rst.inc
2 parents 8c30ae9 + 107610e commit 06bc489

25 files changed

+421
-558
lines changed

best_practices/business-logic.rst

+2-5
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,9 @@ the class namespace as a parameter:
140140
# app/config/services.yml
141141
142142
# service definition with class namespace as parameter
143-
parameters:
144-
slugger.class: AppBundle\Utils\Slugger
145-
146143
services:
147144
app.slugger:
148-
class: "%slugger.class%"
145+
class: AppBundle\Utils\Slugger
149146
150147
This practice is cumbersome and completely unnecessary for your own services:
151148

@@ -335,7 +332,7 @@ in a matter of seconds.
335332

336333
.. _`full definition`: http://en.wikipedia.org/wiki/Business_logic
337334
.. _`Doctrine project`: http://www.doctrine-project.org/
338-
.. _`fixture class`: http://symfony.com/doc/master/bundles/DoctrineFixturesBundle/index.html#writing-simple-fixtures
335+
.. _`fixture class`: http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html#writing-simple-fixtures
339336
.. _`PSR-1`: http://www.php-fig.org/psr/psr-1/
340337
.. _`PSR-2`: http://www.php-fig.org/psr/psr-2/
341338
.. _`the Symfony Code Standards`: http://symfony.com/doc/current/contributing/code/standards.html

best_practices/forms.rst

+3-9
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ Building Forms
1515
The Form component allows you to build forms right inside your controller
1616
code. Honestly, unless you need to reuse the form somewhere else, that's
1717
totally fine. But for organize and reuse, we recommend that you define each
18-
form in its own PHP class:
19-
20-
.. code-block:: php
18+
form in its own PHP class::
2119

2220
namespace AppBundle\Form;
2321

@@ -51,9 +49,7 @@ form in its own PHP class:
5149
}
5250
}
5351

54-
To use the class, use ``createForm`` and instantiate the new class:
55-
56-
.. code-block:: php
52+
To use the class, use ``createForm`` and instantiate the new class::
5753

5854
use AppBundle\Form\PostType;
5955
// ...
@@ -110,9 +106,7 @@ directly in your form class, this would effectively limit the scope of that form
110106
111107
This form *may* have been designed for creating posts, but if you wanted
112108
to reuse it for editing posts, the button label would be wrong. Instead,
113-
some developers configure form buttons in the controller:
114-
115-
.. code-block:: php
109+
some developers configure form buttons in the controller::
116110

117111
namespace AppBundle\Controller\Admin;
118112

best_practices/security.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Authorization (i.e. Denying Access)
7575
Symfony gives you several ways to enforce authorization, including the ``access_control``
7676
configuration in :doc:`security.yml </reference/configuration/security>` the
7777
:ref:`@Security annotation <best-practices-security-annotation>` and using
78-
:ref:`isGranted <best-practices-directy-isGranted>` on the ``security.context``
78+
:ref:`isGranted <best-practices-directly-isGranted>` on the ``security.context``
7979
service directly.
8080

8181
.. best-practice::
@@ -206,7 +206,7 @@ Now you can reuse this method both in the template and in the security expressio
206206
<a href=""> ... </a>
207207
{% endif %}
208208

209-
.. _best-practices-directy-isGranted:
209+
.. _best-practices-directly-isGranted:
210210

211211
Checking Permissions without @Security
212212
--------------------------------------
@@ -352,5 +352,7 @@ develop :doc:`your own user provider </cookbook/security/custom_provider>` and
352352

353353
.. _`ParamConverter`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
354354
.. _`@Security annotation`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/security.html
355+
.. _`security voter`: http://symfony.com/doc/current/cookbook/security/voters_data_permission.html
356+
.. _`ACL's`: http://symfony.com/doc/current/cookbook/security/acl.html
355357
.. _`expression`: http://symfony.com/doc/current/components/expression_language/introduction.html
356358
.. _`FOSUserBundle`: https://github.com/FriendsOfSymfony/FOSUserBundle

0 commit comments

Comments
 (0)