Skip to content

Commit

Permalink
Anticipate method deprecation (#5989)
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiu-cristea committed May 6, 2024
1 parent 4dd5170 commit e3d44ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions phpstan-baseline.neon
@@ -1,5 +1,6 @@
parameters:
ignoreErrors:
# Remove once MigrationInterface::setRequirements() is added in https://www.drupal.org/i/2796755
-
message: "#^Call to an undefined method Drupal\\\\migrate\\\\Plugin\\\\MigrationInterface\\:\\:set\\(\\)\\.$#"
count: 1
Expand Down
4 changes: 4 additions & 0 deletions src/Commands/core/MigrateRunnerCommands.php
Expand Up @@ -388,6 +388,10 @@ protected function executeMigration(MigrationInterface $migration, string $migra
}
}
if (!empty($userData['options']['force'])) {
// @todo Use the new MigrationInterface::setRequirements() method,
// instead of Migration::set() and remove the PHPStan exception
// from phpstan-baseline.neon when #2796755 lands in Drupal core.
// @see https://www.drupal.org/i/2796755
$migration->set('requirements', []);
}
if (!empty($userData['options']['update'])) {
Expand Down

0 comments on commit e3d44ff

Please sign in to comment.