diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php index bcee94a83d..9d5e231c3f 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php @@ -140,10 +140,6 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage, $bundles); $this->entityFieldManager = $entity_field_manager; $this->fieldTypeManager = $field_type_manager; - if ($account_switcher === NULL) { - @trigger_error('Calling ' . __NAMESPACE__ . '\EntityContentBase::__construct() without the $account_switcher argument is deprecated in drupal:9.3.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3142975', E_USER_DEPRECATED); - $account_switcher = \Drupal::service('account_switcher'); - } $this->accountSwitcher = $account_switcher; } diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php index b5fb3ec250..aa0a49ccdb 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php @@ -304,24 +304,4 @@ public function testStubRows() { } } - /** - * Test BC injection of account switcher service. - * - * @group legacy - */ - public function testAccountSwitcherBackwardsCompatibility() { - $this->expectDeprecation('Calling Drupal\migrate\Plugin\migrate\destination\EntityContentBase::__construct() without the $account_switcher argument is deprecated in drupal:9.3.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3142975'); - $destination = new EntityContentBase( - [], - 'fake_plugin_id', - [], - $this->createMock(MigrationInterface::class), - $this->storage, - [], - $this->container->get('entity_field.manager'), - $this->container->get('plugin.manager.field.field_type') - ); - $this->assertInstanceOf(EntityContentBase::class, $destination); - } - } diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php b/core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php deleted file mode 100644 index 81f1c50207..0000000000 --- a/core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php +++ /dev/null @@ -1,24 +0,0 @@ -plugin = new NodeReference([], 'nodereference', []); - - $migration = $this->prophesize(MigrationInterface::class); - - $migration->setProcessOfProperty(Argument::type('string'), Argument::type('array')) - ->will(function ($arguments) use ($migration) { - $migration->getProcess()->willReturn($arguments[1]); - }); - $this->migration = $migration->reveal(); - } - - /** - * @covers ::defineValueProcessPipeline - * @runInSeparateProcess - */ - public function testDefineValueProcessPipeline() { - $this->expectDeprecation('The Drupal\migrate_drupal\Plugin\migrate\field\NodeReference is deprecated in drupal:9.1.0 and will be removed from drupal:10.0.0. Instead use \Drupal\migrate_drupal\Plugin\migrate\field\d6\NodeReference. See https://www.drupal.org/node/3159537.'); - $this->plugin->defineValueProcessPipeline($this->migration, 'field_name', []); - - $expected = [ - 'plugin' => 'sub_process', - 'source' => 'field_name', - 'process' => ['target_id' => 'nid'], - ]; - $this->assertSame($expected, $this->migration->getProcess()); - } - -} diff --git a/core/modules/migrate_drupal_ui/src/Form/ReviewForm.php b/core/modules/migrate_drupal_ui/src/Form/ReviewForm.php index 6bad803e3c..89a89963d1 100644 --- a/core/modules/migrate_drupal_ui/src/Form/ReviewForm.php +++ b/core/modules/migrate_drupal_ui/src/Form/ReviewForm.php @@ -80,10 +80,6 @@ class ReviewForm extends MigrateUpgradeFormBase { public function __construct(StateInterface $state, MigrationPluginManagerInterface $migration_plugin_manager, PrivateTempStoreFactory $tempstore_private, MigrationState $migrationState, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler = NULL) { parent::__construct($config_factory, $migration_plugin_manager, $state, $tempstore_private); $this->migrationState = $migrationState; - if (!$module_handler) { - @trigger_error('Calling ' . __METHOD__ . ' without the $module_handler argument is deprecated in drupal:9.1.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3136769', E_USER_DEPRECATED); - $module_handler = \Drupal::service('module_handler'); - } $this->moduleHandler = $module_handler; }