LibraryDiscovery is deprecated in D11.1, use LibraryDiscoveryCollector instead.

Created on 7 January 2025, 15 days ago

Problem/Motivation

When using this module in Drupal 11.1, I get the following error:

TypeError: Drupal\lang_dropdown\Plugin\Block\LanguageDropdownBlock::__construct(): Argument #7 ($library_discovery) must be of type Drupal\Core\Asset\LibraryDiscovery, Drupal\Core\Asset\LibraryDiscoveryCollector given, called in /var/www/html/web/modules/contrib/lang_dropdown/src/Plugin/Block/LanguageDropdownBlock.php on line 113 in Drupal\lang_dropdown\Plugin\Block\LanguageDropdownBlock->__construct() (line 99 of modules/contrib/lang_dropdown/src/Plugin/Block/LanguageDropdownBlock.php).

Proposed resolution

As described in https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Asset%21L..., we should use \Drupal\Core\Asset\LibraryDiscoveryCollector instead of \Drupal\Core\Asset\LibraryDiscovery

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇧🇪Belgium rgeerolf Belgium 🇧🇪🇪🇺

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024