Skip to content

Commit 8dc30d4

Browse files
Merge branch '10.5' into 11.5
2 parents 09ce2ee + fbffae7 commit 8dc30d4

File tree

5 files changed

+53
-9
lines changed

5 files changed

+53
-9
lines changed

ChangeLog-11.5.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes of the PHPUnit 11.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
44

5+
## [11.5.4] - 2025-MM-DD
6+
7+
### Fixed
8+
9+
* [#6103](https://github.com/sebastianbergmann/phpunit/issues/6103): Output from test run in separate process is printed twice
10+
511
## [11.5.3] - 2025-01-13
612

713
### Added
@@ -59,6 +65,7 @@ All notable changes of the PHPUnit 11.5 release series are documented in this fi
5965
* [#6055](https://github.com/sebastianbergmann/phpunit/issues/6055): `assertNotContainsOnly()` (use `assertContainsNotOnlyArray()`, `assertContainsNotOnlyBool()`, `assertContainsNotOnlyCallable()`, `assertContainsNotOnlyFloat()`, `assertContainsNotOnlyInt()`, `assertContainsNotOnlyIterable()`, `assertContainsNotOnlyNumeric()`, `assertContainsNotOnlyObject()`, `assertContainsNotOnlyResource()`, `assertContainsNotOnlyClosedResource()`, `assertContainsNotOnlyScalar()`, or `assertContainsNotOnlyString()` instead)
6066
* [#6059](https://github.com/sebastianbergmann/phpunit/issues/6059): `containsOnly()` (use `containsOnlyArray()`, `containsOnlyBool()`, `containsOnlyCallable()`, `containsOnlyFloat()`, `containsOnlyInt()`, `containsOnlyIterable()`, `containsOnlyNumeric()`, `containsOnlyObject()`, `containsOnlyResource()`, `containsOnlyClosedResource()`, `containsOnlyScalar()`, or `containsOnlyString()` instead)
6167

68+
[11.5.4]: https://github.com/sebastianbergmann/phpunit/compare/11.5.3...11.5
6269
[11.5.3]: https://github.com/sebastianbergmann/phpunit/compare/11.5.2...11.5.3
6370
[11.5.2]: https://github.com/sebastianbergmann/phpunit/compare/11.5.1...11.5.2
6471
[11.5.1]: https://github.com/sebastianbergmann/phpunit/compare/11.5.0...11.5.1

src/Framework/TestRunner/SeparateProcessTestRunner.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,6 @@ static function (int $errno, string $errstr, string $errfile, int $errline): nev
248248
}
249249

250250
if ($childResult !== false) {
251-
if (!empty($childResult['output'])) {
252-
$output = $childResult['output'];
253-
}
254-
255251
Facade::instance()->forward($childResult['events']);
256252
PassedTests::instance()->import($childResult['passedTests']);
257253

@@ -266,10 +262,6 @@ static function (int $errno, string $errstr, string $errfile, int $errline): nev
266262
);
267263
}
268264
}
269-
270-
if (!empty($output)) {
271-
print $output;
272-
}
273265
}
274266

275267
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ PHPUnit %s by Sebastian Bergmann and contributors.
1313

1414
Runtime: %s
1515

16-
1.2. 2 / 2 (100%)2
16+
1.2. 2 / 2 (100%)
1717

1818
Time: %s, Memory: %s
1919

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--TEST--
2+
https://github.com/sebastianbergmann/phpunit/issues/6103
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$_SERVER['argv'][] = '--do-not-cache-result';
6+
$_SERVER['argv'][] = '--no-configuration';
7+
$_SERVER['argv'][] = __DIR__ . '/6103/Issue6103Test.php';
8+
9+
require_once __DIR__ . '/../../bootstrap.php';
10+
11+
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
12+
--EXPECTF--
13+
PHPUnit %s by Sebastian Bergmann and contributors.
14+
15+
Runtime: %s
16+
17+
*. 1 / 1 (100%)
18+
19+
Time: %s, Memory: %s
20+
21+
OK (1 test, 1 assertion)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php declare(strict_types=1);
2+
/*
3+
* This file is part of PHPUnit.
4+
*
5+
* (c) Sebastian Bergmann <[email protected]>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
namespace PHPUnit\TestFixture\Issue6103;
11+
12+
use PHPUnit\Framework\Attributes\RunInSeparateProcess;
13+
use PHPUnit\Framework\TestCase;
14+
15+
final class Issue6103Test extends TestCase
16+
{
17+
#[RunInSeparateProcess]
18+
public function testOne(): void
19+
{
20+
print '*';
21+
22+
$this->assertTrue(true);
23+
}
24+
}

0 commit comments

Comments
 (0)