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>pull/11601/head
parent
512690dba4
commit
5af6151493
|
@ -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');
|
||||
|
||||
|
|
Loading…
Reference in New Issue