From 136b3a2b79d670d5210d4c49b4a4cd5ced540ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Fri, 4 Mar 2022 19:11:09 +0100 Subject: [PATCH] Updated symfony/framework-bundle --- config/services.yaml | 10 ++++++++-- src/Kernel.php | 30 ------------------------------ symfony.lock | 22 +++++++++++----------- 3 files changed, 19 insertions(+), 43 deletions(-) diff --git a/config/services.yaml b/config/services.yaml index 3e997774..5f965295 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -4,6 +4,9 @@ # Put parameters here that don't need to change on each machine where the app is deployed # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration +imports: + - { resource: parameters.yaml } + services: # default configuration for services in *this* file _defaults: @@ -24,8 +27,11 @@ 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/*' - exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}' + resource: '../src/' + exclude: + - '../src/DependencyInjection/' + - '../src/Entity/' + - '../src/Kernel.php' # controllers are imported separately to make sure services can be injected # as action arguments even if you don't extend any base controller class diff --git a/src/Kernel.php b/src/Kernel.php index c9a55b91..779cd1f2 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -3,39 +3,9 @@ namespace App; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symfony\Component\HttpKernel\Kernel as BaseKernel; -use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; class Kernel extends BaseKernel { use MicroKernelTrait; - - protected function configureContainer(ContainerConfigurator $container): void - { - $container->import('../config/{packages}/*.yaml'); - $container->import('../config/{packages}/'.$this->environment.'/*.yaml'); - - //Add parameters.yml - $container->import('../config/parameters.yaml'); - - if (is_file(\dirname(__DIR__).'/config/services.yaml')) { - $container->import('../config/services.yaml'); - $container->import('../config/{services}_'.$this->environment.'.yaml'); - } else { - $container->import('../config/{services}.php'); - } - } - - protected function configureRoutes(RoutingConfigurator $routes): void - { - $routes->import('../config/{routes}/'.$this->environment.'/*.yaml'); - $routes->import('../config/{routes}/*.yaml'); - - if (is_file(\dirname(__DIR__).'/config/routes.yaml')) { - $routes->import('../config/routes.yaml'); - } else { - $routes->import('../config/{routes}.php'); - } - } } diff --git a/symfony.lock b/symfony.lock index dda6eece..cfbef423 100644 --- a/symfony.lock +++ b/symfony.lock @@ -527,22 +527,22 @@ "version": "v4.2.3" }, "symfony/framework-bundle": { - "version": "5.3", + "version": "5.4", "recipe": { "repo": "github.com/symfony/recipes", "branch": "master", - "version": "5.3", - "ref": "414ba00ad43fa71be42c7906a551f1831716b03c" + "version": "5.4", + "ref": "3cd216a4d007b78d8554d44a5b1c0a446dab24fb" }, "files": [ - "./config/packages/cache.yaml", - "./config/packages/framework.yaml", - "./config/preload.php", - "./config/routes/framework.yaml", - "./config/services.yaml", - "./public/index.php", - "./src/Controller/.gitignore", - "./src/Kernel.php" + "config/packages/cache.yaml", + "config/packages/framework.yaml", + "config/preload.php", + "config/routes/framework.yaml", + "config/services.yaml", + "public/index.php", + "src/Controller/.gitignore", + "src/Kernel.php" ] }, "symfony/http-client": {