Skip to content

Commit c8bfde6

Browse files
committed
Merge branch '2.4'
Conflicts: changelog.rst components/stopwatch.rst
2 parents 98288fc + 863a764 commit c8bfde6

File tree

6 files changed

+46
-42
lines changed

6 files changed

+46
-42
lines changed

book/controller.rst

+28-28
Original file line numberDiff line numberDiff line change
@@ -279,44 +279,44 @@ the following guidelines in mind while you develop.
279279

280280
* **The order of the controller arguments does not matter**
281281

282-
Symfony is able to match the parameter names from the route to the variable
283-
names in the controller method's signature. In other words, it realizes that
284-
the ``{lastName}`` parameter matches up with the ``$lastName`` argument.
285-
The arguments of the controller could be totally reordered and still work
286-
perfectly::
287-
288-
public function indexAction($lastName, $color, $firstName)
289-
{
290-
// ...
291-
}
282+
Symfony is able to match the parameter names from the route to the variable
283+
names in the controller method's signature. In other words, it realizes that
284+
the ``{lastName}`` parameter matches up with the ``$lastName`` argument.
285+
The arguments of the controller could be totally reordered and still work
286+
perfectly::
287+
288+
public function indexAction($lastName, $color, $firstName)
289+
{
290+
// ...
291+
}
292292

293293
* **Each required controller argument must match up with a routing parameter**
294294

295-
The following would throw a ``RuntimeException`` because there is no ``foo``
296-
parameter defined in the route::
295+
The following would throw a ``RuntimeException`` because there is no ``foo``
296+
parameter defined in the route::
297297

298-
public function indexAction($firstName, $lastName, $color, $foo)
299-
{
300-
// ...
301-
}
298+
public function indexAction($firstName, $lastName, $color, $foo)
299+
{
300+
// ...
301+
}
302302

303-
Making the argument optional, however, is perfectly ok. The following
304-
example would not throw an exception::
303+
Making the argument optional, however, is perfectly ok. The following
304+
example would not throw an exception::
305305

306-
public function indexAction($firstName, $lastName, $color, $foo = 'bar')
307-
{
308-
// ...
309-
}
306+
public function indexAction($firstName, $lastName, $color, $foo = 'bar')
307+
{
308+
// ...
309+
}
310310

311311
* **Not all routing parameters need to be arguments on your controller**
312312

313-
If, for example, the ``lastName`` weren't important for your controller,
314-
you could omit it entirely::
313+
If, for example, the ``lastName`` weren't important for your controller,
314+
you could omit it entirely::
315315

316-
public function indexAction($firstName, $color)
317-
{
318-
// ...
319-
}
316+
public function indexAction($firstName, $color)
317+
{
318+
// ...
319+
}
320320

321321
.. tip::
322322

components/dependency_injection/definitions.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ In a similar way you can replace an already set argument by index using::
8888
You can also replace all the arguments (or set some if there are none) with
8989
an array of arguments::
9090

91-
$definition->replaceArguments($arguments);
91+
$definition->setArguments($arguments);
9292

9393
Method Calls
9494
~~~~~~~~~~~~

components/stopwatch.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ microtime by yourself. Instead, use the simple
3434
.. versionadded:: 2.5
3535
The ``getEvent()`` method was introduced in Symfony 2.5
3636

37-
The :class:`Symfony\\Component\\Stopwatch\StopwatchEvent` object can be retrieved
37+
The :class:`Symfony\\Component\\Stopwatch\\StopwatchEvent` object can be retrieved
3838
from the :method:`Symfony\\Component\\Stopwatch\\Stopwatch::start`,
3939
:method:`Symfony\\Component\\Stopwatch\\Stopwatch::stop`,
4040
:method:`Symfony\\Component\\Stopwatch\\Stopwatch::lap` and

contributing/code/conventions.rst

+12-12
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ Method Names
1313
When an object has a "main" many relation with related "things"
1414
(objects, parameters, ...), the method names are normalized:
1515

16-
* ``get()``
17-
* ``set()``
18-
* ``has()``
19-
* ``all()``
20-
* ``replace()``
21-
* ``remove()``
22-
* ``clear()``
23-
* ``isEmpty()``
24-
* ``add()``
25-
* ``register()``
26-
* ``count()``
27-
* ``keys()``
16+
* ``get()``
17+
* ``set()``
18+
* ``has()``
19+
* ``all()``
20+
* ``replace()``
21+
* ``remove()``
22+
* ``clear()``
23+
* ``isEmpty()``
24+
* ``add()``
25+
* ``register()``
26+
* ``count()``
27+
* ``keys()``
2828

2929
The usage of these methods are only allowed when it is clear that there
3030
is a main relation:

cookbook/console/commands_as_services.rst

+2
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ have some ``NameRepository`` service that you'll use to get your default value::
9090

9191
public function __construct(NameRepository $nameRepository)
9292
{
93+
parent::__construct();
94+
9395
$this->nameRepository = $nameRepository;
9496
}
9597

install.sh

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ function sparse_checkout {
88
git remote add -f origin https://github.com./$1/$2
99
echo Resources/doc > .git/info/sparse-checkout
1010
git checkout master
11+
rm -rf ../bundles/$2
1112
mv Resources/doc ../bundles/$2
1213
cd ..
1314
rm -rf sparse_checkout
@@ -18,5 +19,6 @@ sparse_checkout sensiolabs SensioGeneratorBundle
1819
sparse_checkout doctrine DoctrineFixturesBundle
1920
sparse_checkout doctrine DoctrineMigrationsBundle
2021
sparse_checkout doctrine DoctrineMongoDBBundle
22+
rm -rf cmf
2123
git clone https://github.com./symfony-cmf/symfony-cmf-docs cmf
2224

0 commit comments

Comments
 (0)