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 eb370e3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/code_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
- name: Require Symfony version
if: matrix.symfony != '*'
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-interaction --no-progress symfony/flex:^1.11
composer config extra.symfony.require ${{ matrix.symfony }}
Expand Down
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];
}
}

0 comments on commit eb370e3

Please sign in to comment.