Issue #3254986 by Matroskeen, paulocs, mikelutz, benjifisher, danflanagan8, quietone: Remove requirements array from RequirementsException message

(cherry picked from commit 4c0f50772e)
merge-requests/2923/head
catch 2022-10-28 10:30:37 +01:00
parent 6c93f38f64
commit ac56e5a22e
3 changed files with 7 additions and 8 deletions

View File

@ -119,7 +119,7 @@ class MigrateCommentTypeTest extends MigrateDrupal6TestBase {
'Disabled source modules' => ['node'], 'Disabled source modules' => ['node'],
'Expected messages' => [ 'Expected messages' => [
'error' => [ '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'], 'Disabled source modules' => ['comment'],
'Expected messages' => [ 'Expected messages' => [
'error' => [ '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'], 'Disabled source modules' => ['comment', 'node'],
'Expected messages' => [ 'Expected messages' => [
'error' => [ '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.',
], ],
], ],
], ],

View File

@ -125,7 +125,7 @@ class MigrateCommentTypeTest extends MigrateDrupal7TestBase {
'Disabled source modules' => ['node'], 'Disabled source modules' => ['node'],
'Expected messages' => [ 'Expected messages' => [
'error' => [ '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'], 'Disabled source modules' => ['comment'],
'Expected messages' => [ 'Expected messages' => [
'error' => [ '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'], 'Disabled source modules' => ['comment', 'node'],
'Expected messages' => [ 'Expected messages' => [
'error' => [ '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.',
], ],
], ],
], ],

View File

@ -164,11 +164,10 @@ class MigrateExecutable implements MigrateExecutableInterface {
catch (RequirementsException $e) { catch (RequirementsException $e) {
$this->message->display( $this->message->display(
$this->t( $this->t(
'Migration @id did not meet the requirements. @message @requirements', 'Migration @id did not meet the requirements. @message',
[ [
'@id' => $this->migration->id(), '@id' => $this->migration->id(),
'@message' => $e->getMessage(), '@message' => $e->getMessage(),
'@requirements' => $e->getRequirementsString(),
] ]
), ),
'error' 'error'