diff options
author | Nicolas Hart <contact@nclshart.net> | 2017-10-13 23:52:15 +0200 |
---|---|---|
committer | Nicolas Hart <contact@nclshart.net> | 2017-10-14 00:32:56 +0200 |
commit | 9ca069a6fea67ddf2ef44601901ea3c02e3cffbe (patch) | |
tree | 55bc8ee87f1f758bea7617bc24bc02c4a0c19408 /app/AppKernel.php | |
parent | f44a927530476eaf903525481e5e8114c3b017b8 (diff) | |
download | wallabag-9ca069a6fea67ddf2ef44601901ea3c02e3cffbe.tar.gz wallabag-9ca069a6fea67ddf2ef44601901ea3c02e3cffbe.tar.zst wallabag-9ca069a6fea67ddf2ef44601901ea3c02e3cffbe.zip |
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.
Diffstat (limited to 'app/AppKernel.php')
-rw-r--r-- | app/AppKernel.php | 7 |
1 files changed, 1 insertions, 6 deletions
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 | |||
57 | return $bundles; | 57 | return $bundles; |
58 | } | 58 | } |
59 | 59 | ||
60 | public function getRootDir() | ||
61 | { | ||
62 | return __DIR__; | ||
63 | } | ||
64 | |||
65 | public function getCacheDir() | 60 | public function getCacheDir() |
66 | { | 61 | { |
67 | return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment(); | 62 | return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment(); |
@@ -74,7 +69,7 @@ class AppKernel extends Kernel | |||
74 | 69 | ||
75 | public function registerContainerConfiguration(LoaderInterface $loader) | 70 | public function registerContainerConfiguration(LoaderInterface $loader) |
76 | { | 71 | { |
77 | $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml'); | 72 | $loader->load($this->getProjectDir() . '/app/config/config_' . $this->getEnvironment() . '.yml'); |
78 | $loader->load(function ($container) { | 73 | $loader->load(function ($container) { |
79 | if ($container->getParameter('use_webpack_dev_server')) { | 74 | if ($container->getParameter('use_webpack_dev_server')) { |
80 | $container->loadFromExtension('framework', [ | 75 | $container->loadFromExtension('framework', [ |