Skip to content

Commit

Permalink
fix Symfony 6.3 deprecation: add getSupportedTypes()
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaicher committed Jun 6, 2023
1 parent fb188bf commit 1fe6252
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Serializer/Denormalizer/RouteCollectionDenormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,9 @@ public function supportsDenormalization(mixed $data, string $type, string $forma

return true;
}

public function getSupportedTypes(?string $format): array
{
return ['*' => false];
}
}
5 changes: 5 additions & 0 deletions Serializer/Normalizer/RouteCollectionNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,9 @@ public function supportsNormalization(mixed $data, string $format = null, array
{
return $data instanceof RouteCollection;
}

public function getSupportedTypes(?string $format): array
{
return [RouteCollection::class => true];
}
}
5 changes: 5 additions & 0 deletions Serializer/Normalizer/RoutesResponseNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,9 @@ public function supportsNormalization(mixed $data, string $format = null, array
{
return $data instanceof RoutesResponse;
}

public function getSupportedTypes(?string $format): array
{
return [RoutesResponse::class => true];
}
}
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,10 @@
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"config": {
"allow-plugins": {
"symfony/flex": true
}
}
}

0 comments on commit 1fe6252

Please sign in to comment.