From 07071a067a123f94bda76c461c732bf505e13ace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20J=2E=20Garc=C3=ADa=20Lagar?= Date: Fri, 5 Feb 2021 08:17:41 +0100 Subject: [PATCH 1/5] Require ajgarlag/psr-http-message-bundle --- Tests/TestKernel.php | 1 + composer.json | 1 + 2 files changed, 2 insertions(+) diff --git a/Tests/TestKernel.php b/Tests/TestKernel.php index 0d0c0bf3..db16c9d2 100644 --- a/Tests/TestKernel.php +++ b/Tests/TestKernel.php @@ -63,6 +63,7 @@ public function registerBundles() { return [ new \Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), + new \Ajgarlag\Bundle\PsrHttpMessageBundle\AjgarlagPsrHttpMessageBundle(), new \Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new \Symfony\Bundle\SecurityBundle\SecurityBundle(), diff --git a/composer.json b/composer.json index a24a3133..a806f6c1 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,7 @@ ], "require": { "php": ">=7.2", + "ajgarlag/psr-http-message-bundle": "^1.1", "doctrine/doctrine-bundle": "^1.8|^2.0", "doctrine/orm": "^2.7", "league/oauth2-server": "^8.0", From 760b56fb9abd5932b5b74bc148fa52cb744a9170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20J=2E=20Garc=C3=ADa=20Lagar?= Date: Fri, 5 Feb 2021 08:26:35 +0100 Subject: [PATCH 2/5] Enable sensio aliases --- Tests/TestKernel.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tests/TestKernel.php b/Tests/TestKernel.php index db16c9d2..15b21caf 100644 --- a/Tests/TestKernel.php +++ b/Tests/TestKernel.php @@ -192,6 +192,12 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa ], ]); + $container->loadFromExtension('ajgarlag_psr_http_message', [ + 'alias_sensio_framework_extra_services' => [ + 'enabled' => true, + ], + ]); + $container->loadFromExtension('sensio_framework_extra', [ 'router' => [ 'annotations' => false, From 286cab0903029d17898cc617ae88d26f808c3a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20J=2E=20Garc=C3=ADa=20Lagar?= Date: Fri, 5 Feb 2021 08:27:33 +0100 Subject: [PATCH 3/5] Remove sensio/framework-extra-bundle dependency --- DependencyInjection/TrikoderOAuth2Extension.php | 4 ++-- Tests/TestKernel.php | 7 ------- composer.json | 1 - 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/DependencyInjection/TrikoderOAuth2Extension.php b/DependencyInjection/TrikoderOAuth2Extension.php index ec7a6009..5690aada 100644 --- a/DependencyInjection/TrikoderOAuth2Extension.php +++ b/DependencyInjection/TrikoderOAuth2Extension.php @@ -4,6 +4,7 @@ namespace Trikoder\Bundle\OAuth2Bundle\DependencyInjection; +use Ajgarlag\Bundle\PsrHttpMessageBundle\AjgarlagPsrHttpMessageBundle; use DateInterval; use Defuse\Crypto\Key; use Doctrine\Bundle\DoctrineBundle\DoctrineBundle; @@ -18,7 +19,6 @@ use League\OAuth2\Server\ResourceServer; use LogicException; use RuntimeException; -use Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle; use Symfony\Bundle\SecurityBundle\SecurityBundle; use Symfony\Component\Config\FileLocator; use Symfony\Component\Config\Loader\LoaderInterface; @@ -115,7 +115,7 @@ private function assertRequiredBundlesAreEnabled(ContainerBuilder $container): v $requiredBundles = [ 'doctrine' => DoctrineBundle::class, 'security' => SecurityBundle::class, - 'sensio_framework_extra' => SensioFrameworkExtraBundle::class, + 'ajgarlag_psr_http_message' => AjgarlagPsrHttpMessageBundle::class, ]; foreach ($requiredBundles as $bundleAlias => $requiredBundle) { diff --git a/Tests/TestKernel.php b/Tests/TestKernel.php index 15b21caf..2d39cf3f 100644 --- a/Tests/TestKernel.php +++ b/Tests/TestKernel.php @@ -64,7 +64,6 @@ public function registerBundles() return [ new \Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new \Ajgarlag\Bundle\PsrHttpMessageBundle\AjgarlagPsrHttpMessageBundle(), - new \Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new \Symfony\Bundle\SecurityBundle\SecurityBundle(), new \Trikoder\Bundle\OAuth2Bundle\TrikoderOAuth2Bundle(), @@ -198,12 +197,6 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa ], ]); - $container->loadFromExtension('sensio_framework_extra', [ - 'router' => [ - 'annotations' => false, - ], - ]); - $container->loadFromExtension('trikoder_oauth2', [ 'authorization_server' => [ 'private_key' => '%env(PRIVATE_KEY_PATH)%', diff --git a/composer.json b/composer.json index a806f6c1..89812de6 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,6 @@ "doctrine/orm": "^2.7", "league/oauth2-server": "^8.0", "psr/http-factory": "^1.0", - "sensio/framework-extra-bundle": "^5.5", "symfony/framework-bundle": "^4.4|^5.0", "symfony/psr-http-message-bridge": "^2.0", "symfony/security-bundle": "^4.4|^5.0" From 596a2316882a184fa8c67af8b941819b41278fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20J=2E=20Garc=C3=ADa=20Lagar?= Date: Fri, 5 Feb 2021 08:34:30 +0100 Subject: [PATCH 4/5] Rename required services --- Resources/config/services.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/config/services.xml b/Resources/config/services.xml index 73734a27..00434642 100644 --- a/Resources/config/services.xml +++ b/Resources/config/services.xml @@ -83,7 +83,7 @@ - + @@ -96,7 +96,7 @@ - + From 9ecf26287fd5057d4935f35ec1caf1053123f959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20J=2E=20Garc=C3=ADa=20Lagar?= Date: Fri, 5 Feb 2021 08:36:04 +0100 Subject: [PATCH 5/5] Disable sensio aliases --- Tests/TestKernel.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Tests/TestKernel.php b/Tests/TestKernel.php index 2d39cf3f..cf5f8c05 100644 --- a/Tests/TestKernel.php +++ b/Tests/TestKernel.php @@ -191,12 +191,6 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa ], ]); - $container->loadFromExtension('ajgarlag_psr_http_message', [ - 'alias_sensio_framework_extra_services' => [ - 'enabled' => true, - ], - ]); - $container->loadFromExtension('trikoder_oauth2', [ 'authorization_server' => [ 'private_key' => '%env(PRIVATE_KEY_PATH)%',