Skip to content

Commit

Permalink
backport #19874 to 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed May 13, 2024
1 parent 90802a6 commit d49fa64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion reference/configuration/kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ charset::
Project Directory
~~~~~~~~~~~~~~~~~

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

This returns the absolute path of the root directory of your Symfony project,
which is used by applications to perform operations with file paths relative to
Expand Down Expand Up @@ -75,6 +75,8 @@ method to return the right project directory::

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

0 comments on commit d49fa64

Please sign in to comment.