From ac56e5a22e0c07f284d5bcc4f16d4e2f77fbce30 Mon Sep 17 00:00:00 2001 From: catch Date: Fri, 28 Oct 2022 10:30:37 +0100 Subject: [PATCH] Issue #3254986 by Matroskeen, paulocs, mikelutz, benjifisher, danflanagan8, quietone: Remove requirements array from RequirementsException message (cherry picked from commit 4c0f50772e37dcc204375abcbe55f2b522d23e1c) --- .../tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php | 6 +++--- .../tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php | 6 +++--- core/modules/migrate/src/MigrateExecutable.php | 3 +-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php index 0fe36155d81..084a8e1005d 100644 --- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php +++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php @@ -119,7 +119,7 @@ class MigrateCommentTypeTest extends MigrateDrupal6TestBase { 'Disabled source modules' => ['node'], 'Expected messages' => [ 'error' => [ - 'Migration d6_comment_type did not meet the requirements. The node module is not enabled in the source site. source_module_additional: node.', + 'Migration d6_comment_type did not meet the requirements. The node module is not enabled in the source site.', ], ], ], @@ -127,7 +127,7 @@ class MigrateCommentTypeTest extends MigrateDrupal6TestBase { 'Disabled source modules' => ['comment'], 'Expected messages' => [ 'error' => [ - 'Migration d6_comment_type did not meet the requirements. The module comment is not enabled in the source site. source_module: comment.', + 'Migration d6_comment_type did not meet the requirements. The module comment is not enabled in the source site.', ], ], ], @@ -135,7 +135,7 @@ class MigrateCommentTypeTest extends MigrateDrupal6TestBase { 'Disabled source modules' => ['comment', 'node'], 'Expected messages' => [ 'error' => [ - 'Migration d6_comment_type did not meet the requirements. The module comment is not enabled in the source site. source_module: comment.', + 'Migration d6_comment_type did not meet the requirements. The module comment is not enabled in the source site.', ], ], ], diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php index 93d899aaf2b..770464d971f 100644 --- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php +++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php @@ -125,7 +125,7 @@ class MigrateCommentTypeTest extends MigrateDrupal7TestBase { 'Disabled source modules' => ['node'], 'Expected messages' => [ 'error' => [ - 'Migration d7_comment_type did not meet the requirements. The node module is not enabled in the source site. source_module_additional: node.', + 'Migration d7_comment_type did not meet the requirements. The node module is not enabled in the source site.', ], ], ], @@ -133,7 +133,7 @@ class MigrateCommentTypeTest extends MigrateDrupal7TestBase { 'Disabled source modules' => ['comment'], 'Expected messages' => [ 'error' => [ - 'Migration d7_comment_type did not meet the requirements. The module comment is not enabled in the source site. source_module: comment.', + 'Migration d7_comment_type did not meet the requirements. The module comment is not enabled in the source site.', ], ], ], @@ -141,7 +141,7 @@ class MigrateCommentTypeTest extends MigrateDrupal7TestBase { 'Disabled source modules' => ['comment', 'node'], 'Expected messages' => [ 'error' => [ - 'Migration d7_comment_type did not meet the requirements. The module comment is not enabled in the source site. source_module: comment.', + 'Migration d7_comment_type did not meet the requirements. The module comment is not enabled in the source site.', ], ], ], diff --git a/core/modules/migrate/src/MigrateExecutable.php b/core/modules/migrate/src/MigrateExecutable.php index 50b75727c2f..59aada1381e 100644 --- a/core/modules/migrate/src/MigrateExecutable.php +++ b/core/modules/migrate/src/MigrateExecutable.php @@ -164,11 +164,10 @@ class MigrateExecutable implements MigrateExecutableInterface { catch (RequirementsException $e) { $this->message->display( $this->t( - 'Migration @id did not meet the requirements. @message @requirements', + 'Migration @id did not meet the requirements. @message', [ '@id' => $this->migration->id(), '@message' => $e->getMessage(), - '@requirements' => $e->getRequirementsString(), ] ), 'error'