MigrateSkipProcessException is deprecated

Created on 2 October 2024, 5 months ago

This module uses MigrateSkipProcessException:

./tests/src/Unit/process/GateTest.php:7:use Drupal\migrate\MigrateSkipProcessException;
./tests/src/Unit/process/GateTest.php:33:      $this->expectException(MigrateSkipProcessException::class);
./tests/src/Unit/process/SkipOnValueTest.php:7:use Drupal\migrate\MigrateSkipProcessException;
./tests/src/Unit/process/SkipOnValueTest.php:27:    $this->expectException(MigrateSkipProcessException::class);
./tests/src/Unit/process/SkipOnValueTest.php:39:    $this->expectException(MigrateSkipProcessException::class);
./src/Plugin/migrate/destination/Table.php:13:use Drupal\migrate\MigrateSkipProcessException;
./src/Plugin/migrate/destination/Table.php:180:        throw new MigrateSkipProcessException('All the id fields are required for a table migration.');
./src/Plugin/migrate/process/SkipOnValue.php:8:use Drupal\migrate\MigrateSkipProcessException;
./src/Plugin/migrate/process/SkipOnValue.php:150:   * @throws \Drupal\migrate\MigrateSkipProcessException
./src/Plugin/migrate/process/SkipOnValue.php:164:        throw new MigrateSkipProcessException();
./src/Plugin/migrate/process/SkipOnValue.php:168:      throw new MigrateSkipProcessException();
./src/Plugin/migrate/process/Gate.php:8:use Drupal\migrate\MigrateSkipProcessException;
./src/Plugin/migrate/process/Gate.php:124:      throw new MigrateSkipProcessException($message);
./src/Plugin/migrate/process/FileBlob.php:10:use Drupal\migrate\MigrateSkipProcessException;
./src/Plugin/migrate/process/FileBlob.php:130:      throw new MigrateSkipProcessException("Could not create directory '$dir'");
./src/Plugin/migrate/process/FileBlob.php:135:      throw new MigrateSkipProcessException("Blob data could not be copied to $destination.");

It is deprecated as of Drupal core 10.3: https://www.drupal.org/node/3414511

The new way to deal with those is to implement the isPipelineStopped() method: https://www.drupal.org/node/3247580

📌 Task
Status

Active

Version

6.0

Component

Plugins

Created by

🇨🇦Canada fengtan Montreal, Canada

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @fengtan
  • I have made some changes. Please refer to the attached patch.

  • Status changed to Needs work 3 months ago
  • achap 🇦🇺

    Thanks, this works to stop the deprecation warnings in CI but still needs work because there are unused use statements that need to be removed, test code needs to be updated to not rely on the exceptions and there are inconsistencies in the case of NULL, Null etc.

    Also, I guess as long as MigrateSkipProcessException is not removed from core this can't yet be removed from the module.

Production build 0.71.5 2024