Skip to content

Commit 5a575f6

Browse files
committed
minor #11294 Fixed the RST syntax of a serializer article (javiereguiluz)
This PR was merged into the 3.4 branch. Discussion ---------- Fixed the RST syntax of a serializer article Fixes the issue I introduced while merging #11281. Commits ------- 821d156 Fixed the RST syntax of a serializer article
2 parents bacdc6f + 821d156 commit 5a575f6

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

components/serializer.rst

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -252,29 +252,27 @@ that will be used by the normalizer must be aware of the format to use.
252252
The following code shows how to initialize the :class:`Symfony\\Component\\Serializer\\Mapping\\Factory\\ClassMetadataFactory`
253253
for each format:
254254

255-
.. configuration-block::
256-
257-
.. code-block:: php-annotations
255+
* Annotations in PHP files::
258256

259-
use Doctrine\Common\Annotations\AnnotationReader;
260-
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
261-
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
257+
use Doctrine\Common\Annotations\AnnotationReader;
258+
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
259+
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
262260

263-
$classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()));
261+
$classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()));
264262

265-
.. code-block:: yaml
263+
* XML files::
266264

267-
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
268-
use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader;
265+
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
266+
use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader;
269267

270-
$classMetadataFactory = new ClassMetadataFactory(new YamlFileLoader('/path/to/your/definition.yml'));
268+
$classMetadataFactory = new ClassMetadataFactory(new YamlFileLoader('/path/to/your/definition.yml'));
271269

272-
.. code-block:: xml
270+
* YAML files::
273271

274-
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
275-
use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader;
272+
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
273+
use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader;
276274

277-
$classMetadataFactory = new ClassMetadataFactory(new XmlFileLoader('/path/to/your/definition.xml'));
275+
$classMetadataFactory = new ClassMetadataFactory(new XmlFileLoader('/path/to/your/definition.xml'));
278276

279277
.. _component-serializer-attributes-groups-annotations:
280278

0 commit comments

Comments
 (0)