Skip to content

Commit

Permalink
fix(jsonld): remove deprecated class
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Oct 11, 2024
1 parent 346196b commit d0c9dc1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/JsonLd/Serializer/ErrorNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
namespace ApiPlatform\JsonLd\Serializer;

use ApiPlatform\State\ApiResource\Error;
use ApiPlatform\Symfony\Validator\Exception\ValidationException as SymfonyValidationException;
use ApiPlatform\Validator\Exception\ValidationException;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

Expand Down Expand Up @@ -48,7 +47,7 @@ public function normalize(mixed $object, ?string $format = null, array $context
public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return $this->inner->supportsNormalization($data, $format, $context)
&& (is_a($data, Error::class) || is_a($data, ValidationException::class) || is_a($data, SymfonyValidationException::class));
&& (is_a($data, Error::class) || is_a($data, ValidationException::class));
}

public function getSupportedTypes(?string $format): array
Expand Down

0 comments on commit d0c9dc1

Please sign in to comment.