Skip to content

Commit c3eb501

Browse files
Revert "Emit TestRunner\WarningTriggered events for warnings from loading the XML configuration file"
This reverts commit f44ceb7.
1 parent e6c8a32 commit c3eb501

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

src/TextUI/Configuration/Merger.php

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -616,24 +616,16 @@ public function merge(CliConfiguration $cliConfiguration, XmlConfiguration $xmlC
616616
$randomOrderSeed = time();
617617
}
618618

619-
if ($xmlConfiguration->wasLoadedFromFile()) {
620-
if ($xmlConfiguration->hasValidationErrors()) {
621-
if ((new SchemaDetector)->detect($xmlConfiguration->filename())->detected()) {
622-
EventFacade::emitter()->testRunnerTriggeredDeprecation(
623-
'Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"!',
624-
);
625-
} else {
626-
EventFacade::emitter()->testRunnerTriggeredWarning(
627-
"Test results may not be as expected because the XML configuration file did not pass validation:\n" .
628-
$xmlConfiguration->validationErrors(),
629-
);
630-
}
631-
}
632-
633-
if ($xmlConfiguration->hasWarnings()) {
634-
foreach ($xmlConfiguration->warnings() as $warning) {
635-
EventFacade::emitter()->testRunnerTriggeredWarning($warning);
636-
}
619+
if ($xmlConfiguration->wasLoadedFromFile() && $xmlConfiguration->hasValidationErrors()) {
620+
if ((new SchemaDetector)->detect($xmlConfiguration->filename())->detected()) {
621+
EventFacade::emitter()->testRunnerTriggeredDeprecation(
622+
'Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"!',
623+
);
624+
} else {
625+
EventFacade::emitter()->testRunnerTriggeredWarning(
626+
"Test results may not be as expected because the XML configuration file did not pass validation:\n" .
627+
$xmlConfiguration->validationErrors(),
628+
);
637629
}
638630
}
639631

0 commit comments

Comments
 (0)