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

This reverts commit 0f10593e7f.
merge-requests/2505/merge
catch 2022-10-29 07:49:46 +01:00
parent 751983cb49
commit aec9ebc2d1
3 changed files with 8 additions and 7 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.', 'Migration d6_comment_type did not meet the requirements. The node module is not enabled in the source site. source_module_additional: node.',
], ],
], ],
], ],
@ -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.', 'Migration d6_comment_type did not meet the requirements. The module comment is not enabled in the source site. source_module: comment.',
], ],
], ],
], ],
@ -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.', 'Migration d6_comment_type did not meet the requirements. The module comment is not enabled in the source site. source_module: comment.',
], ],
], ],
], ],

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.', 'Migration d7_comment_type did not meet the requirements. The node module is not enabled in the source site. source_module_additional: node.',
], ],
], ],
], ],
@ -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.', 'Migration d7_comment_type did not meet the requirements. The module comment is not enabled in the source site. source_module: comment.',
], ],
], ],
], ],
@ -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.', 'Migration d7_comment_type did not meet the requirements. The module comment is not enabled in the source site. source_module: comment.',
], ],
], ],
], ],

View File

@ -164,10 +164,11 @@ 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', 'Migration @id did not meet the requirements. @message @requirements',
[ [
'@id' => $this->migration->id(), '@id' => $this->migration->id(),
'@message' => $e->getMessage(), '@message' => $e->getMessage(),
'@requirements' => $e->getRequirementsString(),
] ]
), ),
'error' 'error'