Skip to content

Commit

Permalink
Merge pull request #21 from evertharmeling/patch-1
Browse files Browse the repository at this point in the history
Set a default value for $isDebug in SymfonycastsSassExtension
  • Loading branch information
bocharsky-bw authored Oct 23, 2023
2 parents 5fe602a + 9b32c8e commit 542b3c9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/DependencyInjection/SymfonycastsSassExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@

class SymfonycastsSassExtension extends Extension implements ConfigurationInterface
{
private bool $isDebug;

public function load(array $configs, ContainerBuilder $container): void
{
$this->isDebug = $container->getParameter('kernel.debug');

$loader = new Loader\PhpFileLoader($container, new FileLocator(__DIR__.'/../../config'));
$loader->load('services.php');

Expand Down Expand Up @@ -71,7 +67,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->end()
->scalarNode('embed_sourcemap')
->info('Whether to embed the sourcemap in the compiled CSS. By default, enabled only when debug mode is on.')
->defaultValue($this->isDebug)
->defaultValue('%kernel.debug%')
->end()
->end()
;
Expand Down

0 comments on commit 542b3c9

Please sign in to comment.