Skip to content

Commit e4177a0

Browse files
committed
feature symfony#18483 [Serializer] Deprecate SerializerAwareEncoder (JhonnyL)
This PR was merged into the 3.2-dev branch. Discussion ---------- [Serializer] Deprecate SerializerAwareEncoder | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- af57467 [Serializer] Deprecate SerializerAwareEncoder
2 parents 4a02c88 + af57467 commit e4177a0

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/Symfony/Component/Serializer/Encoder/SerializerAwareEncoder.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,17 @@
1111

1212
namespace Symfony\Component\Serializer\Encoder;
1313

14-
use Symfony\Component\Serializer\SerializerInterface;
1514
use Symfony\Component\Serializer\SerializerAwareInterface;
15+
use Symfony\Component\Serializer\SerializerAwareTrait;
1616

1717
/**
1818
* SerializerAware Encoder implementation.
1919
*
2020
* @author Jordi Boggiano <[email protected]>
21+
*
22+
* @deprecated since version 3.2, to be removed in 4.0. Use the SerializerAwareTrait instead.
2123
*/
2224
abstract class SerializerAwareEncoder implements SerializerAwareInterface
2325
{
24-
protected $serializer;
25-
26-
/**
27-
* {@inheritdoc}
28-
*/
29-
public function setSerializer(SerializerInterface $serializer)
30-
{
31-
$this->serializer = $serializer;
32-
}
26+
use SerializerAwareTrait;
3327
}

0 commit comments

Comments
 (0)