diff --git a/core/lib/Drupal/Core/Asset/Exception/InvalidCssCategoryException.php b/core/lib/Drupal/Core/Asset/Exception/InvalidCssCategoryException.php deleted file mode 100644 index b128324..0000000 --- a/core/lib/Drupal/Core/Asset/Exception/InvalidCssCategoryException.php +++ /dev/null @@ -1,15 +0,0 @@ - $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'])) { $options['weight'] = 0; } - //Check if the category is valid or not and - // apply the corresponding weight defined by CSS_* constants. + // Check if the category is valid or not and apply the + // corresponding weight defined by the CSS_* constants. if (defined('CSS_' . strtoupper($category))) { $options['weight'] += constant('CSS_' . strtoupper($category)); } else { - throw new InvalidCssCategoryException(sprintf("You have used an invalid category %s in %s.libraries.yml. Allowed categories are Base, Layout, Component, State, Theme)", $category, $extension)); + throw new InvalidCssDefinitionException(sprintf("You have used an invalid category %s in %s.libraries.yml. Allowed categories are Base, Layout, Component, State, Theme)", $category, $extension)); } $library[$type][$source] = $options; } 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 1195374..f89e772 100644 --- a/core/modules/system/tests/modules/common_test/common_test.module +++ b/core/modules/system/tests/modules/common_test/common_test.module @@ -174,9 +174,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;