Issue #3069048 by bomoko, mikelutz, Berdir: Undeprecate SelectionPluginBase::ensureBackwardCompatibilityConfiguration() and ::resolveBackwardCompatibilityConfiguration() and mark @internal
parent
6280478a1a
commit
530230fea3
|
@ -120,8 +120,11 @@ abstract class SelectionPluginBase extends PluginBase implements SelectionInterf
|
|||
* @param array $configuration
|
||||
* The configuration array to be altered.
|
||||
*
|
||||
* @deprecated Scheduled for removal in Drupal 9.0.x.
|
||||
* @internal
|
||||
*
|
||||
* @todo Remove this method call and its method in Drupal 9.
|
||||
*
|
||||
* @see https://www.drupal.org/project/drupal/issues/3069757
|
||||
* @see https://www.drupal.org/node/2870971
|
||||
*/
|
||||
protected function resolveBackwardCompatibilityConfiguration(array &$configuration) {
|
||||
|
@ -134,7 +137,7 @@ abstract class SelectionPluginBase extends PluginBase implements SelectionInterf
|
|||
if (!is_array($configuration['handler_settings'])) {
|
||||
throw new \InvalidArgumentException("The setting 'handler_settings' is reserved and cannot be used.");
|
||||
}
|
||||
@trigger_error("Providing settings under 'handler_settings' is deprecated and will be removed before 9.0.0. Move the settings in the root of the configuration array. See https://www.drupal.org/node/2870971.", E_USER_DEPRECATED);
|
||||
@trigger_error("Providing settings under 'handler_settings' is deprecated in drupal:8.4.0 support for 'handler_settings' is removed from drupal:9.0.0. Move the settings in the root of the configuration array. See https://www.drupal.org/node/2870971", E_USER_DEPRECATED);
|
||||
|
||||
// Settings passed in the root level take precedence over BC settings.
|
||||
$configuration += $configuration['handler_settings'];
|
||||
|
@ -145,8 +148,11 @@ abstract class SelectionPluginBase extends PluginBase implements SelectionInterf
|
|||
/**
|
||||
* Ensures a backward compatibility level configuration.
|
||||
*
|
||||
* @deprecated Scheduled for removal in Drupal 9.0.x.
|
||||
* @internal
|
||||
*
|
||||
* @todo Remove this method call and its method in Drupal 9.
|
||||
*
|
||||
* @see https://www.drupal.org/project/drupal/issues/3069757
|
||||
* @see https://www.drupal.org/node/2870971
|
||||
*/
|
||||
protected function ensureBackwardCompatibilityConfiguration() {
|
||||
|
|
|
@ -189,7 +189,7 @@ class EntityReferenceSelectionUnitTest extends UnitTestCase {
|
|||
*
|
||||
* @covers ::setConfiguration
|
||||
* @covers ::resolveBackwardCompatibilityConfiguration
|
||||
* @expectedDeprecation Providing settings under 'handler_settings' is deprecated and will be removed before 9.0.0. Move the settings in the root of the configuration array. See https://www.drupal.org/node/2870971.
|
||||
* @expectedDeprecation Providing settings under 'handler_settings' is deprecated in drupal:8.4.0 support for 'handler_settings' is removed from drupal:9.0.0. Move the settings in the root of the configuration array. See https://www.drupal.org/node/2870971
|
||||
*/
|
||||
public function testDeprecationErrorTriggering() {
|
||||
// Configuration with BC level.
|
||||
|
|
Loading…
Reference in New Issue