Skip to content

Commit 6aebb5b

Browse files
Revert "Closes #6499"
This reverts commit 717c56a.
1 parent 717c56a commit 6aebb5b

File tree

9 files changed

+8
-51
lines changed

9 files changed

+8
-51
lines changed

ChangeLog-13.1.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,4 @@ All notable changes of the PHPUnit 13.1 release series are documented in this fi
88

99
* [#6501](https://github.com/sebastianbergmann/phpunit/issues/6501): Include unexpected test output in Open Test Reporting (OTR) XML logfile
1010

11-
### Deprecated
12-
13-
* [#6499](https://github.com/sebastianbergmann/phpunit/issues/6499): Support for logging test results in JUnit XML
14-
1511
[13.1.0]: https://github.com/sebastianbergmann/phpunit/compare/13.0...main

src/TextUI/Application.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -607,15 +607,6 @@ private function registerLogfileWriters(Configuration $configuration): void
607607
}
608608

609609
if ($configuration->hasLogfileJunit()) {
610-
EventFacade::emitter()->testRunnerTriggeredPhpunitDeprecation(
611-
<<<'EOT'
612-
Support for logging test results in JUnit XML format has been deprecated.
613-
This feature will be removed in PHPUnit 14.
614-
Either migrate from consuming JUnit XML to consuming Open Test Reporting (OTR) XML,
615-
or convert the OTR XML that PHPUnit generates to JUnit XML.
616-
EOT
617-
);
618-
619610
try {
620611
new JunitXmlLogger(
621612
OutputFacade::printerFor($configuration->logfileJunit()),

src/TextUI/Help.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ private function elements(): array
281281
],
282282

283283
'Logging' => [
284-
['arg' => '--log-junit <file>', 'desc' => 'Write test results in JUnit XML format to file (deprecated)'],
284+
['arg' => '--log-junit <file>', 'desc' => 'Write test results in JUnit XML format to file'],
285285
['arg' => '--log-otr <file>', 'desc' => 'Write test results in Open Test Reporting XML format to file'],
286286
['arg' => '--include-git-information', 'desc' => 'Include Git information in Open Test Reporting XML logfile'],
287287
['arg' => '--log-teamcity <file>', 'desc' => 'Write test results in TeamCity format to file'],

tests/end-to-end/_files/output-cli-help-color.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
Logging:
185185

186186
--log-junit <file>  Write test results in JUnit XML format
187-
to file (deprecated)
187+
to file
188188
--log-otr <file>  Write test results in Open Test
189189
Reporting XML format to file
190190
--include-git-information  Include Git information in Open Test

tests/end-to-end/_files/output-cli-usage.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Reporting:
122122

123123
Logging:
124124

125-
--log-junit <file> Write test results in JUnit XML format to file (deprecated)
125+
--log-junit <file> Write test results in JUnit XML format to file
126126
--log-otr <file> Write test results in Open Test Reporting XML format to file
127127
--include-git-information Include Git information in Open Test Reporting XML logfile
128128
--log-teamcity <file> Write test results in TeamCity format to file

tests/end-to-end/logging/junit/invalid-path.phpt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Test runner emits warning when --log-junit is used with an invalid target path
44
<?php declare(strict_types=1);
55
$_SERVER['argv'][] = '--do-not-cache-result';
66
$_SERVER['argv'][] = '--no-configuration';
7-
$_SERVER['argv'][] = '--display-phpunit-deprecations';
87
$_SERVER['argv'][] = '--log-junit';
98
$_SERVER['argv'][] = '';
109
$_SERVER['argv'][] = __DIR__ . '/../../_files/basic/SuccessTest.php';
@@ -25,14 +24,5 @@ There was 1 PHPUnit test runner warning:
2524

2625
1) Cannot log test results in JUnit XML format to "": Directory "" does not exist and could not be created
2726

28-
--
29-
30-
There was 1 PHPUnit test runner deprecation:
31-
32-
1) Support for logging test results in JUnit XML format has been deprecated.
33-
This feature will be removed in PHPUnit 14.
34-
Either migrate from consuming JUnit XML to consuming Open Test Reporting (OTR) XML,
35-
or convert the OTR XML that PHPUnit generates to JUnit XML.
36-
3727
OK, but there were issues!
38-
Tests: 1, Assertions: 1, PHPUnit Warnings: 1, PHPUnit Deprecations: 1.
28+
Tests: 1, Assertions: 1, PHPUnit Warnings: 1.

tests/end-to-end/logging/junit/invalid-socket.phpt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Test runner emits warning when --log-junit is used with an invalid socket
44
<?php declare(strict_types=1);
55
$_SERVER['argv'][] = '--do-not-cache-result';
66
$_SERVER['argv'][] = '--no-configuration';
7-
$_SERVER['argv'][] = '--display-phpunit-deprecations';
87
$_SERVER['argv'][] = '--log-junit';
98
$_SERVER['argv'][] = 'socket://hostname:port:wrong';
109
$_SERVER['argv'][] = __DIR__ . '/../../_files/basic/SuccessTest.php';
@@ -25,14 +24,5 @@ There was 1 PHPUnit test runner warning:
2524

2625
1) Cannot log test results in JUnit XML format to "socket://hostname:port:wrong": "socket://hostname:port:wrong" does not match "socket://hostname:port" format
2726

28-
--
29-
30-
There was 1 PHPUnit test runner deprecation:
31-
32-
1) Support for logging test results in JUnit XML format has been deprecated.
33-
This feature will be removed in PHPUnit 14.
34-
Either migrate from consuming JUnit XML to consuming Open Test Reporting (OTR) XML,
35-
or convert the OTR XML that PHPUnit generates to JUnit XML.
36-
3727
OK, but there were issues!
38-
Tests: 1, Assertions: 1, PHPUnit Warnings: 1, PHPUnit Deprecations: 1.
28+
Tests: 1, Assertions: 1, PHPUnit Warnings: 1.

