|
16 | 16 | use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;
|
17 | 17 | use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;
|
18 | 18 | use Symfony\Component\PropertyInfo\PropertyInfoExtractor;
|
19 |
| -use Symfony\Component\Serializer\Annotation\Ignore; |
20 | 19 | use Symfony\Component\Serializer\Exception\LogicException;
|
21 | 20 | use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
|
22 | 21 | use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
|
|
30 | 29 | use Symfony\Component\Serializer\Serializer;
|
31 | 30 | use Symfony\Component\Serializer\SerializerInterface;
|
32 | 31 | use Symfony\Component\Serializer\Tests\Fixtures\Annotations\GroupDummy;
|
| 32 | +use Symfony\Component\Serializer\Tests\Fixtures\Attributes\ClassWithIgnoreAttribute; |
33 | 33 | use Symfony\Component\Serializer\Tests\Fixtures\CircularReferenceDummy;
|
34 | 34 | use Symfony\Component\Serializer\Tests\Fixtures\SiblingHolder;
|
35 | 35 | use Symfony\Component\Serializer\Tests\Normalizer\Features\CacheableObjectAttributesTestTrait;
|
@@ -431,6 +431,9 @@ public function testNoStaticGetSetSupport()
|
431 | 431 | $this->assertFalse($this->normalizer->supportsNormalization(new ObjectWithJustStaticSetterDummy()));
|
432 | 432 | }
|
433 | 433 |
|
| 434 | + /** |
| 435 | + * @requires PHP 8 |
| 436 | + */ |
434 | 437 | public function testNotIgnoredMethodSupport()
|
435 | 438 | {
|
436 | 439 | $this->assertFalse($this->normalizer->supportsNormalization(new ClassWithIgnoreAttribute()));
|
@@ -759,14 +762,3 @@ public function __call($key, $value)
|
759 | 762 | throw new \RuntimeException('__call should not be called. Called with: '.$key);
|
760 | 763 | }
|
761 | 764 | }
|
762 |
| - |
763 |
| -class ClassWithIgnoreAttribute |
764 |
| -{ |
765 |
| - public string $foo; |
766 |
| - |
767 |
| - #[Ignore] |
768 |
| - public function isSomeIgnoredMethod(): bool |
769 |
| - { |
770 |
| - return true; |
771 |
| - } |
772 |
| -} |
0 commit comments