From 4c597b5ecaf75b912c9d31bf7d118c23041075d9 Mon Sep 17 00:00:00 2001 From: Mike Decker Date: Wed, 26 Jun 2024 10:52:24 -0700 Subject: [PATCH] 8.6.0 --- CHANGELOG.md | 8 +++++++- composer.json | 1 + src/Plugin/migrate/process/ImageDimensionSkip.php | 4 ++-- src/Plugin/migrate/process/UrlCheck.php | 4 ++-- stanford_migrate.info.yml | 2 +- .../Plugin/migrate/process/ImageDimensionSkipTest.php | 3 +-- tests/src/Unit/Plugin/migrate/process/UrlCheckTest.php | 3 +-- 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd84d7f..5d2a1d5 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,14 @@ # Stanford Migrate +8.6.0 +-------------------------------------------------------------------------------- +_Release Date: 2024-06-26_ + +- D11 upgrades, removing deprecated code. + 8.5.10 -------------------------------------------------------------------------------- -_Release Date: 2024-004-05_ +_Release Date: 2024-04-05_ - Fixed logging in orphan action diff --git a/composer.json b/composer.json index 0d27e57..ca9c567 100755 --- a/composer.json +++ b/composer.json @@ -15,6 +15,7 @@ ], "require": { "php": ">=8.0", + "drupal/core": "^10.3 || ^11", "drupal/empty_fields": "^1.0@beta", "drupal/migrate_file": "^2.0", "drupal/migrate_plus": "^6.0", diff --git a/src/Plugin/migrate/process/ImageDimensionSkip.php b/src/Plugin/migrate/process/ImageDimensionSkip.php index 4a323a5..d8b69a2 100644 --- a/src/Plugin/migrate/process/ImageDimensionSkip.php +++ b/src/Plugin/migrate/process/ImageDimensionSkip.php @@ -3,7 +3,6 @@ namespace Drupal\stanford_migrate\Plugin\migrate\process; use Drupal\migrate\MigrateExecutableInterface; -use Drupal\migrate\MigrateSkipProcessException; use Drupal\migrate\MigrateSkipRowException; use Drupal\migrate\ProcessPluginBase; use Drupal\migrate\Row; @@ -80,7 +79,8 @@ public function row($value, MigrateExecutableInterface $migrate_executable, Row */ public function process($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) { if (!$this->isImageBigger($value)) { - throw new MigrateSkipProcessException(); + $this->stopPipeline(); + return NULL; } return $value; } diff --git a/src/Plugin/migrate/process/UrlCheck.php b/src/Plugin/migrate/process/UrlCheck.php index 915f860..f75e813 100644 --- a/src/Plugin/migrate/process/UrlCheck.php +++ b/src/Plugin/migrate/process/UrlCheck.php @@ -4,7 +4,6 @@ use Drupal\Component\Utility\UrlHelper; use Drupal\migrate\MigrateExecutableInterface; -use Drupal\migrate\MigrateSkipProcessException; use Drupal\migrate\MigrateSkipRowException; use Drupal\migrate\ProcessPluginBase; use Drupal\migrate\Row; @@ -46,7 +45,8 @@ class UrlCheck extends ProcessPluginBase { */ public function process($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) { if (is_array($value) || !UrlHelper::isValid($value)) { - throw new MigrateSkipProcessException(); + $this->stopPipeline(); + return NULL; } return $value; } diff --git a/stanford_migrate.info.yml b/stanford_migrate.info.yml index d87da59..70a8a3b 100755 --- a/stanford_migrate.info.yml +++ b/stanford_migrate.info.yml @@ -1,7 +1,7 @@ name: 'Stanford Migrate' description: 'Adds more functionality to migrate and migrate plus modules' type: module -core_version_requirement: ^9 || ^10 || ^11 +core_version_requirement: ^10.3 || ^11 package: 'Stanford' version: 8.5.10 dependencies: diff --git a/tests/src/Unit/Plugin/migrate/process/ImageDimensionSkipTest.php b/tests/src/Unit/Plugin/migrate/process/ImageDimensionSkipTest.php index 03eae58..c711d4f 100644 --- a/tests/src/Unit/Plugin/migrate/process/ImageDimensionSkipTest.php +++ b/tests/src/Unit/Plugin/migrate/process/ImageDimensionSkipTest.php @@ -3,7 +3,6 @@ namespace Drupal\Tests\stanford_migrate\Unit\Plugin\migrate\process; use Drupal\migrate\MigrateExecutableInterface; -use Drupal\migrate\MigrateSkipProcessException; use Drupal\migrate\MigrateSkipRowException; use Drupal\migrate\Row; use Drupal\stanford_migrate\Plugin\migrate\process\ImageDimensionSkip; @@ -80,8 +79,8 @@ public function testProcessSkip() { $this->assertEquals($value, $plugin->transform($value, $migrate, $row, '')); $value = '50x50'; - $this->expectException(MigrateSkipProcessException::class); $plugin->transform($value, $migrate, $row, ''); + $this->assertTrue($plugin->isPipelineStopped()); } } diff --git a/tests/src/Unit/Plugin/migrate/process/UrlCheckTest.php b/tests/src/Unit/Plugin/migrate/process/UrlCheckTest.php index 5a49586..5648845 100644 --- a/tests/src/Unit/Plugin/migrate/process/UrlCheckTest.php +++ b/tests/src/Unit/Plugin/migrate/process/UrlCheckTest.php @@ -3,7 +3,6 @@ namespace Drupal\Tests\stanford_migrate\Unit\Plugin\migrate\process; use Drupal\migrate\MigrateExecutableInterface; -use Drupal\migrate\MigrateSkipProcessException; use Drupal\migrate\MigrateSkipRowException; use Drupal\migrate\Row; use Drupal\stanford_migrate\Plugin\migrate\process\UrlCheck; @@ -28,8 +27,8 @@ public function testProcess() { $value = $plugin->transform('https://google.com', $migrate, $row, NULL); $this->assertEquals('https://google.com', $value); - $this->expectException(MigrateSkipProcessException::class); $plugin->transform('Foo Bar', $migrate, $row, NULL); + $this->assertTrue($plugin->isPipelineStopped()); } /**