diff --git a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php index 7ea5522..a0d4d53 100644 --- a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php +++ b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php @@ -9,7 +9,7 @@ use Drupal\Core\Asset\Exception\IncompleteLibraryDefinitionException; use Drupal\Core\Asset\Exception\InvalidCssCategoryException; -use Drupal\Core\Asset\Exception\InvalidDefinitionOfCssException; +use Drupal\Core\Asset\Exception\InvalidCssDefinitionException; use Drupal\Core\Asset\Exception\InvalidLibraryFileException; use Drupal\Core\Asset\Exception\LibraryDefinitionMissingLicenseException; use Drupal\Core\Extension\ModuleHandlerInterface; @@ -121,7 +121,7 @@ public function buildByExtension($extension) { if ($type == 'css' && !empty($library[$type])) { foreach ($library[$type] as $category => $files) { if (empty($files)) { - throw new InvalidDefinitionOfCssException(sprintf("You have to key the css files in the %s.library.yml file by category ('%s' seems to be a file name, allowed categories are Base, Layout, Component, State, Theme)", $extension, $category)); + throw new InvalidCssDefinitionException(sprintf("You have to key the css files in the %s.library.yml file by category ('%s' seems to be a file name, allowed categories are Base, Layout, Component, State, Theme)", $extension, $category)); } foreach ($files as $source => $options) { if (!isset($options['weight'])) { diff --git a/core/modules/system/tests/modules/common_test/common_test.module b/core/modules/system/tests/modules/common_test/common_test.module index e04f9a7..01419bb 100644 --- a/core/modules/system/tests/modules/common_test/common_test.module +++ b/core/modules/system/tests/modules/common_test/common_test.module @@ -172,9 +172,11 @@ function common_test_library_info_build() { if (\Drupal::state()->get('common_test.library_info_build_test')) { $libraries['dynamic_library'] = [ 'version' => '1.0', - 'css' => ['theme' => [ - 'common_test.css' => [], - ]], + 'css' => [ + 'theme' => [ + 'common_test.css' => [], + ], + ], ]; } return $libraries;