diff --git a/core/modules/action/migrations/state/action.migrate_drupal.yml b/core/modules/action/migrations/state/action.migrate_drupal.yml deleted file mode 100644 index b513752a62..0000000000 --- a/core/modules/action/migrations/state/action.migrate_drupal.yml +++ /dev/null @@ -1,5 +0,0 @@ -finished: - 6: - system: action - 7: - system: action diff --git a/core/modules/action/src/Plugin/migrate/source/Action.php b/core/modules/action/src/Plugin/migrate/source/Action.php index 8a427f566a..e31ef41056 100644 --- a/core/modules/action/src/Plugin/migrate/source/Action.php +++ b/core/modules/action/src/Plugin/migrate/source/Action.php @@ -2,69 +2,18 @@ namespace Drupal\action\Plugin\migrate\source; -use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase; -use Drupal\migrate\Row; +@trigger_error('The' . __NAMESPACE__ . '\Action is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Use \Drupal\system\Plugin\migrate\source\Action instead. See https://www.drupal.org/node/3110401', E_USER_DEPRECATED); + +use Drupal\system\Plugin\migrate\source\Action as SystemAction; /** * Drupal action source from database. * - * @MigrateSource( - * id = "action", - * source_module = "system" - * ) + * @deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Use + * \Drupal\system\Plugin\migrate\source\Action instead. + * + * @see https://www.drupal.org/node/3110401 */ -class Action extends DrupalSqlBase { - - /** - * {@inheritdoc} - */ - public function query() { - return $this->select('actions', 'a') - ->fields('a'); - } - - /** - * {@inheritdoc} - */ - public function fields() { - $fields = [ - 'aid' => $this->t('Action ID'), - 'type' => $this->t('Module'), - 'callback' => $this->t('Callback function'), - 'parameters' => $this->t('Action configuration'), - ]; - if ($this->getModuleSchemaVersion('system') >= 7000) { - $fields['label'] = $this->t('Label of the action'); - } - else { - $fields['description'] = $this->t('Action description'); - } - return $fields; - } - - /** - * {@inheritdoc} - */ - public function getIds() { - $ids['aid']['type'] = 'string'; - return $ids; - } - - /** - * {@inheritdoc} - */ - public function prepareRow(Row $row) { - $aid = $row->getSourceProperty('aid'); - if (is_numeric($aid)) { - if ($this->getModuleSchemaVersion('system') >= 7000) { - $label = $row->getSourceProperty('label'); - } - else { - $label = $row->getSourceProperty('description'); - } - $row->setSourceProperty('aid', $label); - } - return parent::prepareRow($row); - } +class Action extends SystemAction { } diff --git a/core/modules/migrate_drupal/tests/src/Kernel/StateFileExists.php b/core/modules/migrate_drupal/tests/src/Kernel/StateFileExists.php index f2fb8607e8..ce51cd7a5c 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/StateFileExists.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/StateFileExists.php @@ -36,7 +36,6 @@ class StateFileExists extends MigrateDrupalTestBase { * @var array */ protected $stateFileRequired = [ - 'action', 'aggregator', 'ban', 'block', diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php index d938b852d5..b672724aa9 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php @@ -94,7 +94,7 @@ protected function getEntityCounts() { 'search_page' => 2, 'shortcut' => 2, 'shortcut_set' => 1, - 'action' => 25, + 'action' => 31, 'menu' => 8, 'path_alias' => 8, 'taxonomy_term' => 15, diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php index 667ecd5975..20a16372ec 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php @@ -95,7 +95,7 @@ protected function getEntityCounts() { 'search_page' => 2, 'shortcut' => 6, 'shortcut_set' => 2, - 'action' => 19, + 'action' => 25, 'menu' => 7, 'taxonomy_term' => 25, 'taxonomy_vocabulary' => 8, diff --git a/core/modules/action/migrations/action_settings.yml b/core/modules/system/migrations/action_settings.yml similarity index 92% rename from core/modules/action/migrations/action_settings.yml rename to core/modules/system/migrations/action_settings.yml index acc446ed64..28b1bd4063 100644 --- a/core/modules/action/migrations/action_settings.yml +++ b/core/modules/system/migrations/action_settings.yml @@ -17,4 +17,4 @@ process: destination: plugin: config config_name: null - destination_module: action + destination_module: system diff --git a/core/modules/action/migrations/d6_action.yml b/core/modules/system/migrations/d6_action.yml similarity index 100% rename from core/modules/action/migrations/d6_action.yml rename to core/modules/system/migrations/d6_action.yml diff --git a/core/modules/action/migrations/d7_action.yml b/core/modules/system/migrations/d7_action.yml similarity index 100% rename from core/modules/action/migrations/d7_action.yml rename to core/modules/system/migrations/d7_action.yml diff --git a/core/modules/action/src/Plugin/migrate/source/Action.php b/core/modules/system/src/Plugin/migrate/source/Action.php similarity index 96% copy from core/modules/action/src/Plugin/migrate/source/Action.php copy to core/modules/system/src/Plugin/migrate/source/Action.php index 8a427f566a..f03b92b1c8 100644 --- a/core/modules/action/src/Plugin/migrate/source/Action.php +++ b/core/modules/system/src/Plugin/migrate/source/Action.php @@ -1,6 +1,6 @@