Skip to content

Commit 573df71

Browse files
authored
test: drop stale serializer 8.1 getErrors() deprecation expectation (#8287)
1 parent e62e42f commit 573df71

2 files changed

Lines changed: 0 additions & 15 deletions

File tree

tests/Functional/EnumDenormalizationValidationTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
use ApiPlatform\Tests\Fixtures\TestBundle\ApiResource\EnumValidationResource;
1818
use ApiPlatform\Tests\SetupClassResourcesTrait;
1919
use Composer\InstalledVersions;
20-
use Composer\Semver\VersionParser;
21-
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
2220

2321
/**
2422
* @see https://github.com/api-platform/core/issues/8183
@@ -67,13 +65,8 @@ public function testInvalidBackedEnumValueProducesValidationViolation(): void
6765
$this->assertNotNull($genderViolation, 'Expected a constraint violation on "gender" property.');
6866
}
6967

70-
#[IgnoreDeprecations]
7168
public function testInvalidBackedEnumValueWithCollectDenormalizationErrors(): void
7269
{
73-
if (InstalledVersions::satisfies(new VersionParser(), 'symfony/serializer', '>=8.1')) {
74-
$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.');
75-
}
76-
7770
$response = static::createClient()->request('POST', '/enum_validation_resources_collect', [
7871
'headers' => ['Content-Type' => 'application/ld+json'],
7972
'json' => ['gender' => 'unknown'],

tests/Functional/NullOnNonNullablePropertyTest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
use ApiPlatform\Symfony\Bundle\Test\ApiTestCase;
1717
use ApiPlatform\Tests\Fixtures\TestBundle\ApiResource\NullOnNonNullableProperty\NullOnNonNullableResource;
1818
use ApiPlatform\Tests\SetupClassResourcesTrait;
19-
use Composer\InstalledVersions;
20-
use Composer\Semver\VersionParser;
21-
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
2219

2320
/** @see https://github.com/symfony/symfony/issues/64159 */
2421
final class NullOnNonNullablePropertyTest extends ApiTestCase
@@ -48,13 +45,8 @@ public function testNullOnNonNullablePropertyReturns400(): void
4845
$this->assertStringContainsString('Expected argument of type "string", "null" given at property path "name"', $body['hydra:description'] ?? $body['detail'] ?? '');
4946
}
5047

51-
#[IgnoreDeprecations]
5248
public function testNullOnNonNullablePropertyReturns422WhenCollectingErrors(): void
5349
{
54-
if (InstalledVersions::satisfies(new VersionParser(), 'symfony/serializer', '>=8.1')) {
55-
$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.');
56-
}
57-
5850
$response = self::createClient()->request('POST', '/null_on_non_nullable_resources_collect', [
5951
'headers' => ['Content-Type' => 'application/ld+json'],
6052
'json' => ['name' => null],

0 commit comments

Comments
 (0)