Skip to content

Commit

Permalink
Load LESS variables via path traversal
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
franzliedke committed Jun 8, 2019
1 parent 5f79d3b commit f421429
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Frontend/FrontendServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public function boot()

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);
}
Expand Down

0 comments on commit f421429

Please sign in to comment.