diff --git a/src/DependencyInjection/SymfonycastsSassExtension.php b/src/DependencyInjection/SymfonycastsSassExtension.php index c07d9a4..fdadc0e 100644 --- a/src/DependencyInjection/SymfonycastsSassExtension.php +++ b/src/DependencyInjection/SymfonycastsSassExtension.php @@ -61,7 +61,7 @@ public function getConfigTreeBuilder(): TreeBuilder ->end() ->validate() ->ifTrue(static function (array $paths): bool { - if (1 === \count($paths)) { + if (1 === \count($paths) || !\array_is_list($paths)) { return false; } diff --git a/tests/ConfigurationTest.php b/tests/ConfigurationTest.php index f1b724e..0ca35fb 100644 --- a/tests/ConfigurationTest.php +++ b/tests/ConfigurationTest.php @@ -47,6 +47,18 @@ public function testMultipleSassRootPaths(): void ]); } + public function testMultipleSassRootPathsWithIdentifier(): void + { + $this->assertConfigurationIsValid([ + 'symfonycasts_sass' => [ + 'root_sass' => [ + 'website' => '%kernel.project_dir%/assets/scss/app.scss', + 'admin' => '%kernel.project_dir%/assets/admin/scss/app.scss', + ], + ], + ]); + } + public function testMultipleSassRootPathsWithSameFilename(): void { $this->assertConfigurationIsInvalid([