Skip to content

Commit f16f68b

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: Update kernel.rst: Adding example for `kernel.project_dir`
2 parents 8f8def7 + 83a794c commit f16f68b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

reference/configuration/kernel.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ method of the kernel class, which you can override to return a different value.
256256
``kernel.project_dir``
257257
----------------------
258258

259-
**type**: ``string`` **default**: the directory of the project ``composer.json``
259+
**type**: ``string`` **default**: the directory of the project's ``composer.json``
260260

261261
This parameter stores the absolute path of the root directory of your Symfony application,
262262
which is used by applications to perform operations with file paths relative to
@@ -283,6 +283,8 @@ have deleted it entirely (for example in the production servers), override the
283283

284284
public function getProjectDir(): string
285285
{
286+
// when defining a hardcoded string, don't add the triailing slash to the path
287+
// e.g. '/home/user/my_project', '/app', '/var/www/example.com'
286288
return \dirname(__DIR__);
287289
}
288290
}

0 commit comments

Comments
 (0)