Skip to content

Commit de41795

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: reformat code example Fixed indentation fix indention use code block bash instead of php
2 parents e606b13 + 56e30d2 commit de41795

File tree

18 files changed

+56
-52
lines changed

18 files changed

+56
-52
lines changed

components/cache.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Cache Contracts versus PSR-6
3535
This component includes *two* different approaches to caching:
3636

3737
:ref:`PSR-6 Caching <cache-component-psr6-caching>`:
38-
A generic cache system, which involves cache "pools" and cache "items".
38+
A generic cache system, which involves cache "pools" and cache "items".
3939

4040
:ref:`Cache Contracts <cache-component-contracts>`:
4141
A simpler yet more powerful way to cache values based on recomputation callbacks.

components/console/helpers/formatterhelper.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ If you don't want to use suffix at all, pass an empty string::
108108

109109
$truncatedMessage = $formatter->truncate($message, 7, '!!'); // result: This is!!
110110
$truncatedMessage = $formatter->truncate($message, 7, ''); // result: This is
111+
111112
$truncatedMessage = $formatter->truncate('test', 10);
112-
/* result: test
113-
because length of the "test..." string is shorter than 10 */
113+
// result: test
114+
// because length of the "test..." string is shorter than 10

components/console/single_command_tool.rst

+9-9
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ it is possible to remove this need by declaring a single command application::
1919
use Symfony\Component\Console\Output\OutputInterface;
2020

2121
(new Application('echo', '1.0.0'))
22-
->register('echo')
23-
->addArgument('foo', InputArgument::OPTIONAL, 'The directory')
24-
->addOption('bar', null, InputOption::VALUE_REQUIRED)
25-
->setCode(function(InputInterface $input, OutputInterface $output) {
26-
// output arguments and options
27-
})
28-
->getApplication()
29-
->setDefaultCommand('echo', true) // Single command application
30-
->run();
22+
->register('echo')
23+
->addArgument('foo', InputArgument::OPTIONAL, 'The directory')
24+
->addOption('bar', null, InputOption::VALUE_REQUIRED)
25+
->setCode(function(InputInterface $input, OutputInterface $output) {
26+
// output arguments and options
27+
})
28+
->getApplication()
29+
->setDefaultCommand('echo', true) // Single command application
30+
->run();
3131

3232
The method :method:`Symfony\\Component\\Console\\Application::setDefaultCommand`
3333
accepts a boolean as second parameter. If true, the command ``echo`` will then

components/phpunit_bridge.rst

+7-5
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ to register a new `test listener`_ called ``SymfonyTestsListener``:
4848
4949
<!-- http://phpunit.de/manual/6.0/en/appendixes.configuration.html -->
5050
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
51-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.0/phpunit.xsd"
51+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.0/phpunit.xsd"
5252
>
5353
5454
<!-- ... -->
@@ -172,7 +172,7 @@ message, enclosed with ``/``. For example, with:
172172
173173
<!-- http://phpunit.de/manual/6.0/en/appendixes.configuration.html -->
174174
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
175-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.0/phpunit.xsd"
175+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.0/phpunit.xsd"
176176
>
177177
178178
<!-- ... -->
@@ -276,7 +276,9 @@ By default, the PHPUnit Bridge displays only deprecation messages.
276276
To show the full stack trace related to a deprecation, set the value of ``SYMFONY_DEPRECATIONS_HELPER``
277277
to a regular expression matching the deprecation message.
278278

279-
For example, if the following deprecation notice is thrown::
279+
For example, if the following deprecation notice is thrown:
280+
281+
.. code-block:: bash
280282
281283
1x: Doctrine\Common\ClassLoader is deprecated.
282284
1x in EntityTypeTest::setUp from Symfony\Bridge\Doctrine\Tests\Form\Type
@@ -524,7 +526,7 @@ namespaces in the ``phpunit.xml`` file, as done for example in the
524526
525527
<!-- http://phpunit.de/manual/4.1/en/appendixes.configuration.html -->
526528
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
527-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.1/phpunit.xsd"
529+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.1/phpunit.xsd"
528530
>
529531
530532
<!-- ... -->
@@ -669,7 +671,7 @@ Add the following configuration to the ``phpunit.xml.dist`` file:
669671
670672
<!-- http://phpunit.de/manual/6.0/en/appendixes.configuration.html -->
671673
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
672-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.0/phpunit.xsd"
674+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.0/phpunit.xsd"
673675
>
674676
675677
<!-- ... -->

