-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[TEMPLATING] relative paths in template cache #16233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* @param string $cacheDir The cache path | ||
*/ | ||
public function __construct(FileLocatorInterface $locator, $cacheDir = null) | ||
public function __construct(FileLocatorInterface $locator, $rootDir, $cacheDir = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a bc break
@@ -36,6 +37,7 @@ public function __construct(FileLocatorInterface $locator, $cacheDir = null) | |||
$this->cache = require $cache; | |||
} | |||
|
|||
$this->rootDir = realpath(__dir__.'/../../../../../../../../../'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is totally wrong. We shouldn't rely on the location Symfony is installed in.
Sorry, I just noticed a reference to #3079. |
What's the status of this? :) |
@rvanginneken Are you able to finish this one? |
@fabpot As I have not other solution; No. |
Templates are saved with relative paths. Absolute path is added on locate.