Skip to content

Commit

Permalink
Merge branch '7.0' into 7.1
Browse files Browse the repository at this point in the history
* 7.0:
  Tweak
  Update kernel.rst: Adding example for `kernel.project_dir`
  • Loading branch information
javiereguiluz committed May 13, 2024
2 parents 05c0020 + f16f68b commit 639373d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion reference/configuration/kernel.rst
Expand Up @@ -256,7 +256,7 @@ method of the kernel class, which you can override to return a different value.
``kernel.project_dir``
----------------------

**type**: ``string`` **default**: the directory of the project ``composer.json``
**type**: ``string`` **default**: the directory of the project's ``composer.json``

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

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

0 comments on commit 639373d

Please sign in to comment.