From 75b877bac2b91ae11a48defecd4315fe0c5db7f7 Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Wed, 15 Dec 2021 00:12:06 +0100 Subject: [PATCH] fix(ci): remove dev stability for Symfony 6 fix: fix Symfony 6 comptability fix: allow Symfony ^6.0.1, revert modifications on (De)Normalizer implementations chore: remove .travis.yml --- Command/RouterDebugExposedCommand.php | 2 +- Serializer/Denormalizer/RouteCollectionDenormalizer.php | 7 +++---- Serializer/Normalizer/RouteCollectionNormalizer.php | 2 +- Serializer/Normalizer/RoutesResponseNormalizer.php | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Command/RouterDebugExposedCommand.php b/Command/RouterDebugExposedCommand.php index 0e2e1cd..a25a192 100644 --- a/Command/RouterDebugExposedCommand.php +++ b/Command/RouterDebugExposedCommand.php @@ -74,7 +74,7 @@ protected function configure() } /** - * @see Command + * @return int */ protected function execute(InputInterface $input, OutputInterface $output): int { diff --git a/Serializer/Denormalizer/RouteCollectionDenormalizer.php b/Serializer/Denormalizer/RouteCollectionDenormalizer.php index e7042f7..62573d9 100644 --- a/Serializer/Denormalizer/RouteCollectionDenormalizer.php +++ b/Serializer/Denormalizer/RouteCollectionDenormalizer.php @@ -19,9 +19,8 @@ class RouteCollectionDenormalizer implements DenormalizerInterface { /** * {@inheritDoc} - * @return mixed */ - public function denormalize($data, $class, $format = null, array $context = array()) + public function denormalize($data, string $type, string $format = null, array $context = []): RouteCollection { $collection = new RouteCollection(); @@ -44,12 +43,12 @@ public function denormalize($data, $class, $format = null, array $context = arra /** * {@inheritDoc} */ - public function supportsDenormalization($data, $type, $format = null): bool + public function supportsDenormalization($data, string $type, ?string $format = null): bool { if (!is_array($data)) { return false; } - + if (count($data) < 1) { return true; } diff --git a/Serializer/Normalizer/RouteCollectionNormalizer.php b/Serializer/Normalizer/RouteCollectionNormalizer.php index 74f1fcb..fe0c5e2 100644 --- a/Serializer/Normalizer/RouteCollectionNormalizer.php +++ b/Serializer/Normalizer/RouteCollectionNormalizer.php @@ -23,7 +23,7 @@ class RouteCollectionNormalizer implements NormalizerInterface * {@inheritDoc} * @return array|string|int|float|bool|\ArrayObject|null */ - public function normalize($data, $format = null, array $context = array()) + public function normalize($data, string $format = null, array $context = array()): array { $collection = array(); diff --git a/Serializer/Normalizer/RoutesResponseNormalizer.php b/Serializer/Normalizer/RoutesResponseNormalizer.php index dc7acb1..c29a7c5 100644 --- a/Serializer/Normalizer/RoutesResponseNormalizer.php +++ b/Serializer/Normalizer/RoutesResponseNormalizer.php @@ -20,10 +20,10 @@ class RoutesResponseNormalizer implements NormalizerInterface { /** - * {@inheritdoc} + * {@inheritDoc} * @return array|string|int|float|bool|\ArrayObject|null */ - public function normalize($data, $format = null, array $context = array()) + public function normalize($data, string $format = null, array $context = array()): array { return array( 'base_url' => $data->getBaseUrl(),