Skip to content

Commit eb41d7a

Browse files
committed
minor symfony#58337 [Serializer] fix tests (xabbuh)
This PR was merged into the 7.1 branch. Discussion ---------- [Serializer] fix tests | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- 08a0b4c fix tests
2 parents 717d2c9 + 08a0b4c commit eb41d7a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;
1616
use Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor;
1717
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;
18+
use Symfony\Component\PropertyInfo\PropertyDocBlockExtractorInterface;
1819
use Symfony\Component\PropertyInfo\PropertyInfoExtractor;
1920
use Symfony\Component\PropertyInfo\Type as LegacyType;
2021
use Symfony\Component\Serializer\Attribute\Context;
@@ -1274,6 +1275,10 @@ protected function isAllowedAttribute($classOrObject, string $attribute, ?string
12741275

12751276
public function testDenormalizeTemplateType()
12761277
{
1278+
if (!interface_exists(PropertyDocBlockExtractorInterface::class)) {
1279+
$this->markTestSkipped('The PropertyInfo component before Symfony 7.1 does not support template types.');
1280+
}
1281+
12771282
$normalizer = new class (
12781283
classMetadataFactory: new ClassMetadataFactory(new AttributeLoader()),
12791284
propertyTypeExtractor: new PropertyInfoExtractor(typeExtractors: [new PhpStanExtractor(), new ReflectionExtractor()])

src/Symfony/Component/Serializer/composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
},
2323
"require-dev": {
2424
"phpdocumentor/reflection-docblock": "^3.2|^4.0|^5.0",
25+
"phpstan/phpdoc-parser": "^1.0",
2526
"seld/jsonlint": "^1.10",
2627
"symfony/cache": "^6.4|^7.0",
2728
"symfony/config": "^6.4|^7.0",
@@ -37,7 +38,7 @@
3738
"symfony/property-access": "^6.4|^7.0",
3839
"symfony/property-info": "^6.4|^7.0",
3940
"symfony/translation-contracts": "^2.5|^3",
40-
"symfony/type-info": "^7.1",
41+
"symfony/type-info": "^7.1.5",
4142
"symfony/uid": "^6.4|^7.0",
4243
"symfony/validator": "^6.4|^7.0",
4344
"symfony/var-dumper": "^6.4|^7.0",
@@ -50,6 +51,7 @@
5051
"symfony/dependency-injection": "<6.4",
5152
"symfony/property-access": "<6.4",
5253
"symfony/property-info": "<6.4",
54+
"symfony/type-info": "<7.1.5",
5355
"symfony/uid": "<6.4",
5456
"symfony/validator": "<6.4",
5557
"symfony/yaml": "<6.4"

0 commit comments

Comments
 (0)