Locale configuration storage passes wrong arguments to install storage

Created on 1 June 2023, over 1 year ago
Updated 22 July 2023, over 1 year ago

Problem/Motivation

The signature of the \Drupal\Core\Config\InstallStorage::getComponentNames method has changed in this commit

https://git.drupalcode.org/project/drupal/-/commit/b5f7cccde43cc907f7f5c...

Old: public function getComponentNames(string $type, array $list)
New: public function getComponentNames(array $list)

But some of the callers were not updated.
https://git.drupalcode.org/project/drupal/-/blob/0b49065ceb58ed256dd4df6...

In this case the (string) $type passed as first argument to the \Drupal\Core\Config\InstallStorage::getComponentNames, because of the lack of the declare(strict_types = 1); the string "module" is converted into an array, the result is ["module"].

Proposed resolution

$names = array_unique(
  array_merge(
    array_keys($this->requiredInstallStorage->getComponentNames($list)),
    array_keys($this->optionalInstallStorage->getComponentNames($list))
  )
);
🐛 Bug report
Status

Fixed

Version

10.1

Component
Locale 

Last updated 3 days ago

Created by

🇭🇺Hungary Sweetchuck Budapest

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

Comments & Activities

Production build 0.71.5 2024