components/translation/usage.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ loaded/dumped when using this component inside a Symfony application:
433433
434434
<?xml version="1.0" encoding="UTF-8"?>
435435
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0"
436-
srcLang="fr-FR" trgLang="en-US">
436+
srcLang="fr-FR" trgLang="en-US">
437437
<file id="messages.en_US">
438438
<unit id="LCa0a2j" name="original-content">
439439
<notes>

components/var_dumper/advanced.rst

+4
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ you can configure these limits:
6464
items will be cloned. The default value is ``1``, which is consistent
6565
with older Symfony versions.
6666

67+
.. versionadded:: 3.4
68+
69+
The ``setMinDepth()`` method was introduced in Symfony 3.4.
70+
6771
:method:`Symfony\\Component\\VarDumper\\Cloner\\VarCloner::setMaxString`
6872
Configures the maximum number of characters that will be cloned before
6973
cutting overlong strings. Specifying ``-1`` removes the limit.

components/web_link.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
The WebLink Component
66
======================
77

8-
The WebLink component provides tools to manage the ``Link`` HTTP header needed
9-
for `Web Linking`_ when using `HTTP/2 Server Push`_ as well as `Resource Hints`_.
8+
The WebLink component provides tools to manage the ``Link`` HTTP header needed
9+
for `Web Linking`_ when using `HTTP/2 Server Push`_ as well as `Resource Hints`_.
1010

1111
Installation
1212
------------

console/input.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ flag:
166166
167167
.. tip::
168168

169-
You can also declare a one-letter shortcut that you can call with a single
170-
dash, like ``-i``::
169+
You can also declare a one-letter shortcut that you can call with a single
170+
dash, like ``-i``::
171171

172172
$this
173173
// ...

contributing/documentation/index.rst

+9-9
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ These short articles explain everything you need to contribute to the Symfony
55
documentation:
66

77
:doc:`The Contribution Process </contributing/documentation/overview>`
8-
Explains the steps to follow to contribute fixes and new contents. It's the
9-
same contribution process followed by most open source projects, so you may
10-
already know everything that is needed.
8+
Explains the steps to follow to contribute fixes and new contents. It's the
9+
same contribution process followed by most open source projects, so you may
10+
already know everything that is needed.
1111

1212
:doc:`Documentation Formats </contributing/documentation/format>`
13-
Explains the technical details of the reStructuredText format that is used to
14-
write the docs. Skip it if you are already familiar with this format.
13+
Explains the technical details of the reStructuredText format that is used to
14+
write the docs. Skip it if you are already familiar with this format.
1515

1616
:doc:`Documentation Standards </contributing/documentation/standards>`
17-
Explains how to write docs and code examples to match the style and tone of
18-
the rest of the existing documentation.
17+
Explains how to write docs and code examples to match the style and tone of
18+
the rest of the existing documentation.
1919

2020
:doc:`License </contributing/documentation/license>`
21-
Explains the details of the Creative Commons BY-SA 3.0 license used for the
22-
Symfony Documentation.
21+
Explains the details of the Creative Commons BY-SA 3.0 license used for the
22+
Symfony Documentation.
2323

2424
.. toctree::
2525
:hidden:

create_framework/routing.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -93,23 +93,23 @@ The ``match()`` method takes a request path and returns an array of attributes
9393
(notice that the matched route is automatically stored under the special
9494
``_route`` attribute)::
9595

96-
print_r($matcher->match('/bye'));
97-
/* Gives:
96+
$matcher->match('/bye');
97+
/* Result:
9898
[
9999
'_route' => 'bye',
100100
];
101101
*/
102102

103-
print_r($matcher->match('/hello/Fabien'));
104-
/* Gives:
103+
$matcher->match('/hello/Fabien');
104+
/* Result:
105105
[
106106
'name' => 'Fabien',
107107
'_route' => 'hello',
108108
];
109109
*/
110110

