Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8425f1b

Browse filesBrowse files
committed
[Serializer] remove remaining deprecated features
1 parent 6da6853 commit 8425f1b
Copy full SHA for 8425f1b

File tree

6 files changed

+17
-70
lines changed
Filter options

6 files changed

+17
-70
lines changed

‎src/Symfony/Component/Serializer/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
CHANGELOG
22
=========
33

4+
4.0.0
5+
-----
6+
7+
* removed the `SerializerAwareEncoder` and `SerializerAwareNormalizer` classes,
8+
use the `SerializerAwareTrait` instead
9+
* removed the `Serializer::$normalizerCache` and `Serializer::$denormalizerCache`
10+
properties
11+
412
3.3.0
513
-----
614

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Encoder/SerializerAwareEncoder.php
-27Lines changed: 0 additions & 27 deletions
This file was deleted.

‎src/Symfony/Component/Serializer/Encoder/XmlEncoder.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Encoder/XmlEncoder.php
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
namespace Symfony\Component\Serializer\Encoder;
1313

1414
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
15+
use Symfony\Component\Serializer\SerializerAwareInterface;
16+
use Symfony\Component\Serializer\SerializerAwareTrait;
1517

1618
/**
1719
* Encodes XML data.
@@ -21,8 +23,10 @@
2123
* @author Fabian Vogler <fabian@equivalence.ch>
2224
* @author Kévin Dunglas <dunglas@gmail.com>
2325
*/
24-
class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, DecoderInterface, NormalizationAwareInterface
26+
class XmlEncoder implements EncoderInterface, DecoderInterface, NormalizationAwareInterface, SerializerAwareInterface
2527
{
28+
use SerializerAwareTrait;
29+
2630
const FORMAT = 'xml';
2731

2832
/**

‎src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@
1919
use Symfony\Component\Serializer\Mapping\AttributeMetadataInterface;
2020
use Symfony\Component\Serializer\NameConverter\NameConverterInterface;
2121
use Symfony\Component\Serializer\SerializerAwareInterface;
22+
use Symfony\Component\Serializer\SerializerAwareTrait;
2223

2324
/**
2425
* Normalizer implementation.
2526
*
2627
* @author Kévin Dunglas <dunglas@gmail.com>
2728
*/
28-
abstract class AbstractNormalizer extends SerializerAwareNormalizer implements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface
29+
abstract class AbstractNormalizer implements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface
2930
{
31+
use SerializerAwareTrait;
32+
3033
const CIRCULAR_REFERENCE_LIMIT = 'circular_reference_limit';
3134
const OBJECT_TO_POPULATE = 'object_to_populate';
3235
const GROUPS = 'groups';

‎src/Symfony/Component/Serializer/Normalizer/SerializerAwareNormalizer.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Normalizer/SerializerAwareNormalizer.php
-27Lines changed: 0 additions & 27 deletions
This file was deleted.

‎src/Symfony/Component/Serializer/Serializer.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Serializer.php
-14Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,6 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
5454
*/
5555
protected $normalizers = array();
5656

57-
/**
58-
* @var array
59-
*
60-
* @deprecated since 3.1 will be removed in 4.0
61-
*/
62-
protected $normalizerCache = array();
63-
64-
/**
65-
* @var array
66-
*
67-
* @deprecated since 3.1 will be removed in 4.0
68-
*/
69-
protected $denormalizerCache = array();
70-
7157
public function __construct(array $normalizers = array(), array $encoders = array())
7258
{
7359
foreach ($normalizers as $normalizer) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.