From 5c720106230a708f8e80f18e3dd5a7236faa03ad Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 24 Aug 2025 22:08:01 +0100 Subject: [PATCH 01/10] Do not hide the output of test command on failure --- src/Tool/Command/TestCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tool/Command/TestCommand.php b/src/Tool/Command/TestCommand.php index 2b591cf5..bc2fb1a0 100644 --- a/src/Tool/Command/TestCommand.php +++ b/src/Tool/Command/TestCommand.php @@ -17,6 +17,6 @@ public function __construct(string $command, string $name) public function __toString(): string { - return \sprintf('((%s > /dev/null && echo -e "\e[0;32m✔\e[0m︎%s") || (echo -e "\e[1;31m✘\e[0m%s" && false))', $this->command, $this->name, $this->name); + return \sprintf('(output=$(%s 2>&1) && echo -e "\e[0;32m✔\e[0m︎%s" || (echo -e "\e[1;31m✘\e[0m%s\n$output" && false))', $this->command, $this->name, $this->name); } } From 079734bd7af3e72d1b7e16a3c59454fd16234e7a Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 24 Aug 2025 22:38:32 +0100 Subject: [PATCH 02/10] Remove pest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The latest pest version assumes it is installed in the project and expects the tests directory to be present. It is impossible to run it as an external tool anymore. Example failure when trying to use pest installed with the composer-bin plugin: Pest\Exceptions\FatalException The test directory [/home/runner/work/toolbox/toolbox/build/tools/.composer/vendor-bin/pest/tests/] does not exist. at build/tools/.composer/vendor-bin/pest/vendor/pestphp/pest/src/Bootstrappers/BootFiles.php:45 41▕ $rootPath = TestSuite::getInstance()->rootPath; 42▕ $testsPath = $rootPath.DIRECTORY_SEPARATOR.testDirectory(); 43▕ 44▕ if (! is_dir($testsPath)) { ➜ 45▕ throw new FatalException(sprintf('The test directory [%s] does not exist.', $testsPath)); 46▕ } 47▕ 48▕ foreach (self::STRUCTURE as $filename) { 49▕ $filename = sprintf('%s%s%s', $testsPath, DIRECTORY_SEPARATOR, $filename); --- README.md | 2 +- resources/test.json | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/README.md b/README.md index 483cd9c4..18061ee1 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,6 @@ It has been extracted as a separate project to make maintenance easier and enabl | parallel-lint | [Checks PHP file syntax](https://github.com/php-parallel-lint/PHP-Parallel-Lint) | ✅ | ✅ | ✅ | | paratest | [Parallel testing for PHPUnit](https://github.com/paratestphp/paratest) | ✅ | ✅ | ✅ | | pdepend | [Static Analysis Tool](https://pdepend.org/) | ✅ | ✅ | ✅ | -| pest | [The elegant PHP Testing Framework](https://github.com/pestphp/pest) | ✅ | ✅ | ✅ | | phan | [Static Analysis Tool](https://github.com/phan/phan) | ✅ | ✅ | ✅ | | phive | [PHAR Installation and Verification Environment](https://phar.io/) | ✅ | ✅ | ✅ | | php-cs-fixer | [PHP Coding Standards Fixer](http://cs.symfony.com/) | ✅ | ✅ | ✅ | @@ -109,6 +108,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | box-legacy | [Legacy version of box](https://box-project.github.io/box2/) | | design-pattern | [Detects design patterns](https://github.com/Halleck45/DesignPatternDetector) | | parallel-lint | [Checks PHP file syntax](https://github.com/JakubOnderka/PHP-Parallel-Lint) | +| pest | [The elegant PHP Testing Framework](https://github.com/pestphp/pest) | | php-coupling-detector | [Detects code coupling issues](https://akeneo.github.io/php-coupling-detector/) | | php-formatter | [Custom coding standards fixer](https://github.com/mmoreram/php-formatter) | | phpcf | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpCodeFixer/) | diff --git a/resources/test.json b/resources/test.json index bc2be891..ad841767 100644 --- a/resources/test.json +++ b/resources/test.json @@ -55,23 +55,6 @@ "test": "paratest --version", "tags": ["test"] }, - { - "name": "pest", - "summary": "The elegant PHP Testing Framework", - "website": "https://github.com/pestphp/pest", - "command": { - "sh": { - "command": "composer global bin pest config allow-plugins.pestphp/pest-plugin true" - }, - "composer-bin-plugin": { - "package": "pestphp/pest", - "namespace": "pest", - "links": {"%target-dir%/pest": "pest"} - } - }, - "test": "pest --version", - "tags": ["test"] - }, { "name": "phpcov", "summary": "a command-line frontend for the PHP_CodeCoverage library", From 9b16a1e829921f11ec1d119b4a4520c03647fc62 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 29 Sep 2025 20:50:35 +0300 Subject: [PATCH 03/10] Change the test command for lines since the previous one is no longer supported --- resources/metrics.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/metrics.json b/resources/metrics.json index 07bc7bdf..491427c2 100644 --- a/resources/metrics.json +++ b/resources/metrics.json @@ -55,7 +55,7 @@ "links": {"%target-dir%/lines": "lines"} } }, - "test": "lines list -q", + "test": "lines --version", "tags": ["metrics"] } ] From aa6dd5cf997308ef5dd52f62e4303e7e67174a97 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 27 Oct 2025 09:27:53 +0100 Subject: [PATCH 04/10] Update the yaml-lint signature --- resources/linting.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/linting.json b/resources/linting.json index d0b31133..78578f94 100644 --- a/resources/linting.json +++ b/resources/linting.json @@ -48,7 +48,7 @@ "phive-install": { "alias": "j13k/yaml-lint", "bin": "%target-dir%/yaml-lint", - "sig": "985E1E22802973B2" + "sig": "38A182AB413064D7" } }, "test": "yaml-lint --version", From e5da0c29ab5f4ff15fc7d6fadcd69894de5b03a1 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 27 Oct 2025 10:46:58 +0100 Subject: [PATCH 05/10] Replace the deprecated actions/upload-release-asset with a gh command --- .github/workflows/build.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index be7baee1..38259d89 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,20 +98,11 @@ jobs: name: devkit.phar path: . - name: Upload toolbox.phar - uses: actions/upload-release-asset@v1 + run: gh release upload ${{ github.event.release.tag_name }} toolbox.phar --clobber env: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./toolbox.phar - asset_name: toolbox.phar - asset_content_type: application/zip - name: Upload devkit.phar - uses: actions/upload-release-asset@v1 + run: gh release upload ${{ github.event.release.tag_name }} devkit.phar --clobber env: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./devkit.phar - asset_name: devkit.phar - asset_content_type: application/zip + From b5107c05691969d23df021243c891f09d16fcd93 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 27 Oct 2025 10:54:47 +0100 Subject: [PATCH 06/10] Specify the repository to upload release assets to --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 38259d89..36604993 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,11 +98,11 @@ jobs: name: devkit.phar path: . - name: Upload toolbox.phar - run: gh release upload ${{ github.event.release.tag_name }} toolbox.phar --clobber + run: gh release upload ${{ github.event.release.tag_name }} toolbox.phar --clobber --repo github.com/jakzal/toolbox env: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} - name: Upload devkit.phar - run: gh release upload ${{ github.event.release.tag_name }} devkit.phar --clobber + run: gh release upload ${{ github.event.release.tag_name }} devkit.phar --clobber --repo github.com/jakzal/toolbox env: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} From efd7e88679100a1be5c2c3820c51ad50d2038932 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 30 Oct 2025 09:44:11 +0100 Subject: [PATCH 07/10] Re-enable php-semver-checker --- README.md | 2 +- resources/compatibility.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 18061ee1..0d20febd 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | phive | [PHAR Installation and Verification Environment](https://phar.io/) | ✅ | ✅ | ✅ | | php-cs-fixer | [PHP Coding Standards Fixer](http://cs.symfony.com/) | ✅ | ✅ | ✅ | | 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) | ❌ | ❌ | ❌ | +| 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) | ✅ | ✅ | ✅ | | phparkitect | [Helps to put architectural constraints in a PHP code base](https://github.com/phparkitect/arkitect) | ✅ | ✅ | ✅ | | phpat | [Easy to use architecture testing tool](https://github.com/carlosas/phpat) | ✅ | ✅ | ✅ | diff --git a/resources/compatibility.json b/resources/compatibility.json index ce254662..a97024b0 100644 --- a/resources/compatibility.json +++ b/resources/compatibility.json @@ -6,12 +6,12 @@ "website": "https://github.com/tomzx/php-semver-checker", "command": { "phar-download": { - "phar": "http://psvc.coreteks.org/php-semver-checker.phar", + "phar": "https://github.com/tomzx/php-semver-checker/releases/latest/download/php-semver-checker.phar", "bin": "%target-dir%/php-semver-checker" } }, "test": "php-semver-checker list", - "tags": ["compatibility", "exclude-php:8.2", "exclude-php:8.3", "exclude-php:8.4"] + "tags": ["compatibility"] }, { "name": "roave-backward-compatibility-check", From e2517c68568e9b67219d839ee6a19b7669844d60 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Fri, 31 Oct 2025 10:17:29 +0100 Subject: [PATCH 08/10] Enable PHPSpec on PHP 8.4 --- resources/test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/test.json b/resources/test.json index ad841767..10268fce 100644 --- a/resources/test.json +++ b/resources/test.json @@ -93,7 +93,7 @@ } }, "test": "phpspec --version", - "tags": ["exclude-php:8.4", "featured", "test"] + "tags": ["featured", "test"] }, { "name": "phpunit", From b7d6e938b3d496e3f68f60cf4db30a865d05b3ec Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Fri, 31 Oct 2025 10:29:32 +0100 Subject: [PATCH 09/10] Enable PHPSpec on PHP 8.4 (update the readme) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d20febd..a6b6bf19 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | phpmd | [A tool for finding problems in PHP code](https://phpmd.org/) | ✅ | ✅ | ✅ | | phpmetrics | [Static Analysis Tool](http://www.phpmetrics.org/) | ✅ | ✅ | ✅ | | phpmnd | [Helps to detect magic numbers](https://github.com/povils/phpmnd) | ✅ | ✅ | ✅ | -| phpspec | [SpecBDD Framework](http://www.phpspec.net/) | ✅ | ✅ | ❌ | +| phpspec | [SpecBDD Framework](http://www.phpspec.net/) | ✅ | ✅ | ✅ | | phpstan | [Static Analysis Tool](https://github.com/phpstan/phpstan) | ✅ | ✅ | ✅ | | phpstan-banned-code | [PHPStan rules for detecting calls to specific functions you don't want in your project](https://github.com/ekino/phpstan-banned-code) | ✅ | ✅ | ✅ | | phpstan-beberlei-assert | [PHPStan extension for beberlei/assert](https://github.com/phpstan/phpstan-beberlei-assert) | ✅ | ✅ | ✅ | From 5c729412305fa8e8d1c781720f1859c362cdc1cb Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 3 Nov 2025 11:50:13 +0000 Subject: [PATCH 10/10] Switch to a specific php-semver-checker version as the latest is not available --- resources/compatibility.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/compatibility.json b/resources/compatibility.json index a97024b0..a6310d33 100644 --- a/resources/compatibility.json +++ b/resources/compatibility.json @@ -6,7 +6,7 @@ "website": "https://github.com/tomzx/php-semver-checker", "command": { "phar-download": { - "phar": "https://github.com/tomzx/php-semver-checker/releases/latest/download/php-semver-checker.phar", + "phar": "https://github.com/tomzx/php-semver-checker/releases/download/v0.17.0/php-semver-checker.phar", "bin": "%target-dir%/php-semver-checker" } },