Skip to content

Commit

Permalink
Work around box patching ReflectionReference class name
Browse files Browse the repository at this point in the history
Fixes #610

(Actually fixes it this time)
  • Loading branch information
bobthecow committed Mar 21, 2020
1 parent b7188bd commit 8e5c7d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scoper.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ static function (string $filePath, string $prefix, string $contents): string {
},
// https://github.com/bobthecow/psysh/issues/610
static function (string $filePath, string $prefix, string $contents): string {
if ('vendor/symfony/var-dumper/Cloner/VarCloner.php' !== $filePath) {
if (!in_array($filePath, ['vendor/symfony/var-dumper/Cloner/VarCloner.php', 'vendor/symfony/var-dumper/Caster/ReflectionCaster.php'], true)) {
return $contents;
}

return str_replace(
sprintf("'%s\\\\ReflectionReference'", $prefix),
"'\\\\ReflectionReference'",
sprintf('\\%s\\ReflectionReference', $prefix),
'\\ReflectionReference',
$contents
);
},
Expand Down

0 comments on commit 8e5c7d3

Please sign in to comment.