Remove deprecated code.
2 unresolved threads
2 unresolved threads
Closes #3439369
Merge request reports
Activity
added 28 commits
-
e8627e17...f48f361e - 26 commits from branch
project:11.x
- da28675a - Merge branch 'refs/heads/11.x' into 3439369-removed-deprecated-code
- c0d11183 - Resolve conflicts
-
e8627e17...f48f361e - 26 commits from branch
- Resolved by quietone
700 655 [$this->migrationPluginManager, 'expandPluginIds'], 701 656 $this->migration_dependencies 702 657 ); 703 658 } - Comment on lines 675 to 703
This deprecation is more complex - we need to remove $expand and the FALSE code path and issue a deprecation if an arg is passed in. Something like...
638 * @param bool $expand 639 * Set TRUE if migration dependencies need to be expanded, otherwise FALSE. 640 * 641 * @return array 642 * The dependencies for this migration. 643 */ 644 public function getMigrationDependencies(bool $expand = FALSE) { 645 $this->migration_dependencies = ($this->migration_dependencies ?: []) + ['required' => [], 'optional' => []]; 646 if (count($this->migration_dependencies) !== 2 || !is_array($this->migration_dependencies['required']) || !is_array($this->migration_dependencies['optional'])) { 647 throw new InvalidPluginDefinitionException($this->id(), "Invalid migration dependencies configuration for migration {$this->id()}"); 648 } 649 $this->migration_dependencies['optional'] = array_unique(array_merge($this->migration_dependencies['optional'], $this->findMigrationDependencies($this->process))); 650 if (!$expand) { 651 return $this->migration_dependencies; 652 } 653 return array_map( 654 [$this->migrationPluginManager, 'expandPluginIds'], 655 $this->migration_dependencies 656 ); 657 } 638 /** 639 * Get the dependencies for this migration. 640 * 641 * @return array 642 * The dependencies for this migration. 643 */ 644 public function getMigrationDependencies() { 645 if (func_num_args() > 0) { 646 @trigger_error('@TODO', E_USER_DEPRECATED); 647 } 648 649 $this->migration_dependencies = ($this->migration_dependencies ?: []) + ['required' => [], 'optional' => []]; 650 if (count($this->migration_dependencies) !== 2 || !is_array($this->migration_dependencies['required']) || !is_array($this->migration_dependencies['optional'])) { 651 throw new InvalidPluginDefinitionException($this->id(), "Invalid migration dependencies configuration for migration {$this->id()}"); 652 } 653 $this->migration_dependencies['optional'] = array_unique(array_merge($this->migration_dependencies['optional'], $this->findMigrationDependencies($this->process))); 654 655 return array_map( 656 [$this->migrationPluginManager, 'expandPluginIds'], 657 $this->migration_dependencies 658 ); 659 } And we need to fix all the calls to \Drupal\migrate\Plugin\Migration::getMigrationDependencies() in core to not pass an argument.
added 1 commit
677 638 * 678 * @param bool $expand 679 * Will issue a deprecation in Drupal 10 if set to FALSE. See 680 * https://www.drupal.org/node/3266691. 681 * 682 639 * @return array 683 * The dependencies for this migrations. 640 * The dependencies for this migration. 684 641 */ 685 public function getMigrationDependencies(bool $expand = FALSE) { 686 if (!$expand) { 687 @trigger_error('Calling Migration::getMigrationDependencies() without expanding the plugin IDs is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. In most cases, use getMigrationDependencies(TRUE). See https://www.drupal.org/node/3266691', E_USER_DEPRECATED); 642 public function getMigrationDependencies() { 643 if (func_num_args() > 0) { 644 // phpcs:ignore Drupal.Semantics.FunctionTriggerError 645 @trigger_error(sprintf('Passing parameter to %s is disallowed', __METHOD__), E_USER_DEPRECATED); - Comment on lines +644 to +645
changed this line in version 14 of the diff
added 134 commits
-
c692fa78...79eed4ac - 121 commits from branch
project:11.x
- 79eed4ac...2cbe6a3b - 3 earlier commits
- 5d2fa48d - Update tests
- b6458737 - Update tests
- 4dea686f - Remove deprecations
- ac280c13 - Remove deprecations
- 5ed1c66c - Issue #3439369: Removed deprecated code in migration system
- d79ad494 - Rollback unrelated change
- bd3fd294 - Fix call to getMigrationDependencies()
- c723ca32 - Update trigger error
- 67e57245 - Update trigger error
- ebe53e21 - add change record
Toggle commit list-
c692fa78...79eed4ac - 121 commits from branch
Please register or sign in to reply