From f015d8f86f00ce02a69820a198ece0a4320d96b2 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo <1102197+priyadi@users.noreply.github.com> Date: Wed, 21 Feb 2024 19:08:01 +0700 Subject: [PATCH] refactor: Deprecate serializer context. --- CHANGELOG.md | 1 + psalm.xml | 5 +++++ src/Serializer/AbstractSerializerContext.php | 1 + src/Serializer/DenormalizerContext.php | 4 ++++ src/Serializer/NormalizerContext.php | 4 ++++ 5 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc9213b7..4e43acec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ the current value in a dynamic property is a scalar. * feat(`PresetMappingFactory`): Add `fromObjectCache()` and `fromObjectCacheReversed()`. * chore: Simplify remembering mapper. +* refactor: Deprecate serializer context. ## 1.0.0 diff --git a/psalm.xml b/psalm.xml index 7871c0e2..d18deb97 100644 --- a/psalm.xml +++ b/psalm.xml @@ -94,6 +94,11 @@ + + + + + diff --git a/src/Serializer/AbstractSerializerContext.php b/src/Serializer/AbstractSerializerContext.php index 6db3750c..c8d0c2b3 100644 --- a/src/Serializer/AbstractSerializerContext.php +++ b/src/Serializer/AbstractSerializerContext.php @@ -18,6 +18,7 @@ /** * @implements \ArrayAccess * @implements \IteratorAggregate + * @deprecated */ abstract class AbstractSerializerContext implements \ArrayAccess, diff --git a/src/Serializer/DenormalizerContext.php b/src/Serializer/DenormalizerContext.php index 6897a6d5..e6b674c7 100644 --- a/src/Serializer/DenormalizerContext.php +++ b/src/Serializer/DenormalizerContext.php @@ -13,6 +13,10 @@ namespace Rekalogika\Mapper\Serializer; +/** + * @deprecated + * @phpstan-ignore-next-line + */ class DenormalizerContext extends AbstractSerializerContext { } diff --git a/src/Serializer/NormalizerContext.php b/src/Serializer/NormalizerContext.php index 5811f72e..76745fe5 100644 --- a/src/Serializer/NormalizerContext.php +++ b/src/Serializer/NormalizerContext.php @@ -13,6 +13,10 @@ namespace Rekalogika\Mapper\Serializer; +/** + * @deprecated + * @phpstan-ignore-next-line + */ class NormalizerContext extends AbstractSerializerContext { }