Skip to content

Commit 2f6f5bf

Browse files
committed
Merge branch '4.2'
* 4.2: use .. instead of .. code-block: php
2 parents 7c081f1 + be3e0b6 commit 2f6f5bf

File tree

13 files changed

+24
-74
lines changed

13 files changed

+24
-74
lines changed

best_practices/security.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@ For controlling access on a controller-by-controller basis, use the ``@Security`
108108
annotation whenever possible. Placing it above each action makes it consistent and readable.
109109

110110
In our application, you need the ``ROLE_ADMIN`` in order to create a new post.
111-
Using ``@Security``, this looks like:
112-
113-
.. code-block:: php
111+
Using ``@Security``, this looks like::
114112

115113
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
116114
use Symfony\Component\Routing\Annotation\Route;

bundles/configuration.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,7 @@ In your extension, you can load this and dynamically set its arguments::
301301
Using the Config component is fully optional. The ``load()`` method gets an
302302
array of configuration values. You can instead parse these arrays yourself
303303
(e.g. by overriding configurations and using :phpfunction:`isset` to check
304-
for the existence of a value). Be aware that it'll be very hard to support XML.
305-
306-
.. code-block:: php
304+
for the existence of a value). Be aware that it'll be very hard to support XML::
307305

308306
public function load(array $configs, ContainerBuilder $container)
309307
{

components/property_access.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,7 @@ can use setters, the magic ``__set()`` method or properties to set values::
296296
var_dump($person->getChildren()); // [Person()];
297297

298298
You can also use ``__call()`` to set values but you need to enable the feature,
299-
see `Enable other Features`_.
300-
301-
.. code-block:: php
299+
see `Enable other Features`_::
302300

303301
// ...
304302
class Person
@@ -335,9 +333,7 @@ Writing to Array Properties
335333
~~~~~~~~~~~~~~~~~~~~~~~~~~~
336334

337335
The ``PropertyAccessor`` class allows to update the content of arrays stored in
338-
properties through *adder* and *remover* methods.
339-
340-
.. code-block:: php
336+
properties through *adder* and *remover* methods::
341337

342338
// ...
343339
class Person

components/property_info.rst

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ Usage
3737

3838
To use this component, create a new
3939
:class:`Symfony\\Component\\PropertyInfo\\PropertyInfoExtractor` instance and
40-
provide it with a set of information extractors.
41-
42-
.. code-block:: php
40+
provide it with a set of information extractors::
4341

4442
use Symfony\Component\PropertyInfo\PropertyInfoExtractor;
4543
use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;
@@ -151,9 +149,7 @@ List Information
151149

152150
Extractors that implement :class:`Symfony\\Component\\PropertyInfo\\PropertyListExtractorInterface`
153151
provide the list of properties that are available on a class as an array
154-
containing each property name as a string.
155-
156-
.. code-block:: php
152+
containing each property name as a string::
157153

158154
$properties = $propertyInfo->getProperties($class);
159155
/*
@@ -173,9 +169,7 @@ Type Information
173169

174170
Extractors that implement :class:`Symfony\\Component\\PropertyInfo\\PropertyTypeExtractorInterface`
175171
provide :ref:`extensive data type information <components-property-info-type>`
176-
for a property.
177-
178-
.. code-block:: php
172+
for a property::
179173

180174
$types = $propertyInfo->getTypes($class, $property);
181175

@@ -204,9 +198,7 @@ Description Information
204198

205199
Extractors that implement :class:`Symfony\\Component\\PropertyInfo\\PropertyDescriptionExtractorInterface`
206200
provide long and short descriptions from a properties annotations as
207-
strings.
208-
209-
.. code-block:: php
201+
strings::
210202

211203
$title = $propertyInfo->getShortDescription($class, $property);
212204
/*
@@ -230,9 +222,7 @@ Access Information
230222
~~~~~~~~~~~~~~~~~~
231223

232224
Extractors that implement :class:`Symfony\\Component\\PropertyInfo\\PropertyAccessExtractorInterface`
233-
provide whether properties are readable or writable as booleans.
234-
235-
.. code-block:: php
225+
provide whether properties are readable or writable as booleans::
236226

237227
$propertyInfo->isReadable($class, $property);
238228
// Example Result: bool(true)
@@ -251,9 +241,7 @@ Property Initializable Information
251241
----------------------------------
252242

253243
Extractors that implement :class:`Symfony\\Component\\PropertyInfo\\PropertyInitializableExtractorInterface`
254-
provide whether properties are initializable through the class's constructor as booleans.
255-
256-
.. code-block:: php
244+
provide whether properties are initializable through the class's constructor as booleans::
257245

258246
$propertyInfo->isInitializable($class, $property);
259247
// Example Result: bool(true)
@@ -413,9 +401,7 @@ Using `phpDocumentor Reflection`_ to parse property and method annotations,
413401
the :class:`Symfony\\Component\\PropertyInfo\\Extractor\\PhpDocExtractor`
414402
provides type and description information. This extractor is automatically
415403
registered with the ``property_info`` in the Symfony Framework *if* the dependent
416-
library is present.
417-
418-
.. code-block:: php
404+
library is present::
419405

420406
use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;
421407

@@ -438,9 +424,7 @@ Using :ref:`groups metadata <serializer-using-serialization-groups-annotations>`
438424
from the :doc:`Serializer component </components/serializer>`,
439425
the :class:`Symfony\\Component\\PropertyInfo\\Extractor\\SerializerExtractor`
440426
provides list information. This extractor is *not* registered automatically
441-
with the ``property_info`` service in the Symfony Framework.
442-
443-
.. code-block:: php
427+
with the ``property_info`` service in the Symfony Framework::
444428

445429
use Doctrine\Common\Annotations\AnnotationReader;
446430
use Symfony\Component\PropertyInfo\Extractor\SerializerExtractor;
@@ -466,9 +450,7 @@ DoctrineExtractor
466450
Using entity mapping data from `Doctrine ORM`_, the
467451
:class:`Symfony\\Bridge\\Doctrine\\PropertyInfo\\DoctrineExtractor`
468452
provides list and type information. This extractor is not registered automatically
469-
with the ``property_info`` service in the Symfony Framework.
470-
471-
.. code-block:: php
453+
with the ``property_info`` service in the Symfony Framework::
472454

473455
use Doctrine\ORM\EntityManager;
474456
use Doctrine\ORM\Tools\Setup;

components/serializer.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,9 +1102,7 @@ If you want to deserialize such a structure, you need to add the
11021102
:class:`Symfony\\Component\\Serializer\\Normalizer\\ArrayDenormalizer`
11031103
to the set of normalizers. By appending ``[]`` to the type parameter of the
11041104
:method:`Symfony\\Component\\Serializer\\Serializer::deserialize` method,
1105-
you indicate that you're expecting an array instead of a single object.
1106-
1107-
.. code-block:: php
1105+
you indicate that you're expecting an array instead of a single object::
11081106

11091107
use Symfony\Component\Serializer\Encoder\JsonEncoder;
11101108
use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer;

components/var_dumper/advanced.rst

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,7 @@ bit field of ``Caster::EXCLUDE_*`` constants and influences the expected
215215
output produced by the different casters.
216216

217217
If ``DUMP_STRING_LENGTH`` is set, then the length of a string is displayed
218-
next to its content:
219-
220-
.. code-block:: php
218+
next to its content::
221219

222220
use Symfony\Component\VarDumper\Dumper\AbstractDumper;
223221
use Symfony\Component\VarDumper\Dumper\CliDumper;
@@ -239,9 +237,7 @@ next to its content:
239237
// ]
240238

241239
If ``DUMP_LIGHT_ARRAY`` is set, then arrays are dumped in a shortened format
242-
similar to PHP's short array notation:
243-
244-
.. code-block:: php
240+
similar to PHP's short array notation::
245241

246242
use Symfony\Component\VarDumper\Dumper\AbstractDumper;
247243
use Symfony\Component\VarDumper\Dumper\CliDumper;
@@ -263,9 +259,7 @@ similar to PHP's short array notation:
263259
// ]
264260

265261
If you would like to use both options, then you can combine them by
266-
using a the logical OR operator ``|``:
267-
268-
.. code-block:: php
262+
using a the logical OR operator ``|``::
269263

270264
use Symfony\Component\VarDumper\Dumper\AbstractDumper;
271265
use Symfony\Component\VarDumper\Dumper\CliDumper;

contributing/code/standards.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ Symfony Coding Standards in Detail
2727
----------------------------------
2828

2929
If you want to learn about the Symfony coding standards in detail, here's a
30-
short example containing most features described below:
31-
32-
.. code-block:: php
30+
short example containing most features described below::
3331

3432
/*
3533
* This file is part of the Symfony package.

deployment/proxies.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ Solution: setTrustedProxies()
2222
-----------------------------
2323

2424
To fix this, you need to tell Symfony which reverse proxy IP addresses to trust
25-
and what headers your reverse proxy uses to send information:
26-
27-
.. code-block:: php
25+
and what headers your reverse proxy uses to send information::
2826

2927
// public/index.php
3028

form/data_mappers.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ one of the values is changed.
7878

7979
The red, green and blue form fields have to be mapped to the constructor
8080
arguments and the ``Color`` instance has to be mapped to red, green and blue
81-
form fields. Recognize a familiar pattern? It's time for a data mapper!
82-
83-
.. code-block:: php
81+
form fields. Recognize a familiar pattern? It's time for a data mapper::
8482

8583
// src/App/Form/DataMapper/ColorMapper.php
8684
namespace App\Form\DataMapper;

form/without_class.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ but here's a short example::
103103

104104
If you are using validation groups, you need to either reference the
105105
``Default`` group when creating the form, or set the correct group on
106-
the constraint you are adding.
107-
108-
.. code-block:: php
106+
the constraint you are adding::
109107

110108
new NotBlank(['groups' => ['create', 'update']]);
111109

security/user_checkers.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ User checkers are classes that must implement the
1616
defines two methods called ``checkPreAuth()`` and ``checkPostAuth()`` to
1717
perform checks before and after user authentication. If one or more conditions
1818
are not met, an exception should be thrown which extends the
19-
:class:`Symfony\\Component\\Security\\Core\\Exception\\AccountStatusException`.
20-
21-
.. code-block:: php
19+
:class:`Symfony\\Component\\Security\\Core\\Exception\\AccountStatusException`::
2220

2321
namespace App\Security;
2422

service_container/tags.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,7 @@ first constructor argument to the ``App\HandlerCollection`` service:
513513
->addArgument(new TaggedIteratorArgument('app.handler'));
514514
515515
After compilation the ``HandlerCollection`` service is able to iterate over your
516-
application handlers.
517-
518-
.. code-block:: php
516+
application handlers::
519517

520518
// src/HandlerCollection.php
521519
namespace App;

workflow/dumping-workflows.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,12 @@ Use the ``GraphvizDumper`` or ``StateMachineGraphvizDumper`` to create DOT
1212
files, or use ``PlantUmlDumper`` for PlantUML files. Both types can be converted
1313
to PNG or SVG images.
1414

15-
Images of the workflow defined above:
16-
17-
.. code-block:: php
15+
Images of the workflow defined above::
1816

1917
// dump-graph-dot.php
2018
$dumper = new GraphvizDumper();
2119
echo $dumper->dump($definition);
2220

23-
.. code-block:: php
24-
2521
// dump-graph-puml.php
2622
$dumper = new PlantUmlDumper();
2723
echo $dumper->dump($definition);

0 commit comments

Comments
 (0)