From f8449f5c8cb67c5b043525d57c7ff6eec45ba257 Mon Sep 17 00:00:00 2001 From: Nyholm Date: Fri, 9 Oct 2020 09:48:36 +0200 Subject: [PATCH] Document Kernel::getBuildDir() --- reference/configuration/kernel.rst | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/reference/configuration/kernel.rst b/reference/configuration/kernel.rst index 5f52cd155e7..e0f83d71250 100644 --- a/reference/configuration/kernel.rst +++ b/reference/configuration/kernel.rst @@ -84,6 +84,7 @@ method to return the right project directory:: } } + Cache Directory ~~~~~~~~~~~~~~~ @@ -91,13 +92,35 @@ Cache Directory This returns the absolute path of the cache directory of your Symfony project. It's calculated automatically based on the current -:ref:`environment `. +:ref:`environment `. Data might be written to this path +at runtime. This value is exposed via the ``kernel.cache_dir`` configuration parameter and the :method:`Symfony\\Component\\HttpKernel\\Kernel::getCacheDir` method. To -change this setting, override the ``getCacheDir()`` method to return the right +change this setting, override the ``getCacheDir()`` method to return the correct cache directory. +Build Directory +~~~~~~~~~~~~~~~ + +**type**: ``string`` **default**: ``$this->getCacheDir()`` + +.. versionadded:: 5.2 + + The build directory feature was introduced in Symfony 5.2. + +This returns the absolute path of a build directory of your Symfony project. This +directory can be used to separate read-only cache (i.e. the compiled container) +from read-write cache (i.e. cache pools). Specify a non-default value when the +application is deployed in a read-only filesystem like a Docker container or AWS +Lambda. + +This value is exposed via the ``kernel.build_dir`` configuration parameter and +the :method:`Symfony\\Component\\HttpKernel\\Kernel::getBuildDir` method. To +change this setting, override the ``getBuildDir()`` method to return the correct +build directory. + + Log Directory ~~~~~~~~~~~~~