From b341fbe67cb751f1e0bcc10fac0332aff87c1599 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 3 Apr 2020 15:45:57 +0200 Subject: [PATCH] Revert "Merge pull request #721" This reverts commit ed25f50befc34752fc813564848effd02061c956, reversing changes made to 9880918fbf0558455cf973c5b55b391d2bd862fb. --- .../framework-bundle/5.1/config/routes.php | 12 ---- .../framework-bundle/5.1/config/services.php | 59 ------------------- .../framework-bundle/5.1/config/services.yaml | 1 + symfony/framework-bundle/5.1/src/Kernel.php | 18 +----- symfony/routing/5.1/config/packages | 1 - symfony/routing/5.1/manifest.json | 6 -- 6 files changed, 4 insertions(+), 93 deletions(-) delete mode 100644 symfony/framework-bundle/5.1/config/routes.php delete mode 100644 symfony/framework-bundle/5.1/config/services.php create mode 120000 symfony/framework-bundle/5.1/config/services.yaml delete mode 120000 symfony/routing/5.1/config/packages delete mode 100644 symfony/routing/5.1/manifest.json diff --git a/symfony/framework-bundle/5.1/config/routes.php b/symfony/framework-bundle/5.1/config/routes.php deleted file mode 100644 index 09deb589..00000000 --- a/symfony/framework-bundle/5.1/config/routes.php +++ /dev/null @@ -1,12 +0,0 @@ -add('index', '/') -// ->controller([App\Controller\DefaultController::class, 'index']) -// ; - -}; diff --git a/symfony/framework-bundle/5.1/config/services.php b/symfony/framework-bundle/5.1/config/services.php deleted file mode 100644 index 5e359355..00000000 --- a/symfony/framework-bundle/5.1/config/services.php +++ /dev/null @@ -1,59 +0,0 @@ -parameters() - // ->set(...) - ; - - $services = $container->services() - ->defaults() - ->autowire() - ->autoconfigure() - ; - - // Makes classes in src/ available to be used as services - $src = dirname(__DIR__).'/src'; - $services - ->load('App\\', $src) - ->exclude([ - $src.'/DependencyInjection', - $src.'/Entity', - $src.'/Migrations', - $src.'/Tests', - $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 - $services - ->load('App\\Controller\\', $src.'/Controller') - ->tag('controller.service_arguments') - ; - - // Add more service definitions when explicit configuration is needed. - // Please note that last definitions *replace* previous ones when using $services->set(). - // It is possible to alter a previously declared definition by using $services->get() instead. - $services - // ->set(App\MyService::class) - // ->args([di\ref(App\AnotherService::class)]) - ; - - if ('test' === $kernel->getEnvironment()) { - // When a test case needs access to a service, getting it via - // a public alias with the "test." prefix is recommended. - $services->public() - // ->alias('test.App\MyService', App\MyService::class) - ; - } - -}; diff --git a/symfony/framework-bundle/5.1/config/services.yaml b/symfony/framework-bundle/5.1/config/services.yaml new file mode 120000 index 00000000..be69bb02 --- /dev/null +++ b/symfony/framework-bundle/5.1/config/services.yaml @@ -0,0 +1 @@ +../../4.2/config/services.yaml \ No newline at end of file diff --git a/symfony/framework-bundle/5.1/src/Kernel.php b/symfony/framework-bundle/5.1/src/Kernel.php index 103e17b6..9f673a45 100644 --- a/symfony/framework-bundle/5.1/src/Kernel.php +++ b/symfony/framework-bundle/5.1/src/Kernel.php @@ -15,26 +15,14 @@ class Kernel extends BaseKernel { $container->import('../config/{packages}/*.yaml'); $container->import('../config/{packages}/'.$this->environment.'/*.yaml'); - - if (file_exists(\dirname(__DIR__).'/config/services.yaml')) { - $container->import('../config/{services}.yaml'); - $container->import('../config/{services}_'.$this->environment.'.yaml'); - } else { - $path = \dirname(__DIR__).'/config/services.php'; - (require $path)($container->withPath($path), $this); - } + $container->import('../config/{services}.yaml'); + $container->import('../config/{services}_'.$this->environment.'.yaml'); } protected function configureRoutes(RoutingConfigurator $routes): void { $routes->import('../config/{routes}/'.$this->environment.'/*.yaml'); $routes->import('../config/{routes}/*.yaml'); - - if (file_exists(\dirname(__DIR__).'/config/routes.yaml')) { - $routes->import('../config/{routes}.yaml'); - } else { - $path = \dirname(__DIR__).'/config/routes.php'; - (require $path)($routes->withPath($path), $this); - } + $routes->import('../config/{routes}.yaml'); } } diff --git a/symfony/routing/5.1/config/packages b/symfony/routing/5.1/config/packages deleted file mode 120000 index d3c89450..00000000 --- a/symfony/routing/5.1/config/packages +++ /dev/null @@ -1 +0,0 @@ -../../4.2/config/packages/ \ No newline at end of file diff --git a/symfony/routing/5.1/manifest.json b/symfony/routing/5.1/manifest.json deleted file mode 100644 index c0c66b64..00000000 --- a/symfony/routing/5.1/manifest.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "copy-from-recipe": { - "config/": "%CONFIG_DIR%/" - }, - "aliases": ["router"] -}