From 64f71244eb93e0531b155661fd02034892e3f0bc Mon Sep 17 00:00:00 2001 From: alexmerlin Date: Mon, 1 Dec 2025 14:39:11 +0200 Subject: [PATCH 1/3] Issue #478: Require symfony/var-exporter to keep LazyGhost support Signed-off-by: alexmerlin --- composer.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 26ad77d9..7be9c79f 100644 --- a/composer.json +++ b/composer.json @@ -49,8 +49,8 @@ }, "require": { "php": "~8.2.0 || ~8.3.0", - "ext-json": "*", "ext-gd": "*", + "ext-json": "*", "dotkernel/dot-annotated-services": "^4.1.7", "dotkernel/dot-cache": "^4.0", "dotkernel/dot-cli": "^3.5.0", @@ -78,7 +78,8 @@ "mezzio/mezzio-twigrenderer": "^2.15.0", "ramsey/uuid-doctrine": "^2.0.0", "roave/psr-container-doctrine": "^4.1.0", - "symfony/filesystem": "^7.0.3" + "symfony/filesystem": "^7.0.3", + "symfony/var-exporter": "^6.4 || ^7.4" }, "require-dev": { "laminas/laminas-coding-standard": "^2.5", From 1bf0529ee0b4f547e4c7776f5158cdcfe5449f29 Mon Sep 17 00:00:00 2001 From: alexmerlin Date: Mon, 1 Dec 2025 14:50:33 +0200 Subject: [PATCH 2/3] Issue #478: Require symfony/var-exporter to keep LazyGhost support Signed-off-by: alexmerlin --- src/App/src/ConfigProvider.php | 2 +- .../src/Middleware/AuthenticationMiddleware.php | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/App/src/ConfigProvider.php b/src/App/src/ConfigProvider.php index bd5d44d0..d60784b5 100644 --- a/src/App/src/ConfigProvider.php +++ b/src/App/src/ConfigProvider.php @@ -63,7 +63,7 @@ public function getDependencies(): array 'doctrine.entity_manager.orm_default' => EntityManagerFactory::class, 'dot-mail.options.default' => MailOptionsAbstractFactory::class, 'dot-mail.service.default' => MailServiceAbstractFactory::class, - AuthenticationMiddleware::class => AuthenticationMiddlewareFactory::class, + AuthenticationMiddleware::class => AnnotatedServiceFactory::class, AuthorizationMiddleware::class => AnnotatedServiceFactory::class, ContentNegotiationMiddleware::class => AnnotatedServiceFactory::class, Environment::class => TwigEnvironmentFactory::class, diff --git a/src/App/src/Middleware/AuthenticationMiddleware.php b/src/App/src/Middleware/AuthenticationMiddleware.php index 25ac3c81..a714bdbc 100644 --- a/src/App/src/Middleware/AuthenticationMiddleware.php +++ b/src/App/src/Middleware/AuthenticationMiddleware.php @@ -6,13 +6,26 @@ use Api\App\UserIdentity; use Api\User\Entity\UserRole; +use Dot\AnnotatedServices\Annotation\Inject; +use Mezzio\Authentication\AuthenticationInterface; use Mezzio\Authentication\UserInterface; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; +use Psr\Http\Server\MiddlewareInterface; use Psr\Http\Server\RequestHandlerInterface; -class AuthenticationMiddleware extends \Mezzio\Authentication\AuthenticationMiddleware +class AuthenticationMiddleware implements MiddlewareInterface { + /** + * @Inject({ + * AuthenticationInterface::class, + * }) + */ + public function __construct( + protected AuthenticationInterface $auth, + ) { + } + public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $user = $this->auth->authenticate($request); From ba3980903c0847f1945e33b30bdc08905cb99555 Mon Sep 17 00:00:00 2001 From: alexmerlin Date: Mon, 1 Dec 2025 14:51:50 +0200 Subject: [PATCH 3/3] Issue #478: Require symfony/var-exporter to keep LazyGhost support Signed-off-by: alexmerlin --- src/App/src/ConfigProvider.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/App/src/ConfigProvider.php b/src/App/src/ConfigProvider.php index d60784b5..ea492686 100644 --- a/src/App/src/ConfigProvider.php +++ b/src/App/src/ConfigProvider.php @@ -7,7 +7,6 @@ use Api\App\Command\RouteListCommand; use Api\App\Command\TokenGenerateCommand; use Api\App\Entity\EntityListenerResolver; -use Api\App\Factory\AuthenticationMiddlewareFactory; use Api\App\Factory\EntityListenerResolverFactory; use Api\App\Factory\RouteListCommandFactory; use Api\App\Factory\TokenGenerateCommandFactory;