pug-php / pug-symfony

Pug (Jade) template engine for Symfony
MIT License
44 stars 3 forks source link

remove_deprecations : Fix User Deprecated: The "Symfony\Component\HttpKernel\Kernel::getRootDir()" method is deprecated since Symfony 4.2, use getProjectDir() instead. #37

Closed pedroresende closed 5 years ago

pedroresende commented 5 years ago

This PR Addresses the deprecation that appears in Symfony console

User Deprecated: The "Symfony\Component\HttpKernel\Kernel::getRootDir()" method is deprecated since Symfony 4.2, use getProjectDir() instead.
kylekatarnls commented 5 years ago

getProjectDir has been added in Symfony 3.3, so it will break our current compatibility with Symfony 2.7 to 3.2.

So we would merge this only if we first decide to drop Symfony < 3.3 support (and this could only happen on a next major release to respect semver). No such thing is planned yet.

kylekatarnls commented 5 years ago

After inspection getRootDir() returns /app while getProjectDir() returns /.

So it cannot be replaced this way in any version of Symfony, I will remove the deprecation notice in a way that returns the right directory.