Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit72de9df

Browse files
committed
[Serializer] Rename CacheableSupportsMethodInterface to SupportsVaryInterface
1 parent0998710 commit72de9df

15 files changed

+62
-59
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CHANGELOG
44
4.1.0
55
-----
66

7-
* added`CacheableSupportsMethodInterface` for normalizers and denormalizers that use
7+
* added`SupportsVaryInterface` for normalizers and denormalizers that use
88
only the type and the format in their`supports*()` methods
99
* added`MissingConstructorArgumentsException` new exception for deserialization failure
1010
of objects that needs data insertion in constructor

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*
2828
* @author Kévin Dunglas <dunglas@gmail.com>
2929
*/
30-
abstractclass AbstractNormalizerimplements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface,CacheableSupportsMethodInterface
30+
abstractclass AbstractNormalizerimplements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface,SupportsVaryInterface
3131
{
3232
use ObjectToPopulateTrait;
3333
use SerializerAwareTrait;
@@ -150,9 +150,9 @@ public function setIgnoredAttributes(array $ignoredAttributes)
150150
/**
151151
* {@inheritdoc}
152152
*/
153-
publicfunctionhasCacheableSupportsMethod():bool
153+
publicfunctionisSupportsVaryByData():bool
154154
{
155-
returnfalse;
155+
returntrue;
156156
}
157157

158158
/**

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* @final
2626
*/
27-
class ArrayDenormalizerimplements ContextAwareDenormalizerInterface, SerializerAwareInterface,CacheableSupportsMethodInterface
27+
class ArrayDenormalizerimplements ContextAwareDenormalizerInterface, SerializerAwareInterface,SupportsVaryInterface
2828
{
2929
/**
3030
* @var SerializerInterface|DenormalizerInterface
@@ -87,8 +87,8 @@ public function setSerializer(SerializerInterface $serializer)
8787
/**
8888
* {@inheritdoc}
8989
*/
90-
publicfunctionhasCacheableSupportsMethod():bool
90+
publicfunctionisSupportsVaryByData():bool
9191
{
92-
return$this->serializerinstanceofCacheableSupportsMethodInterface &&$this->serializer->hasCacheableSupportsMethod();
92+
return!$this->serializerinstanceofSupportsVaryInterface ||$this->serializer->isSupportsVaryByData();
9393
}
9494
}

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

Lines changed: 0 additions & 26 deletions
This file was deleted.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* @author Grégoire Pineau <lyrixx@lyrixx.info>
2323
* @author Kévin Dunglas <dunglas@gmail.com>
2424
*/
25-
class ConstraintViolationListNormalizerimplements NormalizerInterface,CacheableSupportsMethodInterface
25+
class ConstraintViolationListNormalizerimplements NormalizerInterface,SupportsVaryInterface
2626
{
2727
/**
2828
* {@inheritdoc}
@@ -60,8 +60,8 @@ public function supportsNormalization($data, $format = null)
6060
/**
6161
* {@inheritdoc}
6262
*/
63-
publicfunctionhasCacheableSupportsMethod():bool
63+
publicfunctionisSupportsVaryByData():bool
6464
{
65-
return__CLASS__===\get_class($this);
65+
return__CLASS__!==\get_class($this);
6666
}
6767
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/**
1818
* @author Jordi Boggiano <j.boggiano@seld.be>
1919
*/
20-
class CustomNormalizerimplements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface,CacheableSupportsMethodInterface
20+
class CustomNormalizerimplements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface,SupportsVaryInterface
2121
{
2222
use ObjectToPopulateTrait;
2323
use SerializerAwareTrait;
@@ -71,8 +71,8 @@ public function supportsDenormalization($data, $type, $format = null)
7171
/**
7272
* {@inheritdoc}
7373
*/
74-
publicfunctionhasCacheableSupportsMethod():bool
74+
publicfunctionisSupportsVaryByData():bool
7575
{
76-
return__CLASS__===\get_class($this);
76+
return__CLASS__!==\get_class($this);
7777
}
7878
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*
2424
* @author Kévin Dunglas <dunglas@gmail.com>
2525
*/
26-
class DataUriNormalizerimplements NormalizerInterface, DenormalizerInterface,CacheableSupportsMethodInterface
26+
class DataUriNormalizerimplements NormalizerInterface, DenormalizerInterface,SupportsVaryInterface
2727
{
2828
privatestatic$supportedTypes =array(
2929
\SplFileInfo::class =>true,
@@ -122,9 +122,9 @@ public function supportsDenormalization($data, $type, $format = null)
122122
/**
123123
* {@inheritdoc}
124124
*/
125-
publicfunctionhasCacheableSupportsMethod():bool
125+
publicfunctionisSupportsVaryByData():bool
126126
{
127-
return__CLASS__===\get_class($this);
127+
return__CLASS__!==\get_class($this);
128128
}
129129

130130
/**

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @author Jérôme Parmentier <jerome@prmntr.me>
2222
*/
23-
class DateIntervalNormalizerimplements NormalizerInterface, DenormalizerInterface,CacheableSupportsMethodInterface
23+
class DateIntervalNormalizerimplements NormalizerInterface, DenormalizerInterface,SupportsVaryInterface
2424
{
2525
constFORMAT_KEY ='dateinterval_format';
2626

@@ -58,9 +58,9 @@ public function supportsNormalization($data, $format = null)
5858
/**
5959
* {@inheritdoc}
6060
*/
61-
publicfunctionhasCacheableSupportsMethod():bool
61+
publicfunctionisSupportsVaryByData():bool
6262
{
63-
return__CLASS__===\get_class($this);
63+
return__CLASS__!==\get_class($this);
6464
}
6565

6666
/**

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @author Kévin Dunglas <dunglas@gmail.com>
2222
*/
23-
class DateTimeNormalizerimplements NormalizerInterface, DenormalizerInterface,CacheableSupportsMethodInterface
23+
class DateTimeNormalizerimplements NormalizerInterface, DenormalizerInterface,SupportsVaryInterface
2424
{
2525
constFORMAT_KEY ='datetime_format';
2626
constTIMEZONE_KEY ='datetime_timezone';
@@ -119,9 +119,9 @@ public function supportsDenormalization($data, $type, $format = null)
119119
/**
120120
* {@inheritdoc}
121121
*/
122-
publicfunctionhasCacheableSupportsMethod():bool
122+
publicfunctionisSupportsVaryByData():bool
123123
{
124-
return__CLASS__===\get_class($this);
124+
return__CLASS__!==\get_class($this);
125125
}
126126

127127
/**

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ public function supportsDenormalization($data, $type, $format = null)
5555
/**
5656
* {@inheritdoc}
5757
*/
58-
publicfunctionhasCacheableSupportsMethod():bool
58+
publicfunctionisSupportsVaryByData():bool
5959
{
60-
return__CLASS__===\get_class($this);
60+
return__CLASS__!==\get_class($this);
6161
}
6262

6363
/**

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp