Skip to content

Commit 1cacc0b

Browse files
committed
fix(test): drop stale serializer 8.1 deprecation guard on ported enum test
The 3-way merge of #8389 correctly dropped the deprecation-expectation guard (imports + #[IgnoreDeprecations] + version check) that #8287 had already removed from the sibling test, since 4.4's DenormalizationViolationFactory prefers getNotNormalizableValueErrors() over the deprecated getErrors() whenever it exists and so never triggers that deprecation on symfony/serializer >=8.1. But #8389 also introduced a brand-new test reusing the same now-unimported VersionParser/IgnoreDeprecations symbols, which the textual merge could not reconcile: it left the merged file referencing classes with no matching use statement. Remove the same stale guard from the new test for the same reason #8287 removed it from the old one.
1 parent 722ed09 commit 1cacc0b

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

tests/Functional/EnumDenormalizationValidationTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,8 @@ public function testInvalidBackedEnumValueWithCollectDenormalizationErrors(): vo
8080
/**
8181
* @see https://github.com/api-platform/core/issues/8388
8282
*/
83-
#[IgnoreDeprecations]
8483
public function testWrongTypeForBackedEnumReportsAcceptedScalarTypes(): void
8584
{
86-
if (InstalledVersions::satisfies(new VersionParser(), 'symfony/serializer', '>=8.1')) {
87-
$this->expectUserDeprecationMessage('Since symfony/serializer 8.1: The "Symfony\Component\Serializer\Exception\PartialDenormalizationException::getErrors()" method is deprecated, use "Symfony\Component\Serializer\Exception\PartialDenormalizationException::getNotNormalizableValueErrors()" instead.');
88-
}
89-
9085
$response = static::createClient()->request('POST', '/enum_validation_resources_collect', [
9186
'headers' => ['Content-Type' => 'application/ld+json'],
9287
'json' => ['gender' => true],

0 commit comments

Comments
 (0)