diff --git a/Makefile b/Makefile index a918118..c255e0a 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ prepare: php $(BUILD_DIR)/fix-some-stuff-in-composer.php composer --working-dir='$(BUILD_DIR)' config platform.php '$(PHP)' composer install --working-dir='$(BUILD_DIR)' --no-scripts --no-plugins --no-dev --no-interaction --optimize-autoloader - ./vendor/bin/box compile --working-dir='$(BUILD_DIR)' + php -d error_reporting='(E_ALL & ~E_DEPRECATED)' ./vendor/bin/box compile --working-dir='$(BUILD_DIR)' -vvv # Copy composer plugin cp '$(BUILD_DIR)/src/Composer/GrumPHPPlugin.php' '$(ROOT_DIR)/src/Composer/GrumPHPPlugin.php' # All good : lets finish up diff --git a/build/scoper.inc.php b/build/scoper.inc.php index ff62b9c..4e1335c 100644 --- a/build/scoper.inc.php +++ b/build/scoper.inc.php @@ -27,15 +27,22 @@ ); return [ - 'whitelist' => [ - 'GrumPHP\*', - 'PhpParser\*', - 'Composer\*', - 'Symfony\\Polyfill\\*', + 'exclude-namespaces' => [ + 'GrumPHP', + 'PhpParser', + 'Composer', + 'Symfony\Polyfill', ], - 'files-whitelist' => [ + 'exclude-files' => [ ...$polyfillsBootstraps, ...$polyfillsStubs ], + /* + * Expose global symbols fixes issues like `trigger_deprecation()` inside Symfony. + * These global function gets scoped, but the usage is not replaced. + */ + 'expose-global-functions' => true, + 'expose-global-classes' => true, + 'expose-global-constants' => true, 'patchers' => [] ]; diff --git a/composer.json b/composer.json index ef720ce..77f971a 100644 --- a/composer.json +++ b/composer.json @@ -23,8 +23,7 @@ "composer-plugin-api": "~2.0" }, "require-dev": { - "humbug/box": "^3.12.2", - "jetbrains/phpstorm-stubs": "dev-master@dev" + "humbug/box": "^3.16" }, "replace": { "phpro/grumphp": "self.version"