From 9ca069a6fea67ddf2ef44601901ea3c02e3cffbe Mon Sep 17 00:00:00 2001 From: Nicolas Hart Date: Fri, 13 Oct 2017 23:52:15 +0200 Subject: Replace kernel.root_dir by kernel.project_dir kernel.root_dir and Kernel::getRootDir() are deprecated since Symfony 3.3. See https://symfony.com/blog/new-in-symfony-3-3-a-simpler-way-to-get-the-project-root-directory and https://github.com/symfony/symfony/blob/3.3/UPGRADE-3.3.md#httpkernel for more information. --- app/AppKernel.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'app/AppKernel.php') diff --git a/app/AppKernel.php b/app/AppKernel.php index f1140943..d582c93e 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -57,11 +57,6 @@ class AppKernel extends Kernel return $bundles; } - public function getRootDir() - { - return __DIR__; - } - public function getCacheDir() { return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment(); @@ -74,7 +69,7 @@ class AppKernel extends Kernel public function registerContainerConfiguration(LoaderInterface $loader) { - $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml'); + $loader->load($this->getProjectDir() . '/app/config/config_' . $this->getEnvironment() . '.yml'); $loader->load(function ($container) { if ($container->getParameter('use_webpack_dev_server')) { $container->loadFromExtension('framework', [ -- cgit v1.2.3