Skip to content

Commit 550dc8a

Browse files
committed
minor #14378 Document Kernel::getBuildDir() (Nyholm)
This PR was squashed before being merged into the 5.x branch. Discussion ---------- Document Kernel::getBuildDir() This will fix #14109 https://symfony.com/doc/current/reference/configuration/kernel.html Commits ------- f8449f5 Document Kernel::getBuildDir()
2 parents a3fcdd0 + f8449f5 commit 550dc8a

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

reference/configuration/kernel.rst

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,43 @@ method to return the right project directory::
8888
}
8989
}
9090

91+
9192
Cache Directory
9293
~~~~~~~~~~~~~~~
9394

9495
**type**: ``string`` **default**: ``$this->getProjectDir()/var/cache/$this->environment``
9596

9697
This returns the absolute path of the cache directory of your Symfony project.
9798
It's calculated automatically based on the current
98-
:ref:`environment <configuration-environments>`.
99+
:ref:`environment <configuration-environments>`. Data might be written to this path
100+
at runtime.
99101

100102
This value is exposed via the ``kernel.cache_dir`` configuration parameter and
101103
the :method:`Symfony\\Component\\HttpKernel\\Kernel::getCacheDir` method. To
102-
change this setting, override the ``getCacheDir()`` method to return the right
104+
change this setting, override the ``getCacheDir()`` method to return the correct
103105
cache directory.
104106

107+
Build Directory
108+
~~~~~~~~~~~~~~~
109+
110+
**type**: ``string`` **default**: ``$this->getCacheDir()``
111+
112+
.. versionadded:: 5.2
113+
114+
The build directory feature was introduced in Symfony 5.2.
115+
116+
This returns the absolute path of a build directory of your Symfony project. This
117+
directory can be used to separate read-only cache (i.e. the compiled container)
118+
from read-write cache (i.e. cache pools). Specify a non-default value when the
119+
application is deployed in a read-only filesystem like a Docker container or AWS
120+
Lambda.
121+
122+
This value is exposed via the ``kernel.build_dir`` configuration parameter and
123+
the :method:`Symfony\\Component\\HttpKernel\\Kernel::getBuildDir` method. To
124+
change this setting, override the ``getBuildDir()`` method to return the correct
125+
build directory.
126+
127+
105128
Log Directory
106129
~~~~~~~~~~~~~
107130

0 commit comments

Comments
 (0)