diff --git a/Makefile b/Makefile index 260c3edc..f39b5856 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ test_%: ## it launches a test phar: ## it creates phar rm -rf ${TMP_DIR} && mkdir -p ${TMP_DIR} - cp -R src bin-stub box.json README.md composer.json phparkitect-stub.php bin ${TMP_DIR} + cp -R src bin-stub box.json README.md composer.json phparkitect-stub.php bin scoper.inc.php ${TMP_DIR} cd ${TMP_DIR} && composer install --prefer-source --no-dev -o bin/box.phar compile -c ${TMP_DIR}/box.json cp ${TMP_DIR}/phparkitect.phar . diff --git a/box.json b/box.json index fadcdf0b..8a34bcdf 100644 --- a/box.json +++ b/box.json @@ -12,11 +12,10 @@ ], "compression": "GZ", "compactors": [ + "KevinGH\\Box\\Compactor\\PhpScoper", "KevinGH\\Box\\Compactor\\Json" ], - "main": "bin-stub/phparkitect", "output": "phparkitect.phar", "datetime": "release-date", - "dump-autoload": true, "exclude-composer-files": false } \ No newline at end of file diff --git a/scoper.inc.php b/scoper.inc.php new file mode 100644 index 00000000..54fcca35 --- /dev/null +++ b/scoper.inc.php @@ -0,0 +1,16 @@ + '_PhpArkitect', + + 'expose-global-constants' => true, + 'expose-global-classes' => true, + 'expose-global-functions' => true, + + 'exclude-namespaces' => [ + 'Arkitect', + 'Composer', + ], +];