From 3c281a2323802e655a53b5bbd4d555e3a4ee1376 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Tue, 27 Jun 2023 16:14:17 +0200 Subject: [PATCH] Closes #4600 --- .psalm/baseline.xml | 25 --------- src/TextUI/Configuration/Cli/Builder.php | 16 ------ .../Configuration/Cli/Configuration.php | 54 +------------------ src/TextUI/Configuration/Merger.php | 14 +---- .../Xml/CodeCoverage/CodeCoverage.php | 31 +---------- .../Xml/DefaultConfiguration.php | 2 - src/TextUI/Configuration/Xml/Loader.php | 17 ------ src/TextUI/Configuration/Xml/PHPUnit.php | 28 +--------- tests/_files/configuration_codecoverage.xml | 3 +- .../TextUI/Configuration/Xml/LoaderTest.php | 2 - 10 files changed, 5 insertions(+), 187 deletions(-) diff --git a/.psalm/baseline.xml b/.psalm/baseline.xml index 1bb414f842b..71bfb9765b9 100644 --- a/.psalm/baseline.xml +++ b/.psalm/baseline.xml @@ -702,10 +702,6 @@ - - hasCacheResultFile - hasCoverageCacheDirectory - bool string @@ -736,17 +732,6 @@ - - cacheDirectory - cacheResultFile - cacheResultFile - coverageCacheDirectory - coverageCacheDirectory - hasCacheDirectory - hasCacheResultFile - hasCacheResultFile - hasCoverageCacheDirectory - baseline detect @@ -827,11 +812,6 @@ $variables - - - hasCacheDirectory - - getAttribute('class')]]> @@ -884,11 +864,6 @@ removeChild - - - hasCacheResultFile - - diff --git a/src/TextUI/Configuration/Cli/Builder.php b/src/TextUI/Configuration/Cli/Builder.php index 034656bf7a6..7a4bc9d7622 100644 --- a/src/TextUI/Configuration/Cli/Builder.php +++ b/src/TextUI/Configuration/Cli/Builder.php @@ -31,12 +31,10 @@ final class Builder 'cache-result', 'do-not-cache-result', 'cache-directory=', - 'cache-result-file=', 'check-version', 'colors==', 'columns=', 'configuration=', - 'coverage-cache=', 'warm-coverage-cache', 'coverage-filter=', 'coverage-clover=', @@ -151,12 +149,10 @@ public function fromParameters(array $parameters): Configuration $bootstrap = null; $cacheDirectory = null; $cacheResult = null; - $cacheResultFile = null; $checkVersion = false; $colors = null; $columns = null; $configuration = null; - $coverageCacheDirectory = null; $warmCoverageCache = false; $coverageFilter = null; $coverageClover = null; @@ -268,11 +264,6 @@ public function fromParameters(array $parameters): Configuration break; - case '--cache-result-file': - $cacheResultFile = $option[1]; - - break; - case '--columns': if (is_numeric($option[1])) { $columns = (int) $option[1]; @@ -288,11 +279,6 @@ public function fromParameters(array $parameters): Configuration break; - case '--coverage-cache': - $coverageCacheDirectory = $option[1]; - - break; - case '--warm-coverage-cache': $warmCoverageCache = true; @@ -831,7 +817,6 @@ public function fromParameters(array $parameters): Configuration $bootstrap, $cacheDirectory, $cacheResult, - $cacheResultFile, $checkVersion, $colors, $columns, @@ -846,7 +831,6 @@ public function fromParameters(array $parameters): Configuration $coverageTextShowOnlySummary, $coverageXml, $pathCoverage, - $coverageCacheDirectory, $warmCoverageCache, $defaultTimeLimit, $disableCodeCoverageIgnore, diff --git a/src/TextUI/Configuration/Cli/Configuration.php b/src/TextUI/Configuration/Cli/Configuration.php index cca980eadaa..2e99272e891 100644 --- a/src/TextUI/Configuration/Cli/Configuration.php +++ b/src/TextUI/Configuration/Cli/Configuration.php @@ -27,7 +27,6 @@ final class Configuration private readonly ?string $bootstrap; private readonly ?string $cacheDirectory; private readonly ?bool $cacheResult; - private readonly ?string $cacheResultFile; private readonly bool $checkVersion; private readonly ?string $colors; private readonly null|int|string $columns; @@ -43,7 +42,6 @@ final class Configuration private readonly ?bool $coverageTextShowOnlySummary; private readonly ?string $coverageXml; private readonly ?bool $pathCoverage; - private readonly ?string $coverageCacheDirectory; private readonly bool $warmCoverageCache; private readonly ?int $defaultTimeLimit; private readonly ?bool $disableCodeCoverageIgnore; @@ -125,7 +123,7 @@ final class Configuration * @psalm-param list $arguments * @psalm-param ?non-empty-list $testSuffixes */ - 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 $failOnDeprecation, ?bool $failOnEmptyTestSuite, ?bool $failOnIncomplete, ?bool $failOnNotice, ?bool $failOnRisky, ?bool $failOnSkipped, ?bool $failOnWarning, ?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 $displayDetailsOnIncompleteTests, ?bool $displayDetailsOnSkippedTests, ?bool $displayDetailsOnTestsThatTriggerDeprecations, ?bool $displayDetailsOnTestsThatTriggerErrors, ?bool $displayDetailsOnTestsThatTriggerNotices, ?bool $displayDetailsOnTestsThatTriggerWarnings, bool $version, ?array $coverageFilter, ?string $logEventsText, ?string $logEventsVerboseText, ?bool $printerTeamCity, ?bool $printerTestDox) + 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 $failOnDeprecation, ?bool $failOnEmptyTestSuite, ?bool $failOnIncomplete, ?bool $failOnNotice, ?bool $failOnRisky, ?bool $failOnSkipped, ?bool $failOnWarning, ?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 $displayDetailsOnIncompleteTests, ?bool $displayDetailsOnSkippedTests, ?bool $displayDetailsOnTestsThatTriggerDeprecations, ?bool $displayDetailsOnTestsThatTriggerErrors, ?bool $displayDetailsOnTestsThatTriggerNotices, ?bool $displayDetailsOnTestsThatTriggerWarnings, bool $version, ?array $coverageFilter, ?string $logEventsText, ?string $logEventsVerboseText, ?bool $printerTeamCity, ?bool $printerTestDox) { $this->arguments = $arguments; $this->atLeastVersion = $atLeastVersion; @@ -135,7 +133,6 @@ public function __construct(array $arguments, ?string $atLeastVersion, ?bool $ba $this->bootstrap = $bootstrap; $this->cacheDirectory = $cacheDirectory; $this->cacheResult = $cacheResult; - $this->cacheResultFile = $cacheResultFile; $this->checkVersion = $checkVersion; $this->colors = $colors; $this->columns = $columns; @@ -151,7 +148,6 @@ public function __construct(array $arguments, ?string $atLeastVersion, ?bool $ba $this->coverageTextShowOnlySummary = $coverageTextShowOnlySummary; $this->coverageXml = $coverageXml; $this->pathCoverage = $pathCoverage; - $this->coverageCacheDirectory = $coverageCacheDirectory; $this->warmCoverageCache = $warmCoverageCache; $this->defaultTimeLimit = $defaultTimeLimit; $this->disableCodeCoverageIgnore = $disableCodeCoverageIgnore; @@ -374,30 +370,6 @@ public function cacheResult(): bool return $this->cacheResult; } - /** - * @psalm-assert-if-true !null $this->cacheResultFile - * - * @deprecated - */ - public function hasCacheResultFile(): bool - { - return $this->cacheResultFile !== null; - } - - /** - * @throws Exception - * - * @deprecated - */ - public function cacheResultFile(): string - { - if (!$this->hasCacheResultFile()) { - throw new Exception; - } - - return $this->cacheResultFile; - } - public function checkVersion(): bool { return $this->checkVersion; @@ -683,30 +655,6 @@ public function pathCoverage(): bool return $this->pathCoverage; } - /** - * @psalm-assert-if-true !null $this->coverageCacheDirectory - * - * @deprecated - */ - public function hasCoverageCacheDirectory(): bool - { - return $this->coverageCacheDirectory !== null; - } - - /** - * @throws Exception - * - * @deprecated - */ - public function coverageCacheDirectory(): string - { - if (!$this->hasCoverageCacheDirectory()) { - throw new Exception; - } - - return $this->coverageCacheDirectory; - } - public function warmCoverageCache(): bool { return $this->warmCoverageCache; diff --git a/src/TextUI/Configuration/Merger.php b/src/TextUI/Configuration/Merger.php index 287b1916e48..ff58370f630 100644 --- a/src/TextUI/Configuration/Merger.php +++ b/src/TextUI/Configuration/Merger.php @@ -77,20 +77,8 @@ public function merge(CliConfiguration $cliConfiguration, XmlConfiguration $xmlC $testResultCacheFile = $cacheDirectory . DIRECTORY_SEPARATOR . 'test-results'; } - if ($coverageCacheDirectory === null) { - if ($cliConfiguration->hasCoverageCacheDirectory() && Filesystem::createDirectory($cliConfiguration->coverageCacheDirectory())) { - $coverageCacheDirectory = realpath($cliConfiguration->coverageCacheDirectory()); - } elseif ($xmlConfiguration->codeCoverage()->hasCacheDirectory()) { - $coverageCacheDirectory = $xmlConfiguration->codeCoverage()->cacheDirectory()->path(); - } - } - if (!isset($testResultCacheFile)) { - if ($cliConfiguration->hasCacheResultFile()) { - $testResultCacheFile = $cliConfiguration->cacheResultFile(); - } elseif ($xmlConfiguration->phpunit()->hasCacheResultFile()) { - $testResultCacheFile = $xmlConfiguration->phpunit()->cacheResultFile(); - } elseif ($xmlConfiguration->wasLoadedFromFile()) { + if ($xmlConfiguration->wasLoadedFromFile()) { $testResultCacheFile = dirname(realpath($xmlConfiguration->filename())) . DIRECTORY_SEPARATOR . '.phpunit.result.cache'; } else { $candidate = realpath($_SERVER['PHP_SELF']); diff --git a/src/TextUI/Configuration/Xml/CodeCoverage/CodeCoverage.php b/src/TextUI/Configuration/Xml/CodeCoverage/CodeCoverage.php index b38feefc731..71b5cdf1629 100644 --- a/src/TextUI/Configuration/Xml/CodeCoverage/CodeCoverage.php +++ b/src/TextUI/Configuration/Xml/CodeCoverage/CodeCoverage.php @@ -10,7 +10,6 @@ namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage; use function count; -use PHPUnit\TextUI\Configuration\Directory; use PHPUnit\TextUI\Configuration\FileCollection; use PHPUnit\TextUI\Configuration\FilterDirectoryCollection; use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Clover; @@ -29,7 +28,6 @@ */ final class CodeCoverage { - private readonly ?Directory $cacheDirectory; private readonly FilterDirectoryCollection $directories; private readonly FileCollection $files; private readonly FilterDirectoryCollection $excludeDirectories; @@ -46,9 +44,8 @@ final class CodeCoverage private readonly ?Text $text; private readonly ?Xml $xml; - public function __construct(?Directory $cacheDirectory, FilterDirectoryCollection $directories, FileCollection $files, FilterDirectoryCollection $excludeDirectories, FileCollection $excludeFiles, bool $pathCoverage, bool $includeUncoveredFiles, bool $ignoreDeprecatedCodeUnits, bool $disableCodeCoverageIgnore, ?Clover $clover, ?Cobertura $cobertura, ?Crap4j $crap4j, ?Html $html, ?Php $php, ?Text $text, ?Xml $xml) + public function __construct(FilterDirectoryCollection $directories, FileCollection $files, FilterDirectoryCollection $excludeDirectories, FileCollection $excludeFiles, bool $pathCoverage, bool $includeUncoveredFiles, bool $ignoreDeprecatedCodeUnits, bool $disableCodeCoverageIgnore, ?Clover $clover, ?Cobertura $cobertura, ?Crap4j $crap4j, ?Html $html, ?Php $php, ?Text $text, ?Xml $xml) { - $this->cacheDirectory = $cacheDirectory; $this->directories = $directories; $this->files = $files; $this->excludeDirectories = $excludeDirectories; @@ -66,32 +63,6 @@ public function __construct(?Directory $cacheDirectory, FilterDirectoryCollectio $this->xml = $xml; } - /** - * @psalm-assert-if-true !null $this->cacheDirectory - * - * @deprecated - */ - public function hasCacheDirectory(): bool - { - return $this->cacheDirectory !== null; - } - - /** - * @throws Exception - * - * @deprecated - */ - public function cacheDirectory(): Directory - { - if (!$this->hasCacheDirectory()) { - throw new Exception( - 'No cache directory has been configured', - ); - } - - return $this->cacheDirectory; - } - public function hasNonEmptyListOfFilesToBeIncludedInCodeCoverageReport(): bool { return count($this->directories) > 0 || count($this->files) > 0; diff --git a/src/TextUI/Configuration/Xml/DefaultConfiguration.php b/src/TextUI/Configuration/Xml/DefaultConfiguration.php index 5c652e95b32..1ffe952bfec 100644 --- a/src/TextUI/Configuration/Xml/DefaultConfiguration.php +++ b/src/TextUI/Configuration/Xml/DefaultConfiguration.php @@ -54,7 +54,6 @@ public static function create(): self false, ), new CodeCoverage( - null, CodeCoverageFilterDirectoryCollection::fromArray([]), FileCollection::fromArray([]), CodeCoverageFilterDirectoryCollection::fromArray([]), @@ -97,7 +96,6 @@ public static function create(): self new PHPUnit( null, true, - null, 80, \PHPUnit\TextUI\Configuration\Configuration::COLOR_DEFAULT, false, diff --git a/src/TextUI/Configuration/Xml/Loader.php b/src/TextUI/Configuration/Xml/Loader.php index 2c219292fb5..7a191447cc4 100644 --- a/src/TextUI/Configuration/Xml/Loader.php +++ b/src/TextUI/Configuration/Xml/Loader.php @@ -299,7 +299,6 @@ private function source(string $filename, DOMXPath $xpath): Source private function codeCoverage(string $filename, DOMXPath $xpath): CodeCoverage { - $cacheDirectory = null; $pathCoverage = false; $includeUncoveredFiles = true; $ignoreDeprecatedCodeUnits = false; @@ -308,14 +307,6 @@ private function codeCoverage(string $filename, DOMXPath $xpath): CodeCoverage $element = $this->element($xpath, 'coverage'); if ($element) { - $cacheDirectory = $this->getStringAttribute($element, 'cacheDirectory'); - - if ($cacheDirectory !== null) { - $cacheDirectory = new Directory( - $this->toAbsolutePath($filename, $cacheDirectory), - ); - } - $pathCoverage = $this->getBooleanAttribute( $element, 'pathCoverage', @@ -454,7 +445,6 @@ private function codeCoverage(string $filename, DOMXPath $xpath): CodeCoverage } return new CodeCoverage( - $cacheDirectory, $this->readFilterDirectories($filename, $xpath, 'coverage/include/directory'), $this->readFilterFiles($filename, $xpath, 'coverage/include/file'), $this->readFilterDirectories($filename, $xpath, 'coverage/exclude/directory'), @@ -741,12 +731,6 @@ private function phpunit(string $filename, DOMDocument $document): PHPUnit $cacheDirectory = $this->toAbsolutePath($filename, $cacheDirectory); } - $cacheResultFile = $this->getStringAttribute($document->documentElement, 'cacheResultFile'); - - if ($cacheResultFile !== null) { - $cacheResultFile = $this->toAbsolutePath($filename, $cacheResultFile); - } - $bootstrap = $this->getStringAttribute($document->documentElement, 'bootstrap'); if ($bootstrap !== null) { @@ -786,7 +770,6 @@ private function phpunit(string $filename, DOMDocument $document): PHPUnit return new PHPUnit( $cacheDirectory, $this->getBooleanAttribute($document->documentElement, 'cacheResult', true), - $cacheResultFile, $this->getColumns($document), $this->getColors($document), $this->getBooleanAttribute($document->documentElement, 'stderr', false), diff --git a/src/TextUI/Configuration/Xml/PHPUnit.php b/src/TextUI/Configuration/Xml/PHPUnit.php index 6c3ddd649e3..ead80058760 100644 --- a/src/TextUI/Configuration/Xml/PHPUnit.php +++ b/src/TextUI/Configuration/Xml/PHPUnit.php @@ -18,7 +18,6 @@ final class PHPUnit { private readonly ?string $cacheDirectory; private readonly bool $cacheResult; - private readonly ?string $cacheResultFile; private readonly int|string $columns; private readonly string $colors; private readonly bool $stderr; @@ -76,11 +75,10 @@ final class PHPUnit /** * @psalm-param ?non-empty-string $extensionsDirectory */ - public function __construct(?string $cacheDirectory, bool $cacheResult, ?string $cacheResultFile, int|string $columns, string $colors, bool $stderr, bool $displayDetailsOnIncompleteTests, bool $displayDetailsOnSkippedTests, bool $displayDetailsOnTestsThatTriggerDeprecations, bool $displayDetailsOnTestsThatTriggerErrors, bool $displayDetailsOnTestsThatTriggerNotices, bool $displayDetailsOnTestsThatTriggerWarnings, bool $reverseDefectList, bool $requireCoverageMetadata, ?string $bootstrap, bool $processIsolation, bool $failOnDeprecation, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnNotice, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, bool $stopOnDefect, bool $stopOnDeprecation, bool $stopOnError, bool $stopOnFailure, bool $stopOnIncomplete, bool $stopOnNotice, bool $stopOnRisky, bool $stopOnSkipped, bool $stopOnWarning, ?string $extensionsDirectory, bool $beStrictAboutChangesToGlobalState, bool $beStrictAboutOutputDuringTests, bool $beStrictAboutTestsThatDoNotTestAnything, bool $beStrictAboutCoverageMetadata, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, ?string $defaultTestSuite, int $executionOrder, bool $resolveDependencies, bool $defectsFirst, bool $backupGlobals, bool $backupStaticProperties, bool $registerMockObjectsFromTestArgumentsRecursively, bool $testdoxPrinter, bool $controlGarbageCollector, int $numberOfTestsBeforeGarbageCollection) + public function __construct(?string $cacheDirectory, bool $cacheResult, int|string $columns, string $colors, bool $stderr, bool $displayDetailsOnIncompleteTests, bool $displayDetailsOnSkippedTests, bool $displayDetailsOnTestsThatTriggerDeprecations, bool $displayDetailsOnTestsThatTriggerErrors, bool $displayDetailsOnTestsThatTriggerNotices, bool $displayDetailsOnTestsThatTriggerWarnings, bool $reverseDefectList, bool $requireCoverageMetadata, ?string $bootstrap, bool $processIsolation, bool $failOnDeprecation, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnNotice, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, bool $stopOnDefect, bool $stopOnDeprecation, bool $stopOnError, bool $stopOnFailure, bool $stopOnIncomplete, bool $stopOnNotice, bool $stopOnRisky, bool $stopOnSkipped, bool $stopOnWarning, ?string $extensionsDirectory, bool $beStrictAboutChangesToGlobalState, bool $beStrictAboutOutputDuringTests, bool $beStrictAboutTestsThatDoNotTestAnything, bool $beStrictAboutCoverageMetadata, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, ?string $defaultTestSuite, int $executionOrder, bool $resolveDependencies, bool $defectsFirst, bool $backupGlobals, bool $backupStaticProperties, bool $registerMockObjectsFromTestArgumentsRecursively, bool $testdoxPrinter, bool $controlGarbageCollector, int $numberOfTestsBeforeGarbageCollection) { $this->cacheDirectory = $cacheDirectory; $this->cacheResult = $cacheResult; - $this->cacheResultFile = $cacheResultFile; $this->columns = $columns; $this->colors = $colors; $this->stderr = $stderr; @@ -157,30 +155,6 @@ public function cacheResult(): bool return $this->cacheResult; } - /** - * @psalm-assert-if-true !null $this->cacheResultFile - * - * @deprecated - */ - public function hasCacheResultFile(): bool - { - return $this->cacheResultFile !== null; - } - - /** - * @throws Exception - * - * @deprecated - */ - public function cacheResultFile(): string - { - if (!$this->hasCacheResultFile()) { - throw new Exception('Cache result file is not configured'); - } - - return $this->cacheResultFile; - } - public function columns(): int|string { return $this->columns; diff --git a/tests/_files/configuration_codecoverage.xml b/tests/_files/configuration_codecoverage.xml index 5b9cb80971b..d0e16b78a77 100644 --- a/tests/_files/configuration_codecoverage.xml +++ b/tests/_files/configuration_codecoverage.xml @@ -16,8 +16,7 @@ - diff --git a/tests/unit/TextUI/Configuration/Xml/LoaderTest.php b/tests/unit/TextUI/Configuration/Xml/LoaderTest.php index 6878a49f67a..ada5399a6a6 100644 --- a/tests/unit/TextUI/Configuration/Xml/LoaderTest.php +++ b/tests/unit/TextUI/Configuration/Xml/LoaderTest.php @@ -169,8 +169,6 @@ public function testCodeCoverageConfigurationIsReadCorrectly(): void { $codeCoverage = $this->configuration('configuration_codecoverage.xml')->codeCoverage(); - $this->assertSame('/tmp/cache', $codeCoverage->cacheDirectory()->path()); - $this->assertTrue($codeCoverage->pathCoverage()); $this->assertTrue($codeCoverage->includeUncoveredFiles()); $this->assertTrue($codeCoverage->ignoreDeprecatedCodeUnits());