diff --git a/scoper.inc.php b/scoper.inc.php index 7a364fd2..265873b5 100644 --- a/scoper.inc.php +++ b/scoper.inc.php @@ -9,9 +9,17 @@ * file that was distributed with this source code. */ +use Isolated\Symfony\Component\Finder\Finder; + +$polyfillsBootstrap = Finder::create() + ->files() + ->in(__DIR__.'/vendor/symfony/polyfill-*') + ->name('bootstrap.php'); + return [ 'whitelist' => [ 'Psy\*', + 'Symfony\Polyfill\*', // Old Hoa global functions 'from', @@ -21,6 +29,13 @@ 'curry_ref', ], + 'files-whitelist' => \array_map( + static function ($file) { + return $file->getPathName(); + }, + \iterator_to_array($polyfillsBootstrap) + ), + 'patchers' => [ // Un-patch overly enthusiastic internal constant patching. // https://github.com/humbug/php-scoper/issues/356