@spriebsch just informed me that the phpunit.phar for PHPUnit 10.5 (and likely other recently built PHARs) has an @internal annotation in the doc-comment for PHPUnit\Framework\TestCase (and likely in the doc-comment for other classes that are part of PHPUnit's public API).
The only explanation I can think of right now would be a regression in PHP-Scoper.
CC @theofidry