Skip to content

Commit

Permalink
Fix deprecation message
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Feb 7, 2025
1 parent 9912c83 commit 24b58d4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions ChangeLog-12.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes of the PHPUnit 12.0 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.

## [12.0.1] - 2025-02-07

### Fixed

* Deprecation message for `Assert::isType()`, `assertContainsOnly()`, `assertNotContainsOnly()`, and `containsOnly()`

## [12.0.0] - 2025-02-07

### Added
Expand Down Expand Up @@ -48,4 +54,5 @@ All notable changes of the PHPUnit 12.0 release series are documented in this fi
* [#5801](https://github.com/sebastianbergmann/phpunit/issues/5801): Support for targeting traits with `#[CoversClass]` and `#[UsesClass]` attributes
* [#5978](https://github.com/sebastianbergmann/phpunit/issues/5978): Support for PHP 8.2

[12.0.1]: https://github.com/sebastianbergmann/phpunit/compare/12.0.0...12.0.1
[12.0.0]: https://github.com/sebastianbergmann/phpunit/compare/11.5...12.0.0
10 changes: 5 additions & 5 deletions src/Framework/Assert.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ final public static function assertContainsOnly(string $type, iterable $haystack
EventFacade::emitter()->testTriggeredPhpunitDeprecation(
null,
sprintf(
'assertContainsOnly() is deprecated and will be removed in PHPUnit 12. ' .
'assertContainsOnly() is deprecated and will be removed in PHPUnit 13. ' .
'Please use %s($haystack) instead of assertContainsOnly(\'%s\', $haystack).',
$replacement,
$type,
Expand All @@ -318,7 +318,7 @@ final public static function assertContainsOnly(string $type, iterable $haystack
EventFacade::emitter()->testTriggeredPhpunitDeprecation(
null,
sprintf(
'assertContainsOnly() is deprecated and will be removed in PHPUnit 12. ' .
'assertContainsOnly() is deprecated and will be removed in PHPUnit 13. ' .
'Please use assertContainsOnlyInstancesOf(\'%s\', $haystack) instead of assertContainsOnly(\'%s\', $haystack).',
$type,
$type,
Expand Down Expand Up @@ -625,7 +625,7 @@ final public static function assertNotContainsOnly(string $type, iterable $hayst
EventFacade::emitter()->testTriggeredPhpunitDeprecation(
null,
sprintf(
'assertNotContainsOnly() is deprecated and will be removed in PHPUnit 12. ' .
'assertNotContainsOnly() is deprecated and will be removed in PHPUnit 13. ' .
'Please use %s($haystack) instead of assertNotContainsOnly(\'%s\', $haystack).',
$replacement,
$type,
Expand All @@ -637,7 +637,7 @@ final public static function assertNotContainsOnly(string $type, iterable $hayst
EventFacade::emitter()->testTriggeredPhpunitDeprecation(
null,
sprintf(
'assertNotContainsOnly() is deprecated and will be removed in PHPUnit 12. ' .
'assertNotContainsOnly() is deprecated and will be removed in PHPUnit 13. ' .
'Please use assertContainsNotOnlyInstancesOf(\'%s\', $haystack) instead of assertNotContainsOnly(\'%s\', $haystack).',
$type,
$type,
Expand Down Expand Up @@ -3063,7 +3063,7 @@ final public static function isType(string $type): IsType
EventFacade::emitter()->testTriggeredPhpunitDeprecation(
null,
sprintf(
'isType(\'%s\') is deprecated and will be removed in PHPUnit 12. ' .
'isType(\'%s\') is deprecated and will be removed in PHPUnit 13. ' .
'Please use the %s() method instead.',
$type,
$replacement,
Expand Down
2 changes: 1 addition & 1 deletion src/Runner/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static function id(): string
}

if (self::$version === '') {
self::$version = (new VersionId('12.0.0', dirname(__DIR__, 2)))->asString();
self::$version = (new VersionId('12.0.1', dirname(__DIR__, 2)))->asString();
}

return self::$version;
Expand Down

0 comments on commit 24b58d4

Please sign in to comment.