Skip to content

Commit 24b58d4

Browse files
Fix deprecation message
1 parent 9912c83 commit 24b58d4

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

ChangeLog-12.0.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

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

5+
## [12.0.1] - 2025-02-07
6+
7+
### Fixed
8+
9+
* Deprecation message for `Assert::isType()`, `assertContainsOnly()`, `assertNotContainsOnly()`, and `containsOnly()`
10+
511
## [12.0.0] - 2025-02-07
612

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

57+
[12.0.1]: https://github.com/sebastianbergmann/phpunit/compare/12.0.0...12.0.1
5158
[12.0.0]: https://github.com/sebastianbergmann/phpunit/compare/11.5...12.0.0

src/Framework/Assert.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ final public static function assertContainsOnly(string $type, iterable $haystack
306306
EventFacade::emitter()->testTriggeredPhpunitDeprecation(
307307
null,
308308
sprintf(
309-
'assertContainsOnly() is deprecated and will be removed in PHPUnit 12. ' .
309+
'assertContainsOnly() is deprecated and will be removed in PHPUnit 13. ' .
310310
'Please use %s($haystack) instead of assertContainsOnly(\'%s\', $haystack).',
311311
$replacement,
312312
$type,
@@ -318,7 +318,7 @@ final public static function assertContainsOnly(string $type, iterable $haystack
318318
EventFacade::emitter()->testTriggeredPhpunitDeprecation(
319319
null,
320320
sprintf(
321-
'assertContainsOnly() is deprecated and will be removed in PHPUnit 12. ' .
321+
'assertContainsOnly() is deprecated and will be removed in PHPUnit 13. ' .
322322
'Please use assertContainsOnlyInstancesOf(\'%s\', $haystack) instead of assertContainsOnly(\'%s\', $haystack).',
323323
$type,
324324
$type,
@@ -625,7 +625,7 @@ final public static function assertNotContainsOnly(string $type, iterable $hayst
625625
EventFacade::emitter()->testTriggeredPhpunitDeprecation(
626626
null,
627627
sprintf(
628-
'assertNotContainsOnly() is deprecated and will be removed in PHPUnit 12. ' .
628+
'assertNotContainsOnly() is deprecated and will be removed in PHPUnit 13. ' .
629629
'Please use %s($haystack) instead of assertNotContainsOnly(\'%s\', $haystack).',
630630
$replacement,
631631
$type,
@@ -637,7 +637,7 @@ final public static function assertNotContainsOnly(string $type, iterable $hayst
637637
EventFacade::emitter()->testTriggeredPhpunitDeprecation(
638638
null,
639639
sprintf(
640-
'assertNotContainsOnly() is deprecated and will be removed in PHPUnit 12. ' .
640+
'assertNotContainsOnly() is deprecated and will be removed in PHPUnit 13. ' .
641641
'Please use assertContainsNotOnlyInstancesOf(\'%s\', $haystack) instead of assertNotContainsOnly(\'%s\', $haystack).',
642642
$type,
643643
$type,
@@ -3063,7 +3063,7 @@ final public static function isType(string $type): IsType
30633063
EventFacade::emitter()->testTriggeredPhpunitDeprecation(
30643064
null,
30653065
sprintf(
3066-
'isType(\'%s\') is deprecated and will be removed in PHPUnit 12. ' .
3066+
'isType(\'%s\') is deprecated and will be removed in PHPUnit 13. ' .
30673067
'Please use the %s() method instead.',
30683068
$type,
30693069
$replacement,

src/Runner/Version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static function id(): string
3434
}
3535

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

4040
return self::$version;

0 commit comments

Comments
 (0)