Skip to content

Commit 9579a3d

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Add rule to import classes except for built-in PHP classes. Fix French translation fix for simple table layout Fix typo Fix typo
2 parents 3f5c188 + b0b2def commit 9579a3d

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

components/translation/usage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Imagine you want to translate the string *"Symfony is great"* into French::
1212
$translator = new Translator('fr_FR');
1313
$translator->addLoader('array', new ArrayLoader());
1414
$translator->addResource('array', array(
15-
'Symfony is great!' => 'J\'aime Symfony!',
15+
'Symfony is great!' => 'Symfony est super !',
1616
), 'fr_FR');
1717

1818
var_dump($translator->trans('Symfony is great!'));

console.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ automatically, a command must be:
7272
#. Defined in a class that extends from
7373
:class:`Symfony\\Component\\Console\\Command\\Command`.
7474

75-
If you can't meet these conditions for some command, the alternative is to
76-
manually :doc`register the command as a service </console/commands_as_services>`.
75+
If you can't meet these conditions for a command, the alternative is to manually
76+
:doc:`register the command as a service </console/commands_as_services>`.
7777

7878
Executing the Command
7979
---------------------
@@ -166,7 +166,7 @@ Now, you can pass the username to the command:
166166
Getting Services from the Service Container
167167
-------------------------------------------
168168

169-
To actually create a new user, the command has to access to some
169+
To actually create a new user, the command has to access some
170170
:doc:`services </service_container>`. This can be done by making the command
171171
extend the :class:`Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand`
172172
instead::

contributing/code/standards.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ Structure
192192
* Do not use ``else``, ``elseif``, ``break`` after ``if`` and ``case`` conditions
193193
which return or throw something;
194194

195-
* Do not use spaces around ``[`` offset accessor and before ``]`` offset accessor.
195+
* Do not use spaces around ``[`` offset accessor and before ``]`` offset accessor;
196+
197+
* Add a ``use`` statement for every class that is not part of the global namespace.
196198

197199
Naming Conventions
198200
~~~~~~~~~~~~~~~~~~

routing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,12 +499,12 @@ redirect between them.
499499
Symfony follows this logic to redirect between URLs with and without trailing
500500
slashes (but only for ``GET`` and ``HEAD`` requests):
501501

502-
---------- ---------------------------------------- ------------------------------------------
502+
========== ======================================== ==========================================
503503
Route path If the requested URL is ``/foo`` If the requested URL is ``/foo/``
504-
---------- ---------------------------------------- ------------------------------------------
504+
========== ======================================== ==========================================
505505
``/foo`` It matches (``200`` status response) It doesn't match (``404`` status response)
506506
``/foo/`` It makes a ``301`` redirect to ``/foo/`` It matches (``200`` status response)
507-
---------- ---------------------------------------- ------------------------------------------
507+
========== ======================================== ==========================================
508508

509509
In summary, adding a trailing slash in the route path is the best way to ensure
510510
that both URLs work. Read the :doc:`/routing/redirect_trailing_slash` article to

0 commit comments

Comments
 (0)