fix: avoid passing an object when invoking static methods via reflection (#1988)

* fix: avoid passing an object when invoking static methods via reflection

PHP 8.6 deprecates passing an object to `ReflectionMethod::invoke()` for
static methods, which breaks higher-order assertions such as
`it('...')->assertTrue(true)` since `Assert::assertTrue()` is static.

* test: update visual snapshots for new reflection tests
This commit is contained in:
Owen Voke
2026-10-23 17:35:56 +01:00
committed by GitHub
parent 1b3ca5ba41
commit d534cb2c40
4 changed files with 31 additions and 3 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ test('parallel', function () use ($run): void {
$output = $run('--exclude-group=integration');
$output = implode("\n", array_slice(explode("\n", (string) $output), -10));
$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 27 skipped, 1591 passed (3458 assertions)';
$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 27 skipped, 1593 passed (3460 assertions)';
expect($output)
->toContain("Tests: {$expected}")