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