Load LESS variables via path traversal

Since these files are part of the same package, there is no need
to assume a Composer context to load these from. Instead, we can
just load them via the path relative to the current PHP file.

This assumption may break in certain environments, and it is
already broken when running (integration) tests.
This commit is contained in:
Franz Liedke 2019-06-04 23:47:29 +02:00
parent 5f79d3b499
commit f42142979d
No known key found for this signature in database
GPG Key ID: 9A0231A879B055F4

View File

@ -72,8 +72,8 @@ class FrontendServiceProvider extends AbstractServiceProvider
public function addBaseCss(SourceCollector $sources)
{
$sources->addFile(base_path().'/vendor/flarum/core/less/common/variables.less');
$sources->addFile(base_path().'/vendor/flarum/core/less/common/mixins.less');
$sources->addFile(__DIR__.'/../../less/common/variables.less');
$sources->addFile(__DIR__.'/../../less/common/mixins.less');
$this->addLessVariables($sources);
}