[Serializer] remove remaining deprecated features

This commit is contained in:
Christian Flothmann 2017-05-25 10:56:57 +02:00
parent 6da68536f0
commit 8425f1b748
6 changed files with 17 additions and 70 deletions

View File

@ -1,6 +1,14 @@
CHANGELOG
=========
4.0.0
-----
* removed the `SerializerAwareEncoder` and `SerializerAwareNormalizer` classes,
use the `SerializerAwareTrait` instead
* removed the `Serializer::$normalizerCache` and `Serializer::$denormalizerCache`
properties
3.3.0
-----

View File

@ -1,27 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Serializer\Encoder;
use Symfony\Component\Serializer\SerializerAwareInterface;
use Symfony\Component\Serializer\SerializerAwareTrait;
/**
* SerializerAware Encoder implementation.
*
* @author Jordi Boggiano <j.boggiano@seld.be>
*
* @deprecated since version 3.2, to be removed in 4.0. Use the SerializerAwareTrait instead.
*/
abstract class SerializerAwareEncoder implements SerializerAwareInterface
{
use SerializerAwareTrait;
}

View File

@ -12,6 +12,8 @@
namespace Symfony\Component\Serializer\Encoder;
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
use Symfony\Component\Serializer\SerializerAwareInterface;
use Symfony\Component\Serializer\SerializerAwareTrait;
/**
* Encodes XML data.
@ -21,8 +23,10 @@ use Symfony\Component\Serializer\Exception\UnexpectedValueException;
* @author Fabian Vogler <fabian@equivalence.ch>
* @author Kévin Dunglas <dunglas@gmail.com>
*/
class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, DecoderInterface, NormalizationAwareInterface
class XmlEncoder implements EncoderInterface, DecoderInterface, NormalizationAwareInterface, SerializerAwareInterface
{
use SerializerAwareTrait;
const FORMAT = 'xml';
/**

View File

@ -19,14 +19,17 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface;
use Symfony\Component\Serializer\Mapping\AttributeMetadataInterface;
use Symfony\Component\Serializer\NameConverter\NameConverterInterface;
use Symfony\Component\Serializer\SerializerAwareInterface;
use Symfony\Component\Serializer\SerializerAwareTrait;
/**
* Normalizer implementation.
*
* @author Kévin Dunglas <dunglas@gmail.com>
*/
abstract class AbstractNormalizer extends SerializerAwareNormalizer implements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface
abstract class AbstractNormalizer implements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface
{
use SerializerAwareTrait;
const CIRCULAR_REFERENCE_LIMIT = 'circular_reference_limit';
const OBJECT_TO_POPULATE = 'object_to_populate';
const GROUPS = 'groups';

View File

@ -1,27 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Serializer\Normalizer;
use Symfony\Component\Serializer\SerializerAwareTrait;
use Symfony\Component\Serializer\SerializerAwareInterface;
/**
* SerializerAware Normalizer implementation.
*
* @author Jordi Boggiano <j.boggiano@seld.be>
*
* @deprecated since version 3.1, to be removed in 4.0. Use the SerializerAwareTrait instead.
*/
abstract class SerializerAwareNormalizer implements SerializerAwareInterface
{
use SerializerAwareTrait;
}

View File

@ -54,20 +54,6 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
*/
protected $normalizers = array();
/**
* @var array
*
* @deprecated since 3.1 will be removed in 4.0
*/
protected $normalizerCache = array();
/**
* @var array
*
* @deprecated since 3.1 will be removed in 4.0
*/
protected $denormalizerCache = array();
public function __construct(array $normalizers = array(), array $encoders = array())
{
foreach ($normalizers as $normalizer) {