Skip to content

Commit c3d1725

Browse files
Merge branch '10.5' into 11.5
* 10.5: Closes #6368 Remove superfluous statements
2 parents 5656a95 + efda1cf commit c3d1725

File tree

5 files changed

+80
-2
lines changed

5 files changed

+80
-2
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.42] - 2025-MM-DD
6+
7+
### Fixed
8+
9+
* [#6368](https://github.com/sebastianbergmann/phpunit/issues/6368): `failOnPhpunitWarning="false"` has no effect
10+
511
## [11.5.41] - 2025-09-24
612

713
* No changes; `phpunit.phar` rebuilt with updated dependencies
@@ -352,6 +358,7 @@ All notable changes of the PHPUnit 11.5 release series are documented in this fi
352358
* [#6055](https://github.com/sebastianbergmann/phpunit/issues/6055): `assertNotContainsOnly()` (use `assertContainsNotOnlyArray()`, `assertContainsNotOnlyBool()`, `assertContainsNotOnlyCallable()`, `assertContainsNotOnlyFloat()`, `assertContainsNotOnlyInt()`, `assertContainsNotOnlyIterable()`, `assertContainsNotOnlyNumeric()`, `assertContainsNotOnlyObject()`, `assertContainsNotOnlyResource()`, `assertContainsNotOnlyClosedResource()`, `assertContainsNotOnlyScalar()`, or `assertContainsNotOnlyString()` instead)
353359
* [#6059](https://github.com/sebastianbergmann/phpunit/issues/6059): `containsOnly()` (use `containsOnlyArray()`, `containsOnlyBool()`, `containsOnlyCallable()`, `containsOnlyFloat()`, `containsOnlyInt()`, `containsOnlyIterable()`, `containsOnlyNumeric()`, `containsOnlyObject()`, `containsOnlyResource()`, `containsOnlyClosedResource()`, `containsOnlyScalar()`, or `containsOnlyString()` instead)
354360

361+
[11.5.42]: https://github.com/sebastianbergmann/phpunit/compare/11.5.41...11.5
355362
[11.5.41]: https://github.com/sebastianbergmann/phpunit/compare/11.5.40...11.5.41
356363
[11.5.40]: https://github.com/sebastianbergmann/phpunit/compare/11.5.39...11.5.40
357364
[11.5.39]: https://github.com/sebastianbergmann/phpunit/compare/11.5.38...11.5.39

src/TextUI/ShellExitCodeCalculator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function calculate(Configuration $configuration, TestResult $result): int
2727
{
2828
$failOnDeprecation = false;
2929
$failOnPhpunitDeprecation = false;
30-
$failOnPhpunitWarning = true;
30+
$failOnPhpunitWarning = false;
3131
$failOnEmptyTestSuite = false;
3232
$failOnIncomplete = false;
3333
$failOnNotice = false;
@@ -38,7 +38,7 @@ public function calculate(Configuration $configuration, TestResult $result): int
3838
if ($configuration->failOnAllIssues()) {
3939
$failOnDeprecation = true;
4040
$failOnPhpunitDeprecation = true;
41-
$failOnPhpunitWarning = false;
41+
$failOnPhpunitWarning = true;
4242
$failOnEmptyTestSuite = true;
4343
$failOnIncomplete = true;
4444
$failOnNotice = true;
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
--TEST--
2+
https://github.com/sebastianbergmann/phpunit/issues/6368
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$_SERVER['argv'][] = '--do-not-cache-result';
6+
$_SERVER['argv'][] = '--debug';
7+
$_SERVER['argv'][] = '--configuration';
8+
$_SERVER['argv'][] = __DIR__ . '/6368/phpunit.xml';
9+
10+
require_once __DIR__ . '/../../bootstrap.php';
11+
12+
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
13+
--EXPECTF--
14+
PHPUnit Started (PHPUnit %s using %s)
15+
Test Runner Configured
16+
Event Facade Sealed
17+
Test Suite Loaded (1 test)
18+
Test Runner Started
19+
Test Suite Sorted
20+
Test Runner Execution Started (1 test)
21+
Test Suite Started (%sphpunit.xml, 1 test)
22+
Test Suite Started (default, 1 test)
23+
Test Suite Started (PHPUnit\TestFixture\Issue6368\Issue6368Test, 1 test)
24+
Test Preparation Started (PHPUnit\TestFixture\Issue6368\Issue6368Test::testOne)
25+
Test Prepared (PHPUnit\TestFixture\Issue6368\Issue6368Test::testOne)
26+
Test Runner Triggered Warning (message)
27+
Test Triggered PHPUnit Warning (PHPUnit\TestFixture\Issue6368\Issue6368Test::testOne)
28+
message
29+
Test Passed (PHPUnit\TestFixture\Issue6368\Issue6368Test::testOne)
30+
Test Finished (PHPUnit\TestFixture\Issue6368\Issue6368Test::testOne)
31+
Test Suite Finished (PHPUnit\TestFixture\Issue6368\Issue6368Test, 1 test)
32+
Test Suite Finished (default, 1 test)
33+
Test Suite Finished (%sphpunit.xml, 1 test)
34+
Test Runner Execution Finished
35+
Test Runner Finished
36+
PHPUnit Finished (Shell Exit Code: 0)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="../../../../phpunit.xsd"
4+
failOnPhpunitWarning="false"
5+
>
6+
<testsuites>
7+
<testsuite name="default">
8+
<directory>tests</directory>
9+
</testsuite>
10+
</testsuites>
11+
</phpunit>
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\Issue6368;
11+
12+
use PHPUnit\Event\Facade as EventFacade;
13+
use PHPUnit\Framework\Attributes\DoesNotPerformAssertions;
14+
use PHPUnit\Framework\TestCase;
15+
16+
final class Issue6368Test extends TestCase
17+
{
18+
#[DoesNotPerformAssertions]
19+
public function testOne(): void
20+
{
21+
EventFacade::emitter()->testRunnerTriggeredPhpunitWarning('message');
22+
EventFacade::emitter()->testTriggeredPhpunitWarning($this->valueObjectForEvents(), 'message');
23+
}
24+
}

0 commit comments

Comments
 (0)