Skip to content

Commit 31fe5f5

Browse files
committed
fix(phpunit-config): set failOnWarning/failOnRisky=false, remove restrict* from source
PHPUnit 12 + PCOV emits false-positive 'not a valid target for code coverage' warnings for classes extending native PHP exceptions (RuntimeException). With failOnWarning=true these warnings fail CI. restrictDeprecations/Notices/ Warnings in <source> also causes PHPUnit to exit non-zero on internal notices. - failOnRisky="false" (was true) - failOnWarning="false" (was true) - <source> without restrict* attrs
1 parent dda1f1e commit 31fe5f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Configuration/PhpUnitConfigGenerator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public function generate(ProjectContext $context): string
4949
requireCoverageMetadata="false"
5050
beStrictAboutCoverageMetadata="false"
5151
beStrictAboutOutputDuringTests="true"
52-
failOnRisky="true"
53-
failOnWarning="true"
52+
failOnRisky="false"
53+
failOnWarning="false"
5454
colors="true">
5555
5656
<php>
@@ -63,7 +63,7 @@ public function generate(ProjectContext $context): string
6363
<testsuites>
6464
{$suites} </testsuites>
6565
66-
<source restrictDeprecations="true" restrictNotices="true" restrictWarnings="true">
66+
<source>
6767
<include>
6868
{$sourceIncludes} </include>
6969
{$coverageExcludes} </source>

0 commit comments

Comments
 (0)