feature #22907 [Serializer] remove remaining deprecated features (xabbuh)
This PR was merged into the 4.0-dev branch.
Discussion
----------
[Serializer] remove remaining deprecated features
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
8425f1b748
[Serializer] remove remaining deprecated features
This commit is contained in:
commit
7a279c65c2
@ -1,6 +1,14 @@
|
|||||||
CHANGELOG
|
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
|
3.3.0
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
@ -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;
|
|
||||||
}
|
|
@ -12,6 +12,8 @@
|
|||||||
namespace Symfony\Component\Serializer\Encoder;
|
namespace Symfony\Component\Serializer\Encoder;
|
||||||
|
|
||||||
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
|
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
|
||||||
|
use Symfony\Component\Serializer\SerializerAwareInterface;
|
||||||
|
use Symfony\Component\Serializer\SerializerAwareTrait;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encodes XML data.
|
* Encodes XML data.
|
||||||
@ -21,8 +23,10 @@ use Symfony\Component\Serializer\Exception\UnexpectedValueException;
|
|||||||
* @author Fabian Vogler <fabian@equivalence.ch>
|
* @author Fabian Vogler <fabian@equivalence.ch>
|
||||||
* @author Kévin Dunglas <dunglas@gmail.com>
|
* @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';
|
const FORMAT = 'xml';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,14 +19,17 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface;
|
|||||||
use Symfony\Component\Serializer\Mapping\AttributeMetadataInterface;
|
use Symfony\Component\Serializer\Mapping\AttributeMetadataInterface;
|
||||||
use Symfony\Component\Serializer\NameConverter\NameConverterInterface;
|
use Symfony\Component\Serializer\NameConverter\NameConverterInterface;
|
||||||
use Symfony\Component\Serializer\SerializerAwareInterface;
|
use Symfony\Component\Serializer\SerializerAwareInterface;
|
||||||
|
use Symfony\Component\Serializer\SerializerAwareTrait;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Normalizer implementation.
|
* Normalizer implementation.
|
||||||
*
|
*
|
||||||
* @author Kévin Dunglas <dunglas@gmail.com>
|
* @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 CIRCULAR_REFERENCE_LIMIT = 'circular_reference_limit';
|
||||||
const OBJECT_TO_POPULATE = 'object_to_populate';
|
const OBJECT_TO_POPULATE = 'object_to_populate';
|
||||||
const GROUPS = 'groups';
|
const GROUPS = 'groups';
|
||||||
|
@ -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;
|
|
||||||
}
|
|
@ -54,20 +54,6 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
|
|||||||
*/
|
*/
|
||||||
protected $normalizers = array();
|
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())
|
public function __construct(array $normalizers = array(), array $encoders = array())
|
||||||
{
|
{
|
||||||
foreach ($normalizers as $normalizer) {
|
foreach ($normalizers as $normalizer) {
|
||||||
|
Reference in New Issue
Block a user