Unverified Commit 158c8340 authored by heddn's avatar heddn Committed by heddn
Browse files

Issue #3249797 by heddn: Remove BC shims supporting earlier then 9.1

parent e4b4b431
......@@ -30,9 +30,6 @@
"config": {
"preferred-install": "dist"
},
"require": {
"php": ">=7.1"
},
"require-dev": {
"drush/drush": "^10"
},
......
......@@ -2,6 +2,6 @@ type: module
name: Migrate Plus
description: 'Enhancements to core migration support'
package: Migration
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9.1
dependencies:
- drupal:migrate
......@@ -83,5 +83,5 @@ function migrate_plus_migration_plugins_alter(array &$migrations) {
* Implements hook_migrate_prepare_row().
*/
function migrate_plus_migrate_prepare_row(Row $row, MigrateSourceInterface $source, MigrationInterface $migration) {
\Drupal::service('event_dispatcher')->dispatch(MigrateEvents::PREPARE_ROW, new MigratePrepareRowEvent($row, $source, $migration));
\Drupal::service('event_dispatcher')->dispatch(new MigratePrepareRowEvent($row, $source, $migration), MigrateEvents::PREPARE_ROW);
}
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="Module">
<file>.</file>
<arg name="extensions" value="php,module,inc,install,test,profile,theme,css,info,txt,md,yml"/>
<!-- Initially include all Drupal and DrupalPractice sniffs. -->
<rule ref="vendor/drupal/coder/coder_sniffer/Drupal"/>
<rule ref="vendor/drupal/coder/coder_sniffer/DrupalPractice"/>
<!-- Use 's' to print the full sniff name in the report. -->
<!-- A '-' is prefixed to each of these, so s becomes -s, etc. -->
<arg value="s"/>
<arg value="-colors"/>
<arg name='report-width' value='120'/>
<!-- Ignore all files that match these patterns. They are matched against -->
<!-- the full file path and there is an implied wildcard at each end. -->
<!-- Periods must be escaped using \. -->
<!-- The first two are key to isolating just this project's files. -->
<exclude-pattern>web/</exclude-pattern>
<exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern>\.patch</exclude-pattern>
<exclude-pattern>interdiff</exclude-pattern>
</ruleset>
......@@ -5,7 +5,7 @@ namespace Drupal\migrate_plus\Event;
use Drupal\migrate\Plugin\MigrateSourceInterface;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\Row;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;
/**
* Wraps a prepare-row event for event listeners.
......
......@@ -24,7 +24,7 @@ class MigrateTableIncrementTest extends MigrateTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['migrate_plus'];
protected static $modules = ['migrate_plus'];
/**
* {@inheritdoc}
......
......@@ -34,7 +34,7 @@ class MigrateTableTest extends MigrateTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['migrate_plus'];
protected static $modules = ['migrate_plus'];
/**
* {@inheritdoc}
......
......@@ -17,7 +17,7 @@ class MigrationConfigEntityTest extends MigrateTestBase {
/**
* {@inheritdoc}
*/
public static $modules = [
protected static $modules = [
'migrate',
'migrate_plus',
'migrate_plus_test',
......@@ -42,7 +42,6 @@ class MigrationConfigEntityTest extends MigrateTestBase {
$this->pluginManager = \Drupal::service('plugin.manager.migration');
$this->installConfig('migrate_plus');
$this->installEntitySchema('taxonomy_term');
$this->installSchema('system', ['key_value', 'key_value_expire']);
}
/**
......
......@@ -16,7 +16,7 @@ class MigrationGroupTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['migrate', 'migrate_plus', 'migrate_plus_test'];
protected static $modules = ['migrate', 'migrate_plus', 'migrate_plus_test'];
/**
* Test that group configuration is properly merged into specific migrations.
......@@ -136,7 +136,7 @@ class MigrationGroupTest extends KernelTestBase {
/** @var \Drupal\migrate\Plugin\MigrationPluginManagerInterface $pluginManager */
$pluginManager = \Drupal::service('plugin.manager.migration');
$migration = $pluginManager->getDefinition('dummy');
$this->assertEqual($migration['migration_group'], 'default', 'Migrations without an explicit group are assigned the default group.');
$this->assertEquals($migration['migration_group'], 'default', 'Migrations without an explicit group are assigned the default group.');
}
}
......@@ -22,7 +22,7 @@ class DefaultEntityValueTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
public static $modules = [
protected static $modules = [
'migrate_plus',
'migrate',
'user',
......
......@@ -267,7 +267,7 @@ class EntityGenerateTest extends KernelTestBase implements MigrateMessageInterfa
$migration = $this->migrationPluginManager->createStubMigration($definition);
$migrationExecutable = (new MigrateExecutable($migration, $this));
$migrationExecutable->import();
$this->assertEquals('Destination field type integer is not a recognized reference type.', $migration->getIdMap()->getMessages()->fetch()->message);
$this->assertStringEndsWith('Destination field type integer is not a recognized reference type.', $migration->getIdMap()->getMessages()->fetch()->message);
$this->assertSame(1, $migration->getIdMap()->messageCount());
// Enough context is provided so this should work.
......
......@@ -48,7 +48,7 @@ class EntityValueTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
public static $modules = [
protected static $modules = [
'migrate',
'migrate_plus',
'system',
......@@ -60,7 +60,7 @@ class EntityValueTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
protected function setUp() {
protected function setUp(): void {
parent::setUp();
ConfigurableLanguage::createFromLangcode('es')->save();
$this->installSchema('system', ['sequences']);
......@@ -160,7 +160,7 @@ class EntityValueTest extends KernelTestBase {
* @dataProvider entityValueFailureConfigData
*/
public function testEntityValueConfig($config) {
$this->setExpectedException(\InvalidArgumentException::class);
$this->expectException(\InvalidArgumentException::class);
$plugin = \Drupal::service('plugin.manager.migrate.process')
->createInstance('entity_value', $config);
}
......
......@@ -21,7 +21,7 @@ class FileBlobTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
public static $modules = [
protected static $modules = [
'migrate',
'migrate_plus',
'system',
......
......@@ -14,7 +14,7 @@ class JsonTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['migrate', 'migrate_plus'];
protected static $modules = ['migrate', 'migrate_plus'];
/**
* Tests missing properties in json file.
......
......@@ -11,7 +11,7 @@ use Drupal\KernelTests\KernelTestBase;
*/
class XmlTest extends KernelTestBase {
public static $modules = ['migrate', 'migrate_plus'];
protected static $modules = ['migrate', 'migrate_plus'];
/**
* Tests retrieving single value from element with attributes.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment