Change record status: 
Project: 
Introduced in branch: 
10.3.x
Introduced in version: 
10.3.0
Description: 

Passing a non-array to \Drupal\Core\Plugin\DefaultSingleLazyPluginCollection::setConfiguration() will trigger a deprecation error.

Starting with Drupal 11.0.0, the base implementation will get the array type hint. This does not break implementations without it.

The documentation for \Drupal\Component\Plugin\LazyPluginCollection::setConfiguration() has always said:

  /**
   * Sets the configuration for all plugins in this collection.
   *
   * @param array $configuration
   *   An array of up-to-date plugin configuration.
   *
   * @return $this
   */
  abstract public function setConfiguration($configuration);

i.e. $configuration MUST be an array. Back then, in 2013, enforcing this was not feasible. Today, in 2023, we have native typehints that PHP can enforce. Bugs have been observed in the real world due to incorrect handling of this.

Impacts: 
Module developers