@@ -57,6 +57,7 @@ final class Configuration
57
57
private readonly ?bool $ failOnAllIssues ;
58
58
private readonly ?bool $ failOnDeprecation ;
59
59
private readonly ?bool $ failOnPhpunitDeprecation ;
60
+ private readonly ?bool $ failOnPhpunitWarning ;
60
61
private readonly ?bool $ failOnEmptyTestSuite ;
61
62
private readonly ?bool $ failOnIncomplete ;
62
63
private readonly ?bool $ failOnNotice ;
@@ -65,6 +66,7 @@ final class Configuration
65
66
private readonly ?bool $ failOnWarning ;
66
67
private readonly ?bool $ doNotFailOnDeprecation ;
67
68
private readonly ?bool $ doNotFailOnPhpunitDeprecation ;
69
+ private readonly ?bool $ doNotFailOnPhpunitWarning ;
68
70
private readonly ?bool $ doNotFailOnEmptyTestSuite ;
69
71
private readonly ?bool $ doNotFailOnIncomplete ;
70
72
private readonly ?bool $ doNotFailOnNotice ;
@@ -140,7 +142,7 @@ final class Configuration
140
142
* @psalm-param list<non-empty-string> $arguments
141
143
* @psalm-param ?non-empty-list<non-empty-string> $testSuffixes
142
144
*/
143
- public function __construct (array $ arguments , ?string $ atLeastVersion , ?bool $ backupGlobals , ?bool $ backupStaticProperties , ?bool $ beStrictAboutChangesToGlobalState , ?string $ bootstrap , ?string $ cacheDirectory , ?bool $ cacheResult , ?string $ cacheResultFile , bool $ checkVersion , ?string $ colors , null |int |string $ columns , ?string $ configurationFile , ?string $ coverageClover , ?string $ coverageCobertura , ?string $ coverageCrap4J , ?string $ coverageHtml , ?string $ coveragePhp , ?string $ coverageText , ?bool $ coverageTextShowUncoveredFiles , ?bool $ coverageTextShowOnlySummary , ?string $ coverageXml , ?bool $ pathCoverage , ?string $ coverageCacheDirectory , bool $ warmCoverageCache , ?int $ defaultTimeLimit , ?bool $ disableCodeCoverageIgnore , ?bool $ disallowTestOutput , ?bool $ enforceTimeLimit , ?array $ excludeGroups , ?int $ executionOrder , ?int $ executionOrderDefects , ?bool $ failOnAllIssues , ?bool $ failOnDeprecation , ?bool $ failOnPhpunitDeprecation , ?bool $ failOnEmptyTestSuite , ?bool $ failOnIncomplete , ?bool $ failOnNotice , ?bool $ failOnRisky , ?bool $ failOnSkipped , ?bool $ failOnWarning , ?bool $ doNotFailOnDeprecation , ?bool $ doNotFailOnPhpunitDeprecation , ?bool $ doNotFailOnEmptyTestSuite , ?bool $ doNotFailOnIncomplete , ?bool $ doNotFailOnNotice , ?bool $ doNotFailOnRisky , ?bool $ doNotFailOnSkipped , ?bool $ doNotFailOnWarning , ?bool $ stopOnDefect , ?bool $ stopOnDeprecation , ?bool $ stopOnError , ?bool $ stopOnFailure , ?bool $ stopOnIncomplete , ?bool $ stopOnNotice , ?bool $ stopOnRisky , ?bool $ stopOnSkipped , ?bool $ stopOnWarning , ?string $ filter , ?string $ generateBaseline , ?string $ useBaseline , bool $ ignoreBaseline , bool $ generateConfiguration , bool $ migrateConfiguration , ?array $ groups , ?array $ testsCovering , ?array $ testsUsing , bool $ help , ?string $ includePath , ?array $ iniSettings , ?string $ junitLogfile , bool $ listGroups , bool $ listSuites , bool $ listTests , ?string $ listTestsXml , ?bool $ noCoverage , ?bool $ noExtensions , ?bool $ noOutput , ?bool $ noProgress , ?bool $ noResults , ?bool $ noLogging , ?bool $ processIsolation , ?int $ randomOrderSeed , ?bool $ reportUselessTests , ?bool $ resolveDependencies , ?bool $ reverseList , ?bool $ stderr , ?bool $ strictCoverage , ?string $ teamcityLogfile , ?string $ testdoxHtmlFile , ?string $ testdoxTextFile , ?array $ testSuffixes , ?string $ testSuite , ?string $ excludeTestSuite , bool $ useDefaultConfiguration , ?bool $ displayDetailsOnAllIssues , ?bool $ displayDetailsOnIncompleteTests , ?bool $ displayDetailsOnSkippedTests , ?bool $ displayDetailsOnTestsThatTriggerDeprecations , ?bool $ displayDetailsOnPhpunitDeprecations , ?bool $ displayDetailsOnTestsThatTriggerErrors , ?bool $ displayDetailsOnTestsThatTriggerNotices , ?bool $ displayDetailsOnTestsThatTriggerWarnings , bool $ version , ?array $ coverageFilter , ?string $ logEventsText , ?string $ logEventsVerboseText , ?bool $ printerTeamCity , ?bool $ printerTestDox , bool $ debug )
145
+ public function __construct (array $ arguments , ?string $ atLeastVersion , ?bool $ backupGlobals , ?bool $ backupStaticProperties , ?bool $ beStrictAboutChangesToGlobalState , ?string $ bootstrap , ?string $ cacheDirectory , ?bool $ cacheResult , ?string $ cacheResultFile , bool $ checkVersion , ?string $ colors , null |int |string $ columns , ?string $ configurationFile , ?string $ coverageClover , ?string $ coverageCobertura , ?string $ coverageCrap4J , ?string $ coverageHtml , ?string $ coveragePhp , ?string $ coverageText , ?bool $ coverageTextShowUncoveredFiles , ?bool $ coverageTextShowOnlySummary , ?string $ coverageXml , ?bool $ pathCoverage , ?string $ coverageCacheDirectory , bool $ warmCoverageCache , ?int $ defaultTimeLimit , ?bool $ disableCodeCoverageIgnore , ?bool $ disallowTestOutput , ?bool $ enforceTimeLimit , ?array $ excludeGroups , ?int $ executionOrder , ?int $ executionOrderDefects , ?bool $ failOnAllIssues , ?bool $ failOnDeprecation , ?bool $ failOnPhpunitDeprecation , ?bool $ failOnPhpunitWarning , ?bool $ failOnEmptyTestSuite , ?bool $ failOnIncomplete , ?bool $ failOnNotice , ?bool $ failOnRisky , ?bool $ failOnSkipped , ?bool $ failOnWarning , ?bool $ doNotFailOnDeprecation , ?bool $ doNotFailOnPhpunitDeprecation , ?bool $ doNotFailOnPhpunitWarning , ?bool $ doNotFailOnEmptyTestSuite , ?bool $ doNotFailOnIncomplete , ?bool $ doNotFailOnNotice , ?bool $ doNotFailOnRisky , ?bool $ doNotFailOnSkipped , ?bool $ doNotFailOnWarning , ?bool $ stopOnDefect , ?bool $ stopOnDeprecation , ?bool $ stopOnError , ?bool $ stopOnFailure , ?bool $ stopOnIncomplete , ?bool $ stopOnNotice , ?bool $ stopOnRisky , ?bool $ stopOnSkipped , ?bool $ stopOnWarning , ?string $ filter , ?string $ generateBaseline , ?string $ useBaseline , bool $ ignoreBaseline , bool $ generateConfiguration , bool $ migrateConfiguration , ?array $ groups , ?array $ testsCovering , ?array $ testsUsing , bool $ help , ?string $ includePath , ?array $ iniSettings , ?string $ junitLogfile , bool $ listGroups , bool $ listSuites , bool $ listTests , ?string $ listTestsXml , ?bool $ noCoverage , ?bool $ noExtensions , ?bool $ noOutput , ?bool $ noProgress , ?bool $ noResults , ?bool $ noLogging , ?bool $ processIsolation , ?int $ randomOrderSeed , ?bool $ reportUselessTests , ?bool $ resolveDependencies , ?bool $ reverseList , ?bool $ stderr , ?bool $ strictCoverage , ?string $ teamcityLogfile , ?string $ testdoxHtmlFile , ?string $ testdoxTextFile , ?array $ testSuffixes , ?string $ testSuite , ?string $ excludeTestSuite , bool $ useDefaultConfiguration , ?bool $ displayDetailsOnAllIssues , ?bool $ displayDetailsOnIncompleteTests , ?bool $ displayDetailsOnSkippedTests , ?bool $ displayDetailsOnTestsThatTriggerDeprecations , ?bool $ displayDetailsOnPhpunitDeprecations , ?bool $ displayDetailsOnTestsThatTriggerErrors , ?bool $ displayDetailsOnTestsThatTriggerNotices , ?bool $ displayDetailsOnTestsThatTriggerWarnings , bool $ version , ?array $ coverageFilter , ?string $ logEventsText , ?string $ logEventsVerboseText , ?bool $ printerTeamCity , ?bool $ printerTestDox , bool $ debug )
144
146
{
145
147
$ this ->arguments = $ arguments ;
146
148
$ this ->atLeastVersion = $ atLeastVersion ;
@@ -178,6 +180,7 @@ public function __construct(array $arguments, ?string $atLeastVersion, ?bool $ba
178
180
$ this ->failOnAllIssues = $ failOnAllIssues ;
179
181
$ this ->failOnDeprecation = $ failOnDeprecation ;
180
182
$ this ->failOnPhpunitDeprecation = $ failOnPhpunitDeprecation ;
183
+ $ this ->failOnPhpunitWarning = $ failOnPhpunitWarning ;
181
184
$ this ->failOnEmptyTestSuite = $ failOnEmptyTestSuite ;
182
185
$ this ->failOnIncomplete = $ failOnIncomplete ;
183
186
$ this ->failOnNotice = $ failOnNotice ;
@@ -186,6 +189,7 @@ public function __construct(array $arguments, ?string $atLeastVersion, ?bool $ba
186
189
$ this ->failOnWarning = $ failOnWarning ;
187
190
$ this ->doNotFailOnDeprecation = $ doNotFailOnDeprecation ;
188
191
$ this ->doNotFailOnPhpunitDeprecation = $ doNotFailOnPhpunitDeprecation ;
192
+ $ this ->doNotFailOnPhpunitWarning = $ doNotFailOnPhpunitWarning ;
189
193
$ this ->doNotFailOnEmptyTestSuite = $ doNotFailOnEmptyTestSuite ;
190
194
$ this ->doNotFailOnIncomplete = $ doNotFailOnIncomplete ;
191
195
$ this ->doNotFailOnNotice = $ doNotFailOnNotice ;
@@ -940,6 +944,26 @@ public function failOnPhpunitDeprecation(): bool
940
944
return $ this ->failOnPhpunitDeprecation ;
941
945
}
942
946
947
+ /**
948
+ * @psalm-assert-if-true !null $this->failOnPhpunitWarning
949
+ */
950
+ public function hasFailOnPhpunitWarning (): bool
951
+ {
952
+ return $ this ->failOnPhpunitWarning !== null ;
953
+ }
954
+
955
+ /**
956
+ * @throws Exception
957
+ */
958
+ public function failOnPhpunitWarning (): bool
959
+ {
960
+ if (!$ this ->hasFailOnPhpunitWarning ()) {
961
+ throw new Exception ;
962
+ }
963
+
964
+ return $ this ->failOnPhpunitWarning ;
965
+ }
966
+
943
967
/**
944
968
* @psalm-assert-if-true !null $this->failOnEmptyTestSuite
945
969
*/
@@ -1100,6 +1124,26 @@ public function doNotFailOnPhpunitDeprecation(): bool
1100
1124
return $ this ->doNotFailOnPhpunitDeprecation ;
1101
1125
}
1102
1126
1127
+ /**
1128
+ * @psalm-assert-if-true !null $this->doNotFailOnPhpunitWarning
1129
+ */
1130
+ public function hasDoNotFailOnPhpunitWarning (): bool
1131
+ {
1132
+ return $ this ->doNotFailOnPhpunitWarning !== null ;
1133
+ }
1134
+
1135
+ /**
1136
+ * @throws Exception
1137
+ */
1138
+ public function doNotFailOnPhpunitWarning (): bool
1139
+ {
1140
+ if (!$ this ->hasDoNotFailOnPhpunitWarning ()) {
1141
+ throw new Exception ;
1142
+ }
1143
+
1144
+ return $ this ->doNotFailOnPhpunitWarning ;
1145
+ }
1146
+
1103
1147
/**
1104
1148
* @psalm-assert-if-true !null $this->doNotFailOnEmptyTestSuite
1105
1149
*/
0 commit comments