Skip to content

Commit

Permalink
Exclude Symfony polyfills from php-scoper isolation.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobthecow committed Apr 17, 2021
1 parent 3413bb6 commit 80d629f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions scoper.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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
Expand Down

0 comments on commit 80d629f

Please sign in to comment.