Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294288

Locale configuration storage passes wrong arguments to install storage

$
0
0

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))
  )
);

Viewing all articles
Browse latest Browse all 294288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>