1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 00:53:06 +00:00

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 <jrfnl@users.noreply.github.com>
Co-authored-by: Christophe Coevoet <stof@notk.org>
This commit is contained in:
Juliette 2023-08-30 11:43:12 +02:00 committed by GitHub
parent 512690dba4
commit 5af6151493
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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');