Skip to content

Commit f0ac8bb

Browse files
committed
Merge branch '2.7'
* 2.7: (45 commits) Front-porting changes by @pborreli in #4531 Fixed typos Update web_server_configuration.rst Update web_server_configuration.rst Added two missing pulls Added November changelog Added November changelog Added November changelog Updated documentation regarding the SecurityContext split; symfony/symfony#11690 Adding tiny note changing line breaks to be shorter, no real change [#4050] Backporting some additions to 2.3 added logging to translator. Missing attribute 'original' remove service class parameters Fixes concat operator typo Incorporates @wouterj 's suggestion for more realistic usage of bang Changes operator spacing language Adds missing space before return statement Fixes spelling and formatting errors ...
2 parents 8099ac1 + 1c9270d commit f0ac8bb

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

+768
-603
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/i18n.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ English in the application would be:
8383
<!-- app/Resources/translations/messages.en.xliff -->
8484
<?xml version="1.0"?>
8585
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
86-
<file source-language="en" target-language="en" datatype="plaintext">
86+
<file source-language="en" target-language="en" datatype="plaintext" original="file.ext">
8787
<body>
8888
<trans-unit id="1">
8989
<source>title.post_list</source>

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)