You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ChangeLog-12.0.md
+1
Original file line number
Diff line number
Diff line change
@@ -36,5 +36,6 @@ All notable changes of the PHPUnit 12.0 release series are documented in this fi
36
36
*[#5959](https://github.com/sebastianbergmann/phpunit/issues/5959): Support for `#[CoversTrait]` and `#[UsesTrait]` attributes
37
37
*[#5961](https://github.com/sebastianbergmann/phpunit/issues/5961): Support for targeting trait methods with the `#[CoversMethod]` and `#[UsesMethod]` attributes
38
38
*[#5978](https://github.com/sebastianbergmann/phpunit/issues/5978): Support for PHP 8.2
39
+
*[#6047](https://github.com/sebastianbergmann/phpunit/issues/6047): Support for using `assertContainsOnly()` (and `assertNotContainsOnly()`) with classes and interfaces
'Using assertContainsOnly() with classes or interfaces is deprecated. Support for this will be removed in PHPUnit 12. Please use assertContainsOnlyInstancesOf() instead.',
285
-
);
286
-
}
287
-
288
277
self::assertThat(
289
278
$haystack,
290
-
newTraversableContainsOnly(
291
-
$type,
292
-
$isNativeType,
293
-
),
279
+
TraversableContainsOnly::forNativeType($type),
294
280
$message,
295
281
);
296
282
}
@@ -308,10 +294,7 @@ final public static function assertContainsOnlyInstancesOf(string $className, it
'Using assertNotContainsOnly() with classes or interfaces is deprecated. Support for this will be removed in PHPUnit 12. Please use assertContainsOnlyInstancesOf() instead.',
338
-
);
339
-
}
340
-
341
313
self::assertThat(
342
314
$haystack,
343
315
newLogicalNot(
344
-
newTraversableContainsOnly(
345
-
$type,
346
-
$isNativeType,
347
-
),
316
+
TraversableContainsOnly::forNativeType($type),
348
317
),
349
318
$message,
350
319
);
@@ -2223,7 +2192,7 @@ final public static function containsIdentical(mixed $value): TraversableContain
0 commit comments