111-
print_r($matcher->match('/hello'));
112-
/* Gives:
111+
$matcher->match('/hello');
112+
/* Result:
113113
[
114114
'name' => 'World',
115115
'_route' => 'hello',

forms.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,8 @@ the correct values of a number of field options.
572572

573573
.. caution::
574574

575-
These field options are *only* guessed if you're using Symfony to guess
576-
the field type (i.e. omit or pass ``null`` as the second argument to ``add()``).
575+
These field options are *only* guessed if you're using Symfony to guess
576+
the field type (i.e. omit or pass ``null`` as the second argument to ``add()``).
577577

578578
If you'd like to change one of the guessed values, you can override it by
579579
passing the option in the options field array::

reference/configuration/debug.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ destination for dumps. Typically, you would set this to ``php://stderr``:
7777
7878
# config/packages/debug.yaml
7979
debug:
80-
dump_destination: php://stderr
80+
dump_destination: php://stderr
8181
8282
.. code-block:: xml
8383
@@ -97,7 +97,7 @@ destination for dumps. Typically, you would set this to ``php://stderr``:
9797
9898
// config/packages/debug.php
9999
$container->loadFromExtension('debug', [
100-
'dump_destination' => 'php://stderr',
100+
'dump_destination' => 'php://stderr',
101101
]);
102102
103103
Configure it to ``"tcp://%env(VAR_DUMPER_SERVER)%"`` in order to use the :ref:`ServerDumper feature <var-dumper-dump-server>`.

reference/configuration/framework.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ need to escape the percent signs (``%``) by doubling them.
348348
// as /path/to/host/.../file on the host
349349
// and /var/www/app/ as /projects/my_project/ also
350350
'myide://%%f:%%l&/path/to/guest/>/path/to/host/&/var/www/app/>/projects/my_project/&...'
351-
351+
352352
// example for PhpStorm
353353
'phpstorm://open?file=%%f&line=%%l&/var/www/app/>/projects/my_project/'
354354

@@ -1325,7 +1325,7 @@ individually for each asset package:
13251325
.. code-block:: yaml
13261326
13271327
# config/packages/framework.yaml
1328-
framework:
1328+
framework:
13291329
assets:
13301330
# this strategy is applied to every asset (including packages)
13311331
version_strategy: 'app.asset.my_versioning_strategy'
@@ -1423,7 +1423,7 @@ package:
14231423
.. code-block:: yaml
14241424
14251425
# config/packages/framework.yaml
1426-
framework:
1426+
framework:
14271427
assets:
14281428
# this manifest is applied to every asset (including packages)
14291429
json_manifest_path: "%kernel.project_dir%/public/build/manifest.json"

security/expressions.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Inside the expression, you have access to a number of variables:
4343
:ref:`role hierarchy <security-role-hierarchy>` but not including the
4444
``IS_AUTHENTICATED_*`` attributes (see the functions below).
4545
``object``
46-
The object (if any) that's passed as the second argument to ``isGranted()``.
46+
The object (if any) that's passed as the second argument to ``isGranted()``.
4747
``token``
4848
The token object.
4949
``trust_resolver``

templating.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ with alternating ``odd``, ``even`` classes:
113113

114114
{% for i in 1..10 %}
115115
<div class="{{ cycle(['even', 'odd'], i) }}">
116-
<!-- some HTML here -->
116+
<!-- some HTML here -->
117117
</div>
118118
{% endfor %}
119119

templating/PHP.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ resource to use such a layout:
502502
],
503503
],
504504
505-
// ...
505+
// ...
506506
]);
507507
508508
If you only want to make the change in one template, add the following line to

translation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ texts* and complex expressions:
326326

327327
.. code-block:: twig
328328
329-
{% trans_default_domain 'app' %}
329+
{% trans_default_domain 'app' %}
330330
331331
Note that this only influences the current template, not any "included"
332332
template (in order to avoid side effects).

workflow.rst

+1-4
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ like this:
9292
<framework:audit-trail enabled="true"/>
9393
9494
<framework:marking-store type="single_state">
95-
<framework:argument>currentPlace</framework:argument>
95+
<framework:argument>currentPlace</framework:argument>
9696
</framework:marking-store>
9797
9898
<framework:support>AppBundle\Entity\BlogPost</framework:support>
@@ -104,19 +104,16 @@ like this:
104104
105105
<framework:transition name="to_review">
106106
<framework:from>draft</framework:from>
107-
108107
<framework:to>reviewed</framework:to>
109108
</framework:transition>
110109
111110
<framework:transition name="publish">
112111
<framework:from>reviewed</framework:from>
113-
114112
<framework:to>published</framework:to>
115113
</framework:transition>
116114
117115
<framework:transition name="reject">
118116
<framework:from>reviewed</framework:from>
119-
120117
<framework:to>rejected</framework:to>
121118
</framework:transition>
122119

0 commit comments

Comments
 (0)