8000 Merge branch '3.4' into 4.2 · symfony/symfony-docs@9010811 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9010811

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: Fixed the RST syntax of a serializer article
2 parents d31f369 + 5a575f6 commit 9010811

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
@@ -248,29 +248,27 @@ that will be used by the normalizer must be aware of the format to use.
248248
The following code shows how to initialize the :class:`Symfony\\Component\\Serializer\\Mapping\\Factory\\ClassMetadataFactory`
249249
for each format:
250250

251-
.. configuration-block::
252-
253-
.. code-block:: php-annotations
251+
* Annotations in PHP files::
254252

255-
use Doctrine\Common\Annotations\AnnotationReader;
256-
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
257-
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
253+
use Doctrine\Common\Annotations\AnnotationReader;
254+
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
255+
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
258256

259-
$classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()));
257+
$classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()));
260258

261-
.. code-block:: yaml
259+
* XML files::
262260

263-
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
264-
use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader;
261+
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
262+
use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader;
265263

266-
$classMetadataFactory = new ClassMetadataFactory(new YamlFileLoader('/path/to/your/definition.yaml'));
264+
$classMetadataFactory = new ClassMetadataFactory(new YamlFileLoader('/path/to/your/definition.yaml'));
267265

268-
.. code-block:: xml
266+
* YAML files::
269267

270-
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
271-
use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader;
268+
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
269+
use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader;
272270

273-
$classMetadataFactory = new ClassMetadataFactory(new XmlFileLoader('/path/to/your/definition.xml'));
271+
$classMetadataFactory = new ClassMetadataFactory(new XmlFileLoader('/path/to/your/definition.xml'));
274272

275273
.. _component-serializer-attributes-groups-annotations:
276274

0 commit comments

Comments
 (0)
0