diff --git a/Makefile b/Makefile index 75f57f3b..24f12b24 100644 --- a/Makefile +++ b/Makefile @@ -141,4 +141,4 @@ tools/deptrac: curl -Ls https://github.com/qossmic/deptrac/releases/download/0.18.0/deptrac.phar.asc -o tools/deptrac.asc tools/box: - curl -Ls https://github.com/humbug/box/releases/download/3.14.0/box.phar -o tools/box && chmod +x tools/box + curl -Ls https://github.com/humbug/box/releases/download/3.15.0/box.phar -o tools/box && chmod +x tools/box diff --git a/README.md b/README.md index 1cbd31a9..e295263a 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,6 @@ It has been extracted as a separate project to make maintenance easier and enabl | analyze | [Visualizes metrics and source code](https://github.com/Qafoo/QualityAnalyzer) | ✅ | ❌ | ❌ | | behat | [Helps to test business expectations](http://behat.org/) | ✅ | ✅ | ✅ | | box | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ✅ | ✅ | -| box-legacy | [Legacy version of box](https://box-project.github.io/box2/) | ✅ | ✅ | ✅ | | churn | [Discovers good candidates for refactoring](https://github.com/bmitch/churn-php) | ✅ | ✅ | ✅ | | codeception | [Codeception is a BDD-styled PHP testing framework](https://codeception.com/) | ✅ | ✅ | ✅ | | composer | [Dependency Manager for PHP](https://getcomposer.org/) | ✅ | ✅ | ✅ | @@ -43,7 +42,6 @@ It has been extracted as a separate project to make maintenance easier and enabl | phive | [PHAR Installation and Verification Environment](https://phar.io/) | ✅ | ✅ | ✅ | | php-coupling-detector | [Detects code coupling issues](https://akeneo.github.io/php-coupling-detector/) | ✅ | ✅ | ✅ | | php-cs-fixer | [PHP Coding Standards Fixer](http://cs.symfony.com/) | ✅ | ✅ | ✅ | -| php-formatter | [Custom coding standards fixer](https://github.com/mmoreram/php-formatter) | ✅ | ❌ | ❌ | | php-fuzzer | [A fuzzer for PHP, which can be used to find bugs in libraries by feeding them 'random' inputs](https://github.com/nikic/PHP-Fuzzer) | ✅ | ✅ | ✅ | | php-semver-checker | [Suggests a next version according to semantic versioning](https://github.com/tomzx/php-semver-checker) | ✅ | ✅ | ✅ | | phpa | [Checks for weak assumptions](https://github.com/rskuipers/php-assumptions) | ✅ | ✅ | ✅ | @@ -100,9 +98,11 @@ It has been extracted as a separate project to make maintenance easier and enabl | Name | Summary | | :--- | :------ | +| box-legacy | [Legacy version of box](https://box-project.github.io/box2/) | | composer-normalize | [Composer plugin to normalize composer.json files](https://github.com/localheinz/composer-normalize) | | design-pattern | [Detects design patterns](https://github.com/Halleck45/DesignPatternDetector) | | parallel-lint | [Checks PHP file syntax](https://github.com/JakubOnderka/PHP-Parallel-Lint) | +| php-formatter | [Custom coding standards fixer](https://github.com/mmoreram/php-formatter) | | phpcf | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpCodeFixer/) | | phpstan-localheinz-rules | [Additional rules for PHPstan](https://github.com/localheinz/phpstan-rules) | | security-checker | [Checks composer dependencies for known security vulnerabilities](https://github.com/sensiolabs/security-checker) | diff --git a/resources/checkstyle.json b/resources/checkstyle.json index 1da7dcd3..06aecea3 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -28,21 +28,6 @@ "test": "php-cs-fixer list", "tags": ["featured", "checkstyle"] }, - { - "name": "php-formatter", - "summary": "Custom coding standards fixer", - "website": "https://github.com/mmoreram/php-formatter", - "command": { - "box-build": { - "repository": "https://github.com/mmoreram/php-formatter.git", - "phar": "build/php-formatter.phar", - "bin": "%target-dir%/php-formatter", - "version": "1fa3d9a3e1c67654f3fe2511bd28fa7c33b59d7e" - } - }, - "test": "php-formatter list", - "tags": ["checkstyle", "exclude-php:8.1", "exclude-php:8.0"] - }, { "name": "phpcbf", "summary": "Automatically corrects coding standard violations", diff --git a/resources/pre-installation.json b/resources/pre-installation.json index 54172650..a1d79b90 100644 --- a/resources/pre-installation.json +++ b/resources/pre-installation.json @@ -59,20 +59,6 @@ }, "test": "box list", "tags": ["pre-installation"] - }, - { - "name": "box-legacy", - "summary": "Legacy version of box", - "website": "https://box-project.github.io/box2/", - "command": { - "phive-install": { - "alias": "box-project/box2", - "bin": "%target-dir%/box-legacy", - "sig": "293D771241515FE8" - } - }, - "test": "box-legacy list", - "tags": ["pre-installation"] } ] } diff --git a/scoper.inc.php b/scoper.inc.php index 53891075..91c5e86d 100644 --- a/scoper.inc.php +++ b/scoper.inc.php @@ -2,14 +2,17 @@ return [ // Whitelist globals so that Symfony polyfills are not scoped - 'whitelist-global-constants' => true, - 'whitelist-global-classes' => true, - 'whitelist-global-functions' => true, - 'files-whitelist' => [ + 'expose-global-constants' => true, + 'expose-global-classes' => true, + 'expose-global-functions' => true, + 'exclude-files' => [ 'vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php', 'vendor/symfony/polyfill-php80/bootstrap.php', + 'vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', + 'vendor/symfony/polyfill-intl-normalizer/bootstrap.php', + ], + 'expose-namespaces' => [ + 'Symfony\Polyfill\Php80', + 'Symfony\Polyfill\Intl', ], - 'whitelist' => [ - 'Symfony\\Polyfill\\Php80\\*' - ] ]; diff --git a/src/Tool/Command/BoxBuildCommand.php b/src/Tool/Command/BoxBuildCommand.php index 972825ab..c6c43e2e 100644 --- a/src/Tool/Command/BoxBuildCommand.php +++ b/src/Tool/Command/BoxBuildCommand.php @@ -24,7 +24,7 @@ public function __construct(string $repository, string $phar, string $bin, strin public function __toString(): string { return \sprintf( - 'git clone %s %s&& cd %s && git checkout %s && composer install --no-dev --no-suggest --prefer-dist -n && box-legacy build && mv %s %s && chmod +x %s && cd && rm -rf %s', + 'git clone %s %s&& cd %s && git checkout %s && composer install --no-dev --no-suggest --prefer-dist -n && box compile && mv %s %s && chmod +x %s && cd && rm -rf %s', $this->repository, $this->targetDir(), $this->targetDir(), diff --git a/tests/Tool/Command/BoxBuildCommandTest.php b/tests/Tool/Command/BoxBuildCommandTest.php index 8d99fd85..8461e452 100644 --- a/tests/Tool/Command/BoxBuildCommandTest.php +++ b/tests/Tool/Command/BoxBuildCommandTest.php @@ -45,7 +45,7 @@ public function test_it_generates_the_installation_command() $this->assertMatchesRegularExpression('#cd /tools/behat#', (string) $command); $this->assertMatchesRegularExpression('#git checkout '.self::VERSION.'#', (string) $command); $this->assertMatchesRegularExpression('#composer install --no-dev --no-suggest --prefer-dist -n#', (string) $command); - $this->assertMatchesRegularExpression('#box-legacy build#', (string) $command); + $this->assertMatchesRegularExpression('#box compile#', (string) $command); } public function test_it_tries_to_guess_version_number_if_not_given_one() diff --git a/tests/UseCase/InstallToolsTest.php b/tests/UseCase/InstallToolsTest.php index 76efa84a..3909e191 100644 --- a/tests/UseCase/InstallToolsTest.php +++ b/tests/UseCase/InstallToolsTest.php @@ -146,7 +146,7 @@ public function test_it_includes_box_build_commands() $command = $this->useCase->__invoke($this->filter()); - $this->assertMatchesRegularExpression('#box-legacy build#', (string)$command); + $this->assertMatchesRegularExpression('#box compile#', (string)$command); } public function test_it_includes_phar_download_commands()