Skip to content

Commit 7e93396

Browse files
Merge branch '11.5'
2 parents d3dfe6d + be95ab9 commit 7e93396

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/Framework/Assert/Functions.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,16 +275,19 @@ function assertNotContainsEquals(mixed $needle, iterable $haystack, string $mess
275275
/**
276276
* Asserts that a haystack contains only values of a given type.
277277
*
278-
* @param iterable<mixed> $haystack
278+
* @param 'array'|'bool'|'boolean'|'callable'|'double'|'float'|'int'|'integer'|'iterable'|'null'|'numeric'|'object'|'real'|'resource (closed)'|'resource'|'scalar'|'string' $type
279+
* @param iterable<mixed> $haystack
279280
*
280281
* @throws Exception
281282
* @throws ExpectationFailedException
282283
*
284+
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/6056
285+
*
283286
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
284287
*
285288
* @see Assert::assertContainsOnly
286289
*/
287-
function assertContainsOnly(NativeType $type, iterable $haystack, string $message = ''): void
290+
function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void
288291
{
289292
Assert::assertContainsOnly(...func_get_args());
290293
}
@@ -530,16 +533,19 @@ function assertContainsOnlyInstancesOf(string $className, iterable $haystack, st
530533
/**
531534
* Asserts that a haystack does not contain only values of a given type.
532535
*
533-
* @param iterable<mixed> $haystack
536+
* @param 'array'|'bool'|'boolean'|'callable'|'double'|'float'|'int'|'integer'|'iterable'|'null'|'numeric'|'object'|'real'|'resource (closed)'|'resource'|'scalar'|'string' $type
537+
* @param iterable<mixed> $haystack
534538
*
535539
* @throws Exception
536540
* @throws ExpectationFailedException
537541
*
542+
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/6056
543+
*
538544
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
539545
*
540546
* @see Assert::assertNotContainsOnly
541547
*/
542-
function assertNotContainsOnly(NativeType $type, iterable $haystack, string $message = ''): void
548+
function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void
543549
{
544550
Assert::assertNotContainsOnly(...func_get_args());
545551
}

0 commit comments

Comments
 (0)