Skip to content

Commit c9caa88

Browse files
Deprecate methods that are no longer used by PHPUnit
1 parent 620e201 commit c9caa88

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

.psalm/baseline.xml

+3
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
</UndefinedConstant>
5656
</file>
5757
<file src="src/Filter.php">
58+
<DeprecatedMethod>
59+
<code>excludeFile</code>
60+
</DeprecatedMethod>
5861
<InvalidDocblockParamName>
5962
<code>$files</code>
6063
</InvalidDocblockParamName>

ChangeLog-10.1.md

+4
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt
88

99
* [#982](https://github.com/sebastianbergmann/php-code-coverage/issues/982): Add option to ignore lines from code coverage
1010

11+
### Deprecated
12+
13+
* The `SebastianBergmann\CodeCoverage\Filter::includeDirectory()`, `SebastianBergmann\CodeCoverage\Filter::excludeDirectory()`, and `SebastianBergmann\CodeCoverage\Filter::excludeFile()` methods are now deprecated
14+
1115
[10.1.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.0...main

src/Filter.php

+9
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ final class Filter
2828
*/
2929
private array $isFileCache = [];
3030

31+
/**
32+
* @deprecated
33+
*/
3134
public function includeDirectory(string $directory, string $suffix = '.php', string $prefix = ''): void
3235
{
3336
foreach ((new FileIteratorFacade)->getFilesAsArray($directory, $suffix, $prefix) as $file) {
@@ -56,13 +59,19 @@ public function includeFile(string $filename): void
5659
$this->files[$filename] = true;
5760
}
5861

62+
/**
63+
* @deprecated
64+
*/
5965
public function excludeDirectory(string $directory, string $suffix = '.php', string $prefix = ''): void
6066
{
6167
foreach ((new FileIteratorFacade)->getFilesAsArray($directory, $suffix, $prefix) as $file) {
6268
$this->excludeFile($file);
6369
}
6470
}
6571

72+
/**
73+
* @deprecated
74+
*/
6675
public function excludeFile(string $filename): void
6776
{
6877
$filename = realpath($filename);

0 commit comments

Comments
 (0)