Skip to content

Commit

Permalink
8.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish authored Jun 26, 2024
1 parent 0b8d5c6 commit 6b26c5f
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/migrate/process/ImageDimensionSkip.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/migrate/process/UrlCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion stanford_migrate.info.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}

}
Expand Down
3 changes: 1 addition & 2 deletions tests/src/Unit/Plugin/migrate/process/UrlCheckTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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());
}

/**
Expand Down

0 comments on commit 6b26c5f

Please sign in to comment.