From 69b96af827c4d255a94d2b4c13f61ee0d352aba8 Mon Sep 17 00:00:00 2001 From: Invis1ble Date: Mon, 3 Jun 2024 18:39:29 +0300 Subject: [PATCH 1/3] Fix build. --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f8f2bde..5631e3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,8 +8,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* RUN set -eux; \ - pecl install xdebug-3.3.2 \ - && docker-php-ext-enable xdebug + if ! pecl list | grep -q xdebug; then \ + pecl install xdebug-3.3.2 && docker-php-ext-enable xdebug; \ + fi COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer From 4ba4e3fb7a8772b2e5b4291f1e70d34e6b0dee51 Mon Sep 17 00:00:00 2001 From: Invis1ble Date: Mon, 3 Jun 2024 21:52:37 +0300 Subject: [PATCH 2/3] Simplify UriNormalizer. --- src/Normalizer/UriNormalizer.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/Normalizer/UriNormalizer.php b/src/Normalizer/UriNormalizer.php index cca8b10..0a47ab8 100644 --- a/src/Normalizer/UriNormalizer.php +++ b/src/Normalizer/UriNormalizer.php @@ -6,19 +6,13 @@ use Psr\Http\Message\UriFactoryInterface; use Psr\Http\Message\UriInterface; -use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; -use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UriNormalizer extends AbstractNormalizer +class UriNormalizer implements NormalizerInterface, DenormalizerInterface { - public function __construct( - protected readonly UriFactoryInterface $uriFactory, - ?ClassMetadataFactoryInterface $classMetadataFactory = null, - ?NameConverterInterface $nameConverter = null, - array $defaultContext = [], - ) { - parent::__construct($classMetadataFactory, $nameConverter, $defaultContext); + public function __construct(protected readonly UriFactoryInterface $uriFactory) + { } public function normalize( From 83486e91d8d052c178c4d6ffd54fa4c3bc16b9a2 Mon Sep 17 00:00:00 2001 From: Invis1ble Date: Mon, 3 Jun 2024 21:54:47 +0300 Subject: [PATCH 3/3] Remove version key from package. --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index cb383bb..c557c86 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,4 @@ { - "version": "1.0.3", "name": "invis1ble/symfony-serializer-extension", "type": "library", "description": "Additional useful (de)normalizers for symfony/serializer .",