From 60d0656cf54e23957a4a99800a8e7f703bde49ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Thu, 16 Jul 2020 16:21:12 +0200 Subject: [PATCH 1/2] [FrameworkBundle] Use an array for exclude directive --- symfony/framework-bundle/4.2/config/services.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/symfony/framework-bundle/4.2/config/services.yaml b/symfony/framework-bundle/4.2/config/services.yaml index 337b2b08..dd277b5e 100644 --- a/symfony/framework-bundle/4.2/config/services.yaml +++ b/symfony/framework-bundle/4.2/config/services.yaml @@ -15,7 +15,11 @@ services: # this creates a service per class whose id is the fully-qualified class name App\: resource: '../src/*' - exclude: '../src/{DependencyInjection,Entity,Tests,Kernel.php}' + exclude: + - '../src/DependencyInjection/' + - '../src/Entity/' + - '../src/Kernel.php' + - '../src/Tests/' # controllers are imported separately to make sure services can be injected # as action arguments even if you don't extend any base controller class From 23eb59209a2648219ee692375bc5eed579d42993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Wed, 22 Jul 2020 10:46:21 +0200 Subject: [PATCH 2/2] Consistency --- symfony/framework-bundle/4.2/config/services.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/symfony/framework-bundle/4.2/config/services.yaml b/symfony/framework-bundle/4.2/config/services.yaml index dd277b5e..c7296dd5 100644 --- a/symfony/framework-bundle/4.2/config/services.yaml +++ b/symfony/framework-bundle/4.2/config/services.yaml @@ -14,7 +14,7 @@ services: # makes classes in src/ available to be used as services # this creates a service per class whose id is the fully-qualified class name App\: - resource: '../src/*' + resource: '../src/' exclude: - '../src/DependencyInjection/' - '../src/Entity/' @@ -24,7 +24,7 @@ services: # controllers are imported separately to make sure services can be injected # as action arguments even if you don't extend any base controller class App\Controller\: - resource: '../src/Controller' + resource: '../src/Controller/' tags: ['controller.service_arguments'] # add more service definitions when explicit configuration is needed