Skip to content

Commit

Permalink
Closes #5513
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Sep 16, 2023
1 parent 4449996 commit 20032ed
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .psalm/baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,13 @@
<code>trim($tmp[1])</code>
</ArgumentTypeCoercion>
</file>
<file src="src/Metadata/Parser/AttributeParser.php">
<DeprecatedClass>
<code>IgnoreClassForCodeCoverage::class</code>
<code>IgnoreFunctionForCodeCoverage::class</code>
<code>IgnoreMethodForCodeCoverage::class</code>
</DeprecatedClass>
</file>
<file src="src/Metadata/Version/Requirement.php">
<ArgumentTypeCoercion>
<code><![CDATA[!empty($matches['operator']) ? $matches['operator'] : '>=']]></code>
Expand Down
2 changes: 2 additions & 0 deletions ChangeLog-10.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ All notable changes of the PHPUnit 10.4 release series are documented in this fi
* The name of the top-level test suite that is created when a directory or file path is passed as an argument to the test runner is now `CLI Arguments`
* Simplified the failure description for `assertInstanceOf()` and `assertNotInstanceOf()`
* Simplified the failure description for `assertJson()`
* The `@codeCoverageIgnore`, `@codeCoverageIgnoreStart`, and `@codeCoverageIgnoreEnd` annotations are no longer deprecated

### Deprecated

* [#5472](https://github.com/sebastianbergmann/phpunit/issues/5472): `TestCase::assertStringNotMatchesFormat()` and `TestCase::assertStringNotMatchesFormatFile()` (these methods only have a `@deprecated` annotation for now; using these methods will trigger a deprecation warning in PHPUnit 11; these methods will be removed in PHPUnit 12)
* [#5481](https://github.com/sebastianbergmann/phpunit/issues/5481): `dataSet` attribute for `testCaseMethod` elements in the XML document generated by `--list-tests-xml` (the attribute will not be generated anymore starting with PHPUnit 11)
* [#5513](https://github.com/sebastianbergmann/phpunit/issues/5513): `IgnoreClassForCodeCoverage`, `IgnoreMethodForCodeCoverage`, and `IgnoreFunctionForCodeCoverage` attributes (these attributes will be removed in PHPUnit 11)
* `PHPUnit\TextUI\Configuration\Configuration::cliArgument()` and `PHPUnit\TextUI\Configuration\Configuration::hasCliArgument()`

[10.4.0]: https://github.com/sebastianbergmann/phpunit/compare/10.3...main
13 changes: 8 additions & 5 deletions DEPRECATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,14 @@ This functionality is currently [soft-deprecated](https://phpunit.de/backward-co

#### Miscellaneous

| Issue | Description | Since | Replacement |
|-------------------------------------------------------------------|-----------------------------------------------------|--------|-------------|
| [#5236](https://github.com/sebastianbergmann/phpunit/issues/5236) | `PHPUnit\Framework\Attributes\CodeCoverageIgnore()` | 10.1.0 | |
| [#5214](https://github.com/sebastianbergmann/phpunit/issues/5214) | `TestCase::iniSet()` | 10.3.0 | |
| [#5216](https://github.com/sebastianbergmann/phpunit/issues/5216) | `TestCase::setLocale()` | 10.3.0 | |
| Issue | Description | Since | Replacement |
|-------------------------------------------------------------------|----------------------------------------------------------------|--------|--------------------------------------------------------------------|
| [#5236](https://github.com/sebastianbergmann/phpunit/issues/5236) | `PHPUnit\Framework\Attributes\CodeCoverageIgnore()` | 10.1.0 | |
| [#5214](https://github.com/sebastianbergmann/phpunit/issues/5214) | `TestCase::iniSet()` | 10.3.0 | |
| [#5216](https://github.com/sebastianbergmann/phpunit/issues/5216) | `TestCase::setLocale()` | 10.3.0 | |
| [#5236](https://github.com/sebastianbergmann/phpunit/issues/5513) | `PHPUnit\Framework\Attributes\IgnoreClassForCodeCoverage()` | 10.4.0 | Use `@codeCoverageIgnore` annotation in the class' doc-comment |
| [#5236](https://github.com/sebastianbergmann/phpunit/issues/5513) | `PHPUnit\Framework\Attributes\IgnoreMethodForCodeCoverage()` | 10.4.0 | Use `@codeCoverageIgnore` annotation in the method's doc-comment |
| [#5236](https://github.com/sebastianbergmann/phpunit/issues/5513) | `PHPUnit\Framework\Attributes\IgnoreFunctionForCodeCoverage()` | 10.4.0 | Use `@codeCoverageIgnore` annotation in the function's doc-comment |

### Running Tests

Expand Down
2 changes: 2 additions & 0 deletions src/Framework/Attributes/IgnoreClassForCodeCoverage.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* @psalm-immutable
*
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
*
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/5513
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)]
final class IgnoreClassForCodeCoverage
Expand Down
2 changes: 2 additions & 0 deletions src/Framework/Attributes/IgnoreFunctionForCodeCoverage.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* @psalm-immutable
*
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
*
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/5513
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)]
final class IgnoreFunctionForCodeCoverage
Expand Down
2 changes: 2 additions & 0 deletions src/Framework/Attributes/IgnoreMethodForCodeCoverage.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* @psalm-immutable
*
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
*
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/5513
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)]
final class IgnoreMethodForCodeCoverage
Expand Down

0 comments on commit 20032ed

Please sign in to comment.