Closed aschempp closed 7 years ago
Couldn’t we just use dirname(dirname(dirname(dirname(dirname(__DIR__)))))
in getProjectDir()
and not inject the path? Symfony itself also doesn’t inject the project dir but searches for the nearest composer.json file.
What if classes are combined for caching etc?
I think since PHP 7 there is no need for caching PHP files by combining them. But even then, the caching script should handle the __DIR__
constants correctly.
I have fixed the remaining uses of ContaoKernel::setProjectDir
. Regarding BC break, afaik the constructor is not a BC promise.
Regarding BC break, afaik the constructor is not a BC promise.
Of course it is. You can only add arguments that are optional.
I have updated the PR so it is backwards compatible. Please review again.
fixes #28