Skip to content

Commit 4fd1613

Browse files
[PropertyInfo][Serializer] Remove AnnotationLoader
1 parent bcb0422 commit 4fd1613

File tree

3 files changed

+1
-38
lines changed

3 files changed

+1
-38
lines changed

_build/redirection_map

+1
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,7 @@
526526
/components https://symfony.com/components
527527
/components/index https://symfony.com/components
528528
/serializer/normalizers /components/serializer#normalizers
529+
/components/serializer#component-serializer-attributes-groups-annotations /components/serializer#component-serializer-attributes-groups-attributes
529530
/logging/monolog_regex_based_excludes /logging/monolog_exclude_http_codes
530531
/security/named_encoders /security/named_hashers
531532
/components/inflector /components/string#inflector

components/property_info.rst

-14
Original file line numberDiff line numberDiff line change
@@ -468,20 +468,6 @@ with the ``property_info`` service in the Symfony Framework::
468468
// the `serializer_groups` option must be configured (may be set to null)
469469
$serializerExtractor->getProperties($class, ['serializer_groups' => ['mygroup']]);
470470

471-
.. versionadded:: 6.4
472-
473-
The
474-
:class:`Symfony\\Component\\Serializer\\Mapping\\Loader\\AttributeLoader`
475-
was introduced in Symfony 6.4. Prior to this, the
476-
:class:`Symfony\\Component\\Serializer\\Mapping\\Loader\\AnnotationLoader`
477-
must be used.
478-
479-
.. deprecated:: 6.4
480-
481-
The
482-
:class:`Symfony\\Component\\Serializer\\Mapping\\Loader\\AnnotationLoader`
483-
was deprecated in Symfony 6.4.
484-
485471
If ``serializer_groups`` is set to ``null``, serializer groups metadata won't be
486472
checked but you will get only the properties considered by the Serializer
487473
Component (notably the ``#[Ignore]`` attribute is taken into account).

components/serializer.rst

-24
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,6 @@ that will be used by the normalizer must be aware of the format to use.
271271
The following code shows how to initialize the :class:`Symfony\\Component\\Serializer\\Mapping\\Factory\\ClassMetadataFactory`
272272
for each format:
273273

274-
* Annotations in PHP files::
275-
276-
use Doctrine\Common\Annotations\AnnotationReader;
277-
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
278-
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
279-
280-
$classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()));
281-
282274
* Attributes in PHP files::
283275

284276
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
@@ -300,22 +292,6 @@ for each format:
300292

301293
$classMetadataFactory = new ClassMetadataFactory(new XmlFileLoader('/path/to/your/definition.xml'));
302294

303-
.. versionadded:: 6.4
304-
305-
The
306-
:class:`Symfony\\Component\\Serializer\\Mapping\\Loader\\AttributeLoader`
307-
was introduced in Symfony 6.4. Prior to this, the
308-
:class:`Symfony\\Component\\Serializer\\Mapping\\Loader\\AnnotationLoader`
309-
must be used.
310-
311-
.. deprecated:: 6.4
312-
313-
Reading annotations in PHP files is deprecated since Symfony 6.4.
314-
Also, the
315-
:class:`Symfony\\Component\\Serializer\\Mapping\\Loader\\AnnotationLoader`
316-
was deprecated in Symfony 6.4.
317-
318-
.. _component-serializer-attributes-groups-annotations:
319295
.. _component-serializer-attributes-groups-attributes:
320296

321297
Then, create your groups definition:

0 commit comments

Comments
 (0)