Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5ff8932

Browse filesBrowse files
author
Guillaume Pédelagrabe
committed
Minor fixes
1 parent 74235ab commit 5ff8932
Copy full SHA for 5ff8932

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎src/Symfony/Component/Serializer/Normalizer/UidNormalizer.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Normalizer/UidNormalizer.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use Symfony\Component\Uid\Ulid;
1919
use Symfony\Component\Uid\Uuid;
2020

21-
class UidNormalizer implements NormalizerInterface, DenormalizerInterface, CacheableSupportsMethodInterface
21+
final class UidNormalizer implements NormalizerInterface, DenormalizerInterface, CacheableSupportsMethodInterface
2222
{
2323
/**
2424
* {@inheritdoc}
@@ -50,7 +50,7 @@ public function supportsNormalization($data, string $format = null)
5050
public function denormalize($data, string $type, string $format = null, array $context = [])
5151
{
5252
if (!class_exists(AbstractUid::class)) {
53-
throw new LogicException('Unable to execute this command as the Symfony Uid Component is not installed.');
53+
throw new LogicException('You cannot use the "Symfony\Component\Serializer\Normalizer\UidNormalizer" as the Symfony Uid Component is not installed. Try running "composer require symfony/uid".');
5454
}
5555

5656
try {
@@ -67,7 +67,7 @@ public function denormalize($data, string $type, string $format = null, array $c
6767
*/
6868
public function supportsDenormalization($data, string $type, string $format = null)
6969
{
70-
return is_subclass_of($type, AbstractUid::class) || AbstractUid::class === $type;
70+
return is_a($type, AbstractUid::class, true);
7171
}
7272

7373
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.