You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
https://www.drupal.org/node/3406191
Introduced in branch/version: 10.3.x / 10.3.0
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:i.e.
$configuration
MUST be anarray
. 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.The text was updated successfully, but these errors were encountered: