1
0
Fork 0

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
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
1 changed files with 1 additions and 1 deletions

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