diff --git a/reference/configuration/kernel.rst b/reference/configuration/kernel.rst index 6297fb9bded..42e8a1a05aa 100644 --- a/reference/configuration/kernel.rst +++ b/reference/configuration/kernel.rst @@ -13,7 +13,7 @@ Configuration * `Charset`_ * `Kernel Name`_ -* `Root Directory`_ +* `Project Directory`_ * `Cache Directory`_ * `Log Directory`_ @@ -53,42 +53,9 @@ generation of cache files. If you have an application with multiple kernels, the easiest way to make each have a unique name is to duplicate the ``app`` directory and rename it to something else (e.g. ``foo``). -Root Directory -~~~~~~~~~~~~~~ - -.. versionadded:: 3.3 - - The ``getRootDir()`` method is deprecated since Symfony 3.3. Use the new - ``getProjectDir()`` method instead. - -**type**: ``string`` **default**: the directory of ``AppKernel`` - -This returns the root directory of your kernel. If you use the Symfony Standard -edition, the root directory refers to the ``app`` directory. - -To change this setting, override the -:method:`Symfony\\Component\\HttpKernel\\Kernel::getRootDir` method:: - - // app/AppKernel.php - - // ... - class AppKernel extends Kernel - { - // ... - - public function getRootDir() - { - return realpath(parent::getRootDir().'/../'); - } - } - Project Directory ~~~~~~~~~~~~~~~~~ -.. versionadded:: 3.3 - - The ``getProjectDir()`` method was introduced in Symfony 3.3. - **type**: ``string`` **default**: the directory of the project ``composer.json`` This returns the root directory of your Symfony project. It's calculated as @@ -114,7 +81,7 @@ method to return the right project directory:: Cache Directory ~~~~~~~~~~~~~~~ -**type**: ``string`` **default**: ``$this->rootDir/cache/$this->environment`` +**type**: ``string`` **default**: ``$this->projectDir/cache/$this->environment`` This returns the path to the cache directory. To change it, override the :method:`Symfony\\Component\\HttpKernel\\Kernel::getCacheDir` method. Read @@ -123,7 +90,7 @@ This returns the path to the cache directory. To change it, override the Log Directory ~~~~~~~~~~~~~ -**type**: ``string`` **default**: ``$this->rootDir/logs`` +**type**: ``string`` **default**: ``$this->projectDir/logs`` This returns the path to the log directory. To change it, override the :method:`Symfony\\Component\\HttpKernel\\Kernel::getLogDir` method. Read