@@ -142,6 +142,11 @@ final class Configuration
142142 */
143143 private $ warmCoverageCache ;
144144
145+ /**
146+ * @var ?bool
147+ */
148+ private $ forceCoverageCache ;
149+
145150 /**
146151 * @var ?bool
147152 */
@@ -470,7 +475,7 @@ final class Configuration
470475 /**
471476 * @param null|int|string $columns
472477 */
473- public function __construct (?string $ argument , ?string $ atLeastVersion , ?bool $ backupGlobals , ?bool $ backupStaticAttributes , ?bool $ beStrictAboutChangesToGlobalState , ?bool $ beStrictAboutResourceUsageDuringSmallTests , ?string $ bootstrap , ?bool $ cacheResult , ?string $ cacheResultFile , ?bool $ checkVersion , ?string $ colors , $ columns , ?string $ configuration , ?string $ coverageClover , ?string $ coverageCrap4J , ?string $ coverageHtml , ?string $ coveragePhp , ?string $ coverageText , ?bool $ coverageTextShowUncoveredFiles , ?bool $ coverageTextShowOnlySummary , ?string $ coverageXml , ?bool $ pathCoverage , ?string $ coverageCacheDirectory , ?bool $ warmCoverageCache , ?bool $ debug , ?int $ defaultTimeLimit , ?bool $ disableCodeCoverageIgnore , ?bool $ disallowTestOutput , ?bool $ disallowTodoAnnotatedTests , ?bool $ enforceTimeLimit , ?array $ excludeGroups , ?int $ executionOrder , ?int $ executionOrderDefects , ?array $ extensions , ?array $ unavailableExtensions , ?bool $ failOnEmptyTestSuite , ?bool $ failOnIncomplete , ?bool $ failOnRisky , ?bool $ failOnSkipped , ?bool $ failOnWarning , ?string $ filter , ?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 , ?string $ loader , ?bool $ noCoverage , ?bool $ noExtensions , ?bool $ noInteraction , ?bool $ noLogging , ?string $ printer , ?bool $ processIsolation , ?int $ randomOrderSeed , ?int $ repeat , ?bool $ reportUselessTests , ?bool $ resolveDependencies , ?bool $ reverseList , ?bool $ stderr , ?bool $ strictCoverage , ?bool $ stopOnDefect , ?bool $ stopOnError , ?bool $ stopOnFailure , ?bool $ stopOnIncomplete , ?bool $ stopOnRisky , ?bool $ stopOnSkipped , ?bool $ stopOnWarning , ?string $ teamcityLogfile , ?array $ testdoxExcludeGroups , ?array $ testdoxGroups , ?string $ testdoxHtmlFile , ?string $ testdoxTextFile , ?string $ testdoxXmlFile , ?array $ testSuffixes , ?string $ testSuite , array $ unrecognizedOptions , ?string $ unrecognizedOrderBy , ?bool $ useDefaultConfiguration , ?bool $ verbose , ?bool $ version , ?array $ coverageFilter , ?string $ xdebugFilterFile )
478+ public function __construct (?string $ argument , ?string $ atLeastVersion , ?bool $ backupGlobals , ?bool $ backupStaticAttributes , ?bool $ beStrictAboutChangesToGlobalState , ?bool $ beStrictAboutResourceUsageDuringSmallTests , ?string $ bootstrap , ?bool $ cacheResult , ?string $ cacheResultFile , ?bool $ checkVersion , ?string $ colors , $ columns , ?string $ configuration , ?string $ coverageClover , ?string $ coverageCrap4J , ?string $ coverageHtml , ?string $ coveragePhp , ?string $ coverageText , ?bool $ coverageTextShowUncoveredFiles , ?bool $ coverageTextShowOnlySummary , ?string $ coverageXml , ?bool $ pathCoverage , ?string $ coverageCacheDirectory , ?bool $ warmCoverageCache , ?bool $ forceCoverageCache , ?bool $ debug , ?int $ defaultTimeLimit , ?bool $ disableCodeCoverageIgnore , ?bool $ disallowTestOutput , ?bool $ disallowTodoAnnotatedTests , ?bool $ enforceTimeLimit , ?array $ excludeGroups , ?int $ executionOrder , ?int $ executionOrderDefects , ?array $ extensions , ?array $ unavailableExtensions , ?bool $ failOnEmptyTestSuite , ?bool $ failOnIncomplete , ?bool $ failOnRisky , ?bool $ failOnSkipped , ?bool $ failOnWarning , ?string $ filter , ?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 , ?string $ loader , ?bool $ noCoverage , ?bool $ noExtensions , ?bool $ noInteraction , ?bool $ noLogging , ?string $ printer , ?bool $ processIsolation , ?int $ randomOrderSeed , ?int $ repeat , ?bool $ reportUselessTests , ?bool $ resolveDependencies , ?bool $ reverseList , ?bool $ stderr , ?bool $ strictCoverage , ?bool $ stopOnDefect , ?bool $ stopOnError , ?bool $ stopOnFailure , ?bool $ stopOnIncomplete , ?bool $ stopOnRisky , ?bool $ stopOnSkipped , ?bool $ stopOnWarning , ?string $ teamcityLogfile , ?array $ testdoxExcludeGroups , ?array $ testdoxGroups , ?string $ testdoxHtmlFile , ?string $ testdoxTextFile , ?string $ testdoxXmlFile , ?array $ testSuffixes , ?string $ testSuite , array $ unrecognizedOptions , ?string $ unrecognizedOrderBy , ?bool $ useDefaultConfiguration , ?bool $ verbose , ?bool $ version , ?array $ coverageFilter , ?string $ xdebugFilterFile )
474479 {
475480 $ this ->argument = $ argument ;
476481 $ this ->atLeastVersion = $ atLeastVersion ;
@@ -497,6 +502,7 @@ public function __construct(?string $argument, ?string $atLeastVersion, ?bool $b
497502 $ this ->pathCoverage = $ pathCoverage ;
498503 $ this ->coverageCacheDirectory = $ coverageCacheDirectory ;
499504 $ this ->warmCoverageCache = $ warmCoverageCache ;
505+ $ this ->forceCoverageCache = $ forceCoverageCache ;
500506 $ this ->debug = $ debug ;
501507 $ this ->defaultTimeLimit = $ defaultTimeLimit ;
502508 $ this ->disableCodeCoverageIgnore = $ disableCodeCoverageIgnore ;
@@ -989,6 +995,23 @@ public function warmCoverageCache(): bool
989995 return $ this ->warmCoverageCache ;
990996 }
991997
998+ public function hasForceCoverageCache (): bool
999+ {
1000+ return $ this ->forceCoverageCache !== null ;
1001+ }
1002+
1003+ /**
1004+ * @throws Exception
1005+ */
1006+ public function forceCoverageCache (): bool
1007+ {
1008+ if ($ this ->forceCoverageCache === null ) {
1009+ throw new Exception ;
1010+ }
1011+
1012+ return $ this ->forceCoverageCache ;
1013+ }
1014+
9921015 public function hasDebug (): bool
9931016 {
9941017 return $ this ->debug !== null ;
0 commit comments