From d3e83151ce4d6c4acbecdbc741f4e0687f8e2568 Mon Sep 17 00:00:00 2001 From: jhrncar Date: Mon, 6 May 2024 15:39:31 +0200 Subject: [PATCH] fix(dependency): fix doctrine deprecations --- config/services.php | 6 ++++-- docker/php81/Dockerfile | 9 ++------- docker/php82/Dockerfile | 9 ++------- tests/Functional/app/config/framework.yaml | 1 + 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/config/services.php b/config/services.php index 66f6c5f..2334b37 100644 --- a/config/services.php +++ b/config/services.php @@ -6,7 +6,7 @@ use Ackintosh\Ganesha\Storage\Adapter\Apcu; use Ackintosh\Ganesha\Storage\Adapter\ApcuStore; use Ackintosh\Ganesha\Strategy\Rate\Builder; -use Doctrine\Common\Annotations\Reader; +use Doctrine\Common\Annotations\AnnotationReader; use PixelFederation\CircuitBreakerBundle\AnnotationMetadataReader; use PixelFederation\CircuitBreakerBundle\Bridge\Ganesha\GaneshaCircuitBreaker; use PixelFederation\CircuitBreakerBundle\Bridge\Symfony\Command\GenerateCircuitBrokenProxiesCacheClearer; @@ -57,8 +57,10 @@ $services->alias(MetadataReader::class, AnnotationMetadataReader::class); + $services->set('app.doctrine_annotation_reader', AnnotationReader::class); + $services->set(AnnotationMetadataReader::class) - ->arg('$annotationsReader', service(Reader::class)); + ->arg('$annotationsReader', service('app.doctrine_annotation_reader')); $services->alias(MethodExtractor::class, ReflectionMethodExtractor::class); diff --git a/docker/php81/Dockerfile b/docker/php81/Dockerfile index c0238af..b99098b 100644 --- a/docker/php81/Dockerfile +++ b/docker/php81/Dockerfile @@ -3,16 +3,11 @@ FROM php:8.1-fpm RUN apt-get update && apt-get install -y git-core zlib1g-dev libzip-dev zip unzip RUN docker-php-ext-install zip -RUN pecl install xdebug apcu && \ - docker-php-ext-enable xdebug apcu +RUN pecl install apcu && \ + docker-php-ext-enable apcu RUN echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini -RUN echo 'xdebug.file_link_format="phpstorm://open?url=file://%f&line=%%l"' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \ - echo "xdebug.mode=develop" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \ - echo "xdebug.max_nesting_level=10000" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \ - echo "xdebug.remote_handler=dbgp" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ php -r "if (hash_file('SHA384', 'composer-setup.php') === trim(file_get_contents('https://composer.github.io/installer.sig'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ php composer-setup.php && \ diff --git a/docker/php82/Dockerfile b/docker/php82/Dockerfile index 8477492..729886d 100644 --- a/docker/php82/Dockerfile +++ b/docker/php82/Dockerfile @@ -3,16 +3,11 @@ FROM php:8.2-fpm RUN apt-get update && apt-get install -y git-core zlib1g-dev libzip-dev zip unzip RUN docker-php-ext-install zip -RUN pecl install xdebug apcu && \ - docker-php-ext-enable xdebug apcu +RUN pecl install apcu && \ + docker-php-ext-enable apcu RUN echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini -RUN echo 'xdebug.file_link_format="phpstorm://open?url=file://%f&line=%%l"' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \ - echo "xdebug.mode=develop" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \ - echo "xdebug.max_nesting_level=10000" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \ - echo "xdebug.remote_handler=dbgp" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ php -r "if (hash_file('SHA384', 'composer-setup.php') === trim(file_get_contents('https://composer.github.io/installer.sig'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ php composer-setup.php && \ diff --git a/tests/Functional/app/config/framework.yaml b/tests/Functional/app/config/framework.yaml index c5059df..8035d81 100644 --- a/tests/Functional/app/config/framework.yaml +++ b/tests/Functional/app/config/framework.yaml @@ -1,4 +1,5 @@ framework: + annotations: false secret: megasecretkey router: resource: "%kernel.project_dir%/config/routing.yaml"