tests/end-to-end/logging/junit/with-progress-with-errors.phpt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ $logfile = tempnam(sys_get_temp_dir(), __FILE__);
1212
$_SERVER['argv'][] = '--do-not-cache-result';
1313
$_SERVER['argv'][] = '--no-configuration';
1414
$_SERVER['argv'][] = '--do-not-report-useless-tests';
15-
$_SERVER['argv'][] = '--display-phpunit-deprecations';
1615
$_SERVER['argv'][] = '--log-junit';
1716
$_SERVER['argv'][] = $logfile;
1817
$_SERVER['argv'][] = __DIR__ . '/../_files/TypeErrorTest.php';
@@ -33,15 +32,6 @@ E 1 / 1 (100%)
3332

3433
Time: %s, Memory: %s
3534

36-
There was 1 PHPUnit test runner deprecation:
37-
38-
1) Support for logging test results in JUnit XML format has been deprecated.
39-
This feature will be removed in PHPUnit 14.
40-
Either migrate from consuming JUnit XML to consuming Open Test Reporting (OTR) XML,
41-
or convert the OTR XML that PHPUnit generates to JUnit XML.
42-
43-
--
44-
4535
There was 1 error:
4636

4737
1) PHPUnit\TestFixture\TypeErrorTest::testMe
@@ -50,7 +40,7 @@ TypeError: Cannot assign DateTime to property PHPUnit\TestFixture\TypeErrorTest:
5040
%sTypeErrorTest.php:%d
5141

5242
ERRORS!
53-
Tests: 1, Assertions: 0, Errors: 1, PHPUnit Deprecations: 1.
43+
Tests: 1, Assertions: 0, Errors: 1.
5444
<?xml version="1.0" encoding="UTF-8"?>
5545
<testsuites>
5646
<testsuite name="PHPUnit\TestFixture\TypeErrorTest" file="%sTypeErrorTest.php" tests="1" assertions="0" errors="1" failures="0" skipped="0" time="%f">

tests/end-to-end/regression/5258.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Runtime: %s
2626

2727
Time: %s, Memory: %s MB
2828

29-
OK, but there were issues!
30-
Tests: 2, Assertions: 1, PHPUnit Deprecations: 1, Skipped: 1.
29+
OK, but some tests were skipped!
30+
Tests: 2, Assertions: 1, Skipped: 1.
3131
<?xml version="1.0" encoding="UTF-8"?>
3232
<testsuites>
3333
<testsuite name="PHPUnit\TestFixture\Issue5258\Issue5258Test" file="%sIssue5258Test.php" tests="2" assertions="1" errors="0" failures="0" skipped="1" time="%f">

0 commit comments

Comments
 (0)