Quoting myself from #1092 (comment):
use PropertyHookType; in Generator.php is [...] transformed into use PHPUnitPHAR\PropertyHookType;.
The above seems to happen because PHP-Scoper 0.18.15 comes with version v2024.2 of the jetbrains/phpstorm-stubs which does not know about classes such as PropertyHookType that were introduced in PHP 8.4. The first version of jetbrains/phpstorm-stubs to support PHP 8.4 is v2024.3.