Skip to content

Commit 1677c55

Browse files
committed
Document Kernel::getBuildDir()
1 parent 707580e commit 1677c55

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

reference/configuration/kernel.rst

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,33 @@ method to return the right project directory::
8484
}
8585
}
8686

87+
Build Directory
88+
~~~~~~~~~~~~~~~
89+
90+
**type**: ``string`` **default**: ``$this->getCacheDir()``
91+
92+
This returns the absolute path of a build directory of your Symfony project. This
93+
directory can be warmed up before deployment and be used as a read-only filesystem
94+
(ie Docker or AWS Lambda).
95+
96+
This value is exposed via the ``kernel.build_dir`` configuration parameter and
97+
the :method:`Symfony\\Component\\HttpKernel\\Kernel::getBuildDir` method. To
98+
change this setting, override the ``getBuildDir()`` method to return the correct
99+
build directory.
100+
87101
Cache Directory
88102
~~~~~~~~~~~~~~~
89103

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

92106
This returns the absolute path of the cache directory of your Symfony project.
93107
It's calculated automatically based on the current
94-
:ref:`environment <configuration-environments>`.
108+
:ref:`environment <configuration-environments>`. Data might be written to this path
109+
at runtime.
95110

96111
This value is exposed via the ``kernel.cache_dir`` configuration parameter and
97112
the :method:`Symfony\\Component\\HttpKernel\\Kernel::getCacheDir` method. To
98-
change this setting, override the ``getCacheDir()`` method to return the right
113+
change this setting, override the ``getCacheDir()`` method to return the correct
99114
cache directory.
100115

101116
Log Directory

0 commit comments

Comments
 (0)