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 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 .", 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(