diff --git a/.gitignore b/.gitignore index fab34be3..550031fe 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,6 @@ composer.lock ## Infection infection.log infection.html + +## Box +bin/twig-cs-fixer.phar diff --git a/box.json.dist b/box.json.dist index 7cf79386..f9cb20fc 100644 --- a/box.json.dist +++ b/box.json.dist @@ -1,3 +1,8 @@ { - "compression": "GZ" + "compression": "GZ", + "compactors": [ + "KevinGH\\Box\\Compactor\\Php", + "KevinGH\\Box\\Compactor\\PhpScoper", + "KevinGH\\Box\\Compactor\\Json" + ] } diff --git a/rector.php b/rector.php index f6e2bef9..e28f7a8a 100644 --- a/rector.php +++ b/rector.php @@ -14,6 +14,7 @@ __DIR__.'/tests', __DIR__.'/.php-cs-fixer.php', __DIR__.'/rector.php', + __DIR__.'/scoper.inc.php', ]); $rectorConfig->sets([ diff --git a/scoper.inc.php b/scoper.inc.php new file mode 100644 index 00000000..4257416e --- /dev/null +++ b/scoper.inc.php @@ -0,0 +1,28 @@ + ['TwigCsFixer'], + 'expose-global-constants' => false, + 'expose-global-classes' => false, + 'expose-global-functions' => false, + 'expose-namespaces' => ['Twig\Node'], + 'expose-classes' => [ + OutputInterface::class, + Finder::class, + Environment::class, + ExtensionInterface::class, + NodeVisitorInterface::class, + Source::class, + TokenParserInterface::class, + ], +];