Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bbb4d4e

Browse files
committed
Rename the interface to NormalizerWithCacheableSupportResultInterface
1 parent e4bfe2f commit bbb4d4e

9 files changed

+11
-11
lines changed

src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*
3131
* @author Kévin Dunglas <[email protected]>
3232
*/
33-
abstract class AbstractObjectNormalizer extends AbstractNormalizer implements ContextFreeCacheNormalizerInterface
33+
abstract class AbstractObjectNormalizer extends AbstractNormalizer implements NormalizerWithCacheableSupportResultInterface
3434
{
3535
const ENABLE_MAX_DEPTH = 'enable_max_depth';
3636
const DEPTH_KEY_PATTERN = 'depth_%s::%s';

src/Symfony/Component/Serializer/Normalizer/ConstraintViolationListNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* @author Grégoire Pineau <[email protected]>
2323
* @author Kévin Dunglas <[email protected]>
2424
*/
25-
class ConstraintViolationListNormalizer implements NormalizerInterface, ContextFreeCacheNormalizerInterface
25+
class ConstraintViolationListNormalizer implements NormalizerInterface, NormalizerWithCacheableSupportResultInterface
2626
{
2727
/**
2828
* {@inheritdoc}

src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/**
1818
* @author Jordi Boggiano <[email protected]>
1919
*/
20-
class CustomNormalizer implements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface, ContextFreeCacheNormalizerInterface
20+
class CustomNormalizer implements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface, NormalizerWithCacheableSupportResultInterface
2121
{
2222
use ObjectToPopulateTrait;
2323
use SerializerAwareTrait;

src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*
2424
* @author Kévin Dunglas <[email protected]>
2525
*/
26-
class DataUriNormalizer implements NormalizerInterface, DenormalizerInterface, ContextFreeCacheNormalizerInterface
26+
class DataUriNormalizer implements NormalizerInterface, DenormalizerInterface, NormalizerWithCacheableSupportResultInterface
2727
{
2828
private static $supportedTypes = array(
2929
\SplFileInfo::class => true,

src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @author Jérôme Parmentier <[email protected]>
2222
*/
23-
class DateIntervalNormalizer implements NormalizerInterface, DenormalizerInterface, ContextFreeCacheNormalizerInterface
23+
class DateIntervalNormalizer implements NormalizerInterface, DenormalizerInterface, NormalizerWithCacheableSupportResultInterface
2424
{
2525
const FORMAT_KEY = 'dateinterval_format';
2626

src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @author Kévin Dunglas <[email protected]>
2222
*/
23-
class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface, ContextFreeCacheNormalizerInterface
23+
class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface, NormalizerWithCacheableSupportResultInterface
2424
{
2525
const FORMAT_KEY = 'datetime_format';
2626
const TIMEZONE_KEY = 'datetime_timezone';

src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
* @author Fred Cox <[email protected]>
2121
*/
22-
class JsonSerializableNormalizer extends AbstractNormalizer implements ContextFreeCacheNormalizerInterface
22+
class JsonSerializableNormalizer extends AbstractNormalizer implements NormalizerWithCacheableSupportResultInterface
2323
{
2424
/**
2525
* {@inheritdoc}

src/Symfony/Component/Serializer/Normalizer/ContextFreeCacheNormalizerInterface.php renamed to src/Symfony/Component/Serializer/Normalizer/NormalizerWithCacheableSupportResultInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
namespace Symfony\Component\Serializer\Normalizer;
1313

1414
/**
15-
* Lets the normalizer advertise if the returns of its "supportsNormalization" method is cacheable.
15+
* "supportsNormalization()" methods of normalizers implementing this interface have a cacheable return.
1616
*
1717
* @author Kévin Dunglas <[email protected]>
1818
*/
19-
interface ContextFreeCacheNormalizerInterface
19+
interface NormalizerWithCacheableSupportResultInterface
2020
{
2121
}

src/Symfony/Component/Serializer/Serializer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
2727
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
2828
use Symfony\Component\Serializer\Exception\LogicException;
29-
use Symfony\Component\Serializer\Normalizer\ContextFreeCacheNormalizerInterface;
29+
use Symfony\Component\Serializer\Normalizer\NormalizerWithCacheableSupportResultInterface;
3030

3131
/**
3232
* Serializer serializes and deserializes data.
@@ -219,7 +219,7 @@ private function getNormalizer($data, $format, array $context)
219219
continue;
220220
}
221221

222-
$cacheable = $cacheable && $normalizer instanceof ContextFreeCacheNormalizerInterface;
222+
$cacheable = $cacheable && $normalizer instanceof NormalizerWithCacheableSupportResultInterface;
223223
if ($normalizer->supportsNormalization($data, $format, $context)) {
224224
if ($cacheable) {
225225
$this->normalizerCache[$type][$format] = $normalizer;

0 commit comments

Comments
 (0)