getAllComponents(); // Generate backwards compatible deprecated libraries that depend on the new // library name scheme. $libraries = array_reduce( $components, static function (array $libraries, Component $component) use ($deprecation_message) { // The library name is something like core/components.my-theme--my-comp. $library_name = $component->getLibraryName(); // The library ID is something like my-theme--my-comp. $library_id = str_replace('core/components.', '', $library_name); // Adding these libraries will result in the old 'sdc/my-theme--my-comp'. return array_merge($libraries, [ $library_id => [ 'dependencies' => [$library_name], 'deprecated' => $deprecation_message, ], ]); }, [] ); // Alias the library sdc/all to core/components.all. $libraries['all'] = [ 'dependencies' => ['core/components.all'], 'deprecated' => 'The %library_id% asset library is deprecated in Drupal 10.3.0 and will be removed in Drupal 11.0.0. Use the core/components.all library instead. See https://www.drupal.org/node/3410260', ]; return $libraries; }