63
63
private ?bool $ failOnAllIssues ;
64
64
private ?bool $ failOnDeprecation ;
65
65
private ?bool $ failOnPhpunitDeprecation ;
66
+ private ?bool $ failOnPhpunitWarning ;
66
67
private ?bool $ failOnEmptyTestSuite ;
67
68
private ?bool $ failOnIncomplete ;
68
69
private ?bool $ failOnNotice ;
71
72
private ?bool $ failOnWarning ;
72
73
private ?bool $ doNotFailOnDeprecation ;
73
74
private ?bool $ doNotFailOnPhpunitDeprecation ;
75
+ private ?bool $ doNotFailOnPhpunitWarning ;
74
76
private ?bool $ doNotFailOnEmptyTestSuite ;
75
77
private ?bool $ doNotFailOnIncomplete ;
76
78
private ?bool $ doNotFailOnNotice ;
184
186
* @param ?non-empty-list<non-empty-string> $coverageFilter
185
187
* @param ?non-empty-list<non-empty-string> $extensions
186
188
*/
187
- public function __construct (array $ arguments , ?string $ atLeastVersion , ?bool $ backupGlobals , ?bool $ backupStaticProperties , ?bool $ beStrictAboutChangesToGlobalState , ?string $ bootstrap , ?string $ cacheDirectory , ?bool $ cacheResult , 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 , 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 , ?string $ specificDeprecationToStopOn , ?bool $ stopOnError , ?bool $ stopOnFailure , ?bool $ stopOnIncomplete , ?bool $ stopOnNotice , ?bool $ stopOnRisky , ?bool $ stopOnSkipped , ?bool $ stopOnWarning , ?string $ filter , ?string $ excludeFilter , ?string $ generateBaseline , ?string $ useBaseline , bool $ ignoreBaseline , bool $ generateConfiguration , bool $ migrateConfiguration , ?array $ groups , ?array $ testsCovering , ?array $ testsUsing , ?array $ testsRequiringPhpExtension , bool $ help , ?string $ includePath , ?array $ iniSettings , ?string $ junitLogfile , bool $ listGroups , bool $ listSuites , bool $ listTestFiles , 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 $ testdoxPrinter , ?bool $ testdoxPrinterSummary , bool $ debug , ?array $ extensions )
189
+ public function __construct (array $ arguments , ?string $ atLeastVersion , ?bool $ backupGlobals , ?bool $ backupStaticProperties , ?bool $ beStrictAboutChangesToGlobalState , ?string $ bootstrap , ?string $ cacheDirectory , ?bool $ cacheResult , 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 , 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 , ?string $ specificDeprecationToStopOn , ?bool $ stopOnError , ?bool $ stopOnFailure , ?bool $ stopOnIncomplete , ?bool $ stopOnNotice , ?bool $ stopOnRisky , ?bool $ stopOnSkipped , ?bool $ stopOnWarning , ?string $ filter , ?string $ excludeFilter , ?string $ generateBaseline , ?string $ useBaseline , bool $ ignoreBaseline , bool $ generateConfiguration , bool $ migrateConfiguration , ?array $ groups , ?array $ testsCovering , ?array $ testsUsing , ?array $ testsRequiringPhpExtension , bool $ help , ?string $ includePath , ?array $ iniSettings , ?string $ junitLogfile , bool $ listGroups , bool $ listSuites , bool $ listTestFiles , 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 $ testdoxPrinter , ?bool $ testdoxPrinterSummary , bool $ debug , ?array $ extensions )
188
190
{
189
191
$ this ->arguments = $ arguments ;
190
192
$ this ->atLeastVersion = $ atLeastVersion ;
@@ -220,6 +222,7 @@ public function __construct(array $arguments, ?string $atLeastVersion, ?bool $ba
220
222
$ this ->failOnAllIssues = $ failOnAllIssues ;
221
223
$ this ->failOnDeprecation = $ failOnDeprecation ;
222
224
$ this ->failOnPhpunitDeprecation = $ failOnPhpunitDeprecation ;
225
+ $ this ->failOnPhpunitWarning = $ failOnPhpunitWarning ;
223
226
$ this ->failOnEmptyTestSuite = $ failOnEmptyTestSuite ;
224
227
$ this ->failOnIncomplete = $ failOnIncomplete ;
225
228
$ this ->failOnNotice = $ failOnNotice ;
@@ -228,6 +231,7 @@ public function __construct(array $arguments, ?string $atLeastVersion, ?bool $ba
228
231
$ this ->failOnWarning = $ failOnWarning ;
229
232
$ this ->doNotFailOnDeprecation = $ doNotFailOnDeprecation ;
230
233
$ this ->doNotFailOnPhpunitDeprecation = $ doNotFailOnPhpunitDeprecation ;
234
+ $ this ->doNotFailOnPhpunitWarning = $ doNotFailOnPhpunitWarning ;
231
235
$ this ->doNotFailOnEmptyTestSuite = $ doNotFailOnEmptyTestSuite ;
232
236
$ this ->doNotFailOnIncomplete = $ doNotFailOnIncomplete ;
233
237
$ this ->doNotFailOnNotice = $ doNotFailOnNotice ;
@@ -944,6 +948,26 @@ public function failOnPhpunitDeprecation(): bool
944
948
return $ this ->failOnPhpunitDeprecation ;
945
949
}
946
950
951
+ /**
952
+ * @phpstan-assert-if-true !null $this->failOnPhpunitWarning
953
+ */
954
+ public function hasFailOnPhpunitWarning (): bool
955
+ {
956
+ return $ this ->failOnPhpunitWarning !== null ;
957
+ }
958
+
959
+ /**
960
+ * @throws Exception
961
+ */
962
+ public function failOnPhpunitWarning (): bool
963
+ {
964
+ if (!$ this ->hasFailOnPhpunitWarning ()) {
965
+ throw new Exception ;
966
+ }
967
+
968
+ return $ this ->failOnPhpunitWarning ;
969
+ }
970
+
947
971
/**
948
972
* @phpstan-assert-if-true !null $this->failOnEmptyTestSuite
949
973
*/
@@ -1104,6 +1128,26 @@ public function doNotFailOnPhpunitDeprecation(): bool
1104
1128
return $ this ->doNotFailOnPhpunitDeprecation ;
1105
1129
}
1106
1130
1131
+ /**
1132
+ * @phpstan-assert-if-true !null $this->doNotFailOnPhpunitWarning
1133
+ */
1134
+ public function hasDoNotFailOnPhpunitWarning (): bool
1135
+ {
1136
+ return $ this ->doNotFailOnPhpunitWarning !== null ;
1137
+ }
1138
+
1139
+ /**
1140
+ * @throws Exception
1141
+ */
1142
+ public function doNotFailOnPhpunitWarning (): bool
1143
+ {
1144
+ if (!$ this ->hasDoNotFailOnPhpunitWarning ()) {
1145
+ throw new Exception ;
1146
+ }
1147
+
1148
+ return $ this ->doNotFailOnPhpunitWarning ;
1149
+ }
1150
+
1107
1151
/**
1108
1152
* @phpstan-assert-if-true !null $this->doNotFailOnEmptyTestSuite
1109
1153
*/
0 commit comments