8000 Merge branch '3.0' into 3.1 · symfony/symfony-docs@f91f0b1 · GitHub
[go: up one dir, main page]

Skip to content

Commit f91f0b1

Browse files
committed
Merge branch '3.0' into 3.1
2 parents 34ea50f + cf21977 commit f91f0b1

File tree

5 files changed

+27
-26
lines changed

5 files changed

+27
-26
lines changed

book/testing.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ it has its own excellent `documentation`_.
1717

1818
.. note::
1919

20-
It's recommended to use the latest stable PHPUnit version (you will have
21-
to use version 4.2 or higher to test the Symfony core code itself).
20+
It's recommended to use the latest stable PHPUnit version, `installed as
21+
PHAR`_ (you will have to use version 4.2 or higher to test the Symfony core
22+
code itself).
2223

2324
Each test - whether it's a unit test or a functional test - is a PHP class
2425
that should live in the ``tests/`` directory of your application. If you follow
@@ -910,3 +911,4 @@ Learn more
910911

911912
.. _`$_SERVER`: http://php.net/manual/en/reserved.variables.server.php
912913
.. _`documentation`: https://phpunit.de/manual/current/en/
914+
.. _`installed as PHAR`: https://phpunit.de/manual/current/en/installation.html#installation.phar

contributing/code/patches.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ Before working on Symfony, setup a friendly environment with the following
1414
software:
1515

1616
* Git;
17-
* PHP version 5.5.9 or above;
18-
* `PHPUnit`_ 4.2 or above.
17+
* PHP version 5.5.9 or above.
1918

2019
.. caution::
2120

@@ -365,4 +364,3 @@ before merging.
365364
.. _`fabbot`: http://fabbot.io
366365
.. _`PSR-1`: http://www.php-fig.org/psr/psr-1/
367366
.. _`PSR-2`: http://www.php-fig.org/psr/psr-2/
368-
.. _PHPUnit: https://phpunit.de/manual/current/en/installation.html

contributing/code/standards.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Structure
160160

161161
* Declare public methods first, then protected ones and finally private ones.
162162
The exceptions to this rule are the class constructor and the ``setUp`` and
163-
``tearDown`` methods of PHPUnit tests, which should always be the first methods
163+
``tearDown`` methods of PHPUnit tests, which must always be the first methods
164164
to increase readability;
165165

166166
* Declare all the arguments on the same line as the method/function name, no
@@ -169,11 +169,11 @@ Structure
169169
* Use parentheses when instantiating classes regardless of the number of
170170
arguments the constructor has;
171171

172-
* Exception and error message strings should be concatenated using :phpfunction:`sprintf`.
172+
* Exception and error message strings must be concatenated using :phpfunction:`sprintf`;
173173

174-
* Calls to :phpfunction:`trigger_error` with type ``E_USER_DEPRECATED`` should be
174+
* Calls to :phpfunction:`trigger_error` with type ``E_USER_DEPRECATED`` must be
175175
switched to opt-in via ``@`` operator.
176-
Read more at :ref:`contributing-code-conventions-deprecations`;
176+
Read more at :ref:`contributing-code-conventions-deprecations`.
177177

178178
Naming Conventions
179179
------------------

cookbook/bundles/best_practices.rst

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -113,22 +113,23 @@ them under the ``cache/`` or ``log/`` directory of the host application. Tools
113113
can generate files in the bundle directory structure, but only if the generated
114114
files are going to be part of the repository.
115115

116-
The following classes and files have specific emplacements:
117-
118-
=============================== =============================
119-
Type Directory
120-
=============================== =============================
121-
Commands ``Command/``
122-
Controllers ``Controller/``
123-
Service Container Extensions ``DependencyInjection/``
124-
Event Listeners ``EventListener/``
125-
Model classes [1] ``Model/``
126-
Configuration ``Resources/config/``
127-
Web Resources (CSS, JS, images) ``Resources/public/``
128-
Translation files ``Resources/translations/``
129-
Templates ``Resources/views/``
130-
Unit and Functional Tests ``Tests/``
131-
=============================== =============================
116+
The following classes and files have specific emplacements (some are mandatory
117+
and others are just conventions followed by most developers):
118+
119+
=============================== ============================= ================
120+
Type Directory Mandatory?
121+
=============================== ============================= ================
122+
Commands ``Command/`` Yes
123+
Controllers ``Controller/`` No
124+
Service Container Extensions ``DependencyInjection/`` Yes
125+
Event Listeners ``EventListener/`` No
126+
Model classes [1] ``Model/`` No
127+
Configuration ``Resources/config/`` No
128+
Web Resources (CSS, JS, images) ``Resources/public/`` Yes
129+
Translation files ``Resources/translations/`` Yes
130+
Templates ``Resources/views/`` Yes
131+
Unit and Functional Tests ``Tests/`` No
132+
=============================== ============================= ================
132133

133134
[1] See :doc:`/cookbook/doctrine/mapping_model_classes` for how to handle the
134135
mapping with a compiler pass.

cookbook/event_dispatcher/event_listener.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ The most common way to listen to an event is to register an **event listener**::
6565
Each event receives a slightly different type of ``$event`` object. For
6666
the ``kernel.exception`` event, it is :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent`.
6767
To see what type of object each event listener receives, see :class:`Symfony\\Component\\HttpKernel\\KernelEvents`
68-
or the documentation about the specific even you're listening to.
68+
or the documentation about the specific event you're listening to.
6969

7070
Now that the class is created, you just need to register it as a service and
7171
notify Symfony that it is a "listener" on the ``kernel.exception`` event by

0 commit comments

Comments
 (0)
0