From 5af6151493ab2e22838204fdad4ffc7ebd094937 Mon Sep 17 00:00:00 2001 From: Juliette <663378+jrfnl@users.noreply.github.com> Date: Wed, 30 Aug 2023 11:43:12 +0200 Subject: [PATCH] PHP 8.3 | ComposerRepositoryTest: fix test failure (#11602) Prior to PHP 8.3, ReflectionMethod could set a private method on a parent class to accessible. This is no longer possible in PHP 8.3 since php/php-src 9470 and breaks the Composer\Test\Repository\ComposerRepositoryTest::testWhatProvides test. Also see: https://3v4l.org/8YcIk/rfc#vgit.master Fixed now. Co-authored-by: jrfnl Co-authored-by: Christophe Coevoet --- tests/Composer/Test/Repository/ComposerRepositoryTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Composer/Test/Repository/ComposerRepositoryTest.php b/tests/Composer/Test/Repository/ComposerRepositoryTest.php index 0806bb108..6eba1081d 100644 --- a/tests/Composer/Test/Repository/ComposerRepositoryTest.php +++ b/tests/Composer/Test/Repository/ComposerRepositoryTest.php @@ -161,7 +161,7 @@ class ComposerRepositoryTest extends TestCase ], ])); - $reflMethod = new \ReflectionMethod($repo, 'whatProvides'); + $reflMethod = new \ReflectionMethod(ComposerRepository::class, 'whatProvides'); $reflMethod->setAccessible(true); $packages = $reflMethod->invoke($repo, 'a');