From 6663022ecd87615152188984e37322e37a14e9cf Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 13 Mar 2025 10:22:41 +0000 Subject: [PATCH 01/22] Add davidrjonas/composer-lock-diff --- README.md | 1 + resources/composer.json | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/README.md b/README.md index 6f470c9..39269db 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | codeception | [Codeception is a BDD-styled PHP testing framework](https://codeception.com/) | ✅ | ✅ | ✅ | | composer | [Dependency Manager for PHP](https://getcomposer.org/) | ✅ | ✅ | ✅ | | composer-bin-plugin | [Composer plugin to install bin vendors in isolated locations](https://github.com/bamarni/composer-bin-plugin) | ✅ | ✅ | ✅ | +| composer-lock-diff | [Composer plugin to check what has changed after a composer update](https://github.com/davidrjonas/composer-lock-diff) | ✅ | ✅ | ✅ | | composer-normalize | [Composer plugin to normalize composer.json files](https://github.com/ergebnis/composer-normalize) | ✅ | ✅ | ✅ | | composer-require-checker | [Verify that no unknown symbols are used in the sources of a package.](https://github.com/maglnet/ComposerRequireChecker) | ✅ | ✅ | ✅ | | composer-require-checker-3 | [Verify that no unknown symbols are used in the sources of a package.](https://github.com/maglnet/ComposerRequireChecker) | ✅ | ✅ | ✅ | diff --git a/resources/composer.json b/resources/composer.json index 93fe87c..6bf0cb7 100644 --- a/resources/composer.json +++ b/resources/composer.json @@ -71,6 +71,21 @@ }, "test": "composer global show cyclonedx/cyclonedx-php-composer", "tags": ["composer"] + }, + { + "name": "composer-lock-diff", + "summary": "Composer plugin to check what has changed after a composer update", + "website": "https://github.com/davidrjonas/composer-lock-diff", + "command": { + "sh": { + "command": "composer global config --no-plugins allow-plugins.davidrjonas/composer-lock-diff true" + }, + "composer-global-install": { + "package": "davidrjonas/composer-lock-diff" + } + }, + "test": "composer global show davidrjonas/composer-lock-diff", + "tags": ["composer"] } ] } From 6959dc453f79df0dc853aa8b3496d8123db8ca79 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 13 Mar 2025 14:49:17 +0000 Subject: [PATCH 02/22] Remove pepakriz/phpstan-exception-rules The package is becoming obsolete (see https://github.com/pepakriz/phpstan-exception-rules/issues/148). It seems to be the only phpstan extension we provide that does not support phpstan v2 (see https://github.com/jakzal/phpqa/issues/433). --- README.md | 2 +- resources/phpstan.json | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/README.md b/README.md index 39269db..d4edff9 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,6 @@ It has been extracted as a separate project to make maintenance easier and enabl | phpstan-deprecation-rules | [PHPStan rules for detecting deprecated code](https://github.com/phpstan/phpstan-deprecation-rules) | ✅ | ✅ | ✅ | | phpstan-doctrine | [Doctrine extensions for PHPStan](https://github.com/phpstan/phpstan-doctrine) | ✅ | ✅ | ✅ | | phpstan-ergebnis-rules | [Additional rules for PHPstan](https://github.com/ergebnis/phpstan-rules) | ✅ | ✅ | ✅ | -| phpstan-exception-rules | [PHPStan rules for checked and unchecked exceptions](https://github.com/pepakriz/phpstan-exception-rules) | ✅ | ✅ | ✅ | | phpstan-larastan | [Separate installation of phpstan for larastan](https://github.com/phpstan/phpstan) | ✅ | ✅ | ✅ | | phpstan-phpunit | [PHPUnit extensions and rules for PHPStan](https://github.com/phpstan/phpstan-phpunit) | ✅ | ✅ | ✅ | | phpstan-strict-rules | [Extra strict and opinionated rules for PHPStan](https://github.com/phpstan/phpstan-strict-rules) | ✅ | ✅ | ✅ | @@ -113,6 +112,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | phpcf | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpCodeFixer/) | | phpda | [Generates dependency graphs](https://mamuz.github.io/PhpDependencyAnalysis/) | | phpdoc-to-typehint | [Automatically adds type hints and return types based on PHPDocs](https://github.com/dunglas/phpdoc-to-typehint) | +| phpstan-exception-rules | [PHPStan rules for checked and unchecked exceptions](https://github.com/pepakriz/phpstan-exception-rules) | | phpstan-localheinz-rules | [Additional rules for PHPstan](https://github.com/localheinz/phpstan-rules) | | phpunit-5 | [The PHP testing framework (5.x version)](https://phpunit.de/) | | phpunit-7 | [The PHP testing framework (7.x version)](https://phpunit.de/) | diff --git a/resources/phpstan.json b/resources/phpstan.json index 5dcf3c5..a8c3172 100644 --- a/resources/phpstan.json +++ b/resources/phpstan.json @@ -118,19 +118,6 @@ "test": "composer global bin phpstan show phpstan/phpstan-webmozart-assert", "tags": ["phpstan"] }, - { - "name": "phpstan-exception-rules", - "summary": "PHPStan rules for checked and unchecked exceptions", - "website": "https://github.com/pepakriz/phpstan-exception-rules", - "command": { - "composer-bin-plugin": { - "package": "pepakriz/phpstan-exception-rules", - "namespace": "phpstan" - } - }, - "test": "composer global bin phpstan show pepakriz/phpstan-exception-rules", - "tags": ["phpstan"] - }, { "name": "phpat", "summary": "Easy to use architecture testing tool", From 54406c6431d8092635f0f4d0a74522c94aaa2752 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 13 Mar 2025 14:57:51 +0000 Subject: [PATCH 03/22] Add dantleech/gherkin-lint-php Closes https://github.com/jakzal/toolbox/issues/442 --- README.md | 1 + resources/linting.json | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index 39269db..2a17502 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | deptrac | [Enforces dependency rules between software layers](https://github.com/deptrac/deptrac) | ✅ | ✅ | ✅ | | diffFilter | [Applies QA tools to run on a single pull request](https://github.com/exussum12/coverageChecker) | ✅ | ✅ | ✅ | | ecs | [Sets up and runs coding standard checks](https://github.com/Symplify/EasyCodingStandard) | ✅ | ✅ | ✅ | +| gherkin-lint-php | [Gherkin linter for PHP](https://github.com/dantleech/gherkin-lint-php) | ✅ | ✅ | ✅ | | infection | [AST based PHP Mutation Testing Framework](https://infection.github.io/) | ✅ | ✅ | ✅ | | larastan | [PHPStan extension for Laravel](https://github.com/nunomaduro/larastan) | ✅ | ✅ | ✅ | | local-php-security-checker | [Checks composer dependencies for known security vulnerabilities](https://github.com/fabpot/local-php-security-checker) | ✅ | ✅ | ✅ | diff --git a/resources/linting.json b/resources/linting.json index 9a87b64..d0b3113 100644 --- a/resources/linting.json +++ b/resources/linting.json @@ -67,6 +67,20 @@ }, "test": "twig-linter --help", "tags": ["linting"] + }, + { + "name": "gherkin-lint-php", + "summary": "Gherkin linter for PHP", + "website": "https://github.com/dantleech/gherkin-lint-php", + "command": { + "composer-bin-plugin": { + "package": "dantleech/gherkin-lint", + "namespace": "gherkin-lint-php", + "links": {"%target-dir%/gherkinlint": "gherkinlint"} + } + }, + "test": "gherkinlint --help", + "tags": ["linting"] } ] } From f923714904423e35e66c97c6a9884f6f8257d625 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 13 Mar 2025 15:40:45 +0000 Subject: [PATCH 04/22] Add tomasvotruba/lines Closes https://github.com/jakzal/toolbox/issues/486 --- README.md | 1 + resources/metrics.json | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index 7ca8102..d8a9349 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | gherkin-lint-php | [Gherkin linter for PHP](https://github.com/dantleech/gherkin-lint-php) | ✅ | ✅ | ✅ | | infection | [AST based PHP Mutation Testing Framework](https://infection.github.io/) | ✅ | ✅ | ✅ | | larastan | [PHPStan extension for Laravel](https://github.com/nunomaduro/larastan) | ✅ | ✅ | ✅ | +| lines | [CLI tool for quick metrics of PHP projects](https://github.com/tomasVotruba/lines) | ✅ | ✅ | ✅ | | local-php-security-checker | [Checks composer dependencies for known security vulnerabilities](https://github.com/fabpot/local-php-security-checker) | ✅ | ✅ | ✅ | | 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) | ✅ | ✅ | ✅ | diff --git a/resources/metrics.json b/resources/metrics.json index e19e5c1..07bc7bd 100644 --- a/resources/metrics.json +++ b/resources/metrics.json @@ -43,6 +43,20 @@ }, "test": "phpmetrics --version", "tags": ["featured", "metrics"] + }, + { + "name": "lines", + "summary": "CLI tool for quick metrics of PHP projects", + "website": "https://github.com/tomasVotruba/lines", + "command": { + "composer-bin-plugin": { + "package": "tomasvotruba/lines", + "namespace": "lines", + "links": {"%target-dir%/lines": "lines"} + } + }, + "test": "lines list -q", + "tags": ["metrics"] } ] } From daa111c1feecda44f4da830469eec187ec8a13c0 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 13 Mar 2025 15:35:19 +0000 Subject: [PATCH 05/22] Install davidrjonas/composer-lock-diff in its own namespace --- resources/composer.json | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/resources/composer.json b/resources/composer.json index 6bf0cb7..bee3b31 100644 --- a/resources/composer.json +++ b/resources/composer.json @@ -77,14 +77,13 @@ "summary": "Composer plugin to check what has changed after a composer update", "website": "https://github.com/davidrjonas/composer-lock-diff", "command": { - "sh": { - "command": "composer global config --no-plugins allow-plugins.davidrjonas/composer-lock-diff true" - }, - "composer-global-install": { - "package": "davidrjonas/composer-lock-diff" + "composer-bin-plugin": { + "package": "davidrjonas/composer-lock-diff", + "namespace": "composer-lock-diff", + "links": {"%target-dir%/composer-lock-diff": "composer-lock-diff"} } }, - "test": "composer global show davidrjonas/composer-lock-diff", + "test": "composer-lock-diff --help", "tags": ["composer"] } ] From b2ebfe292786d36c7573dbd61ef625227afaaf1c Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 13 Mar 2025 15:59:17 +0000 Subject: [PATCH 06/22] Add kahlan --- README.md | 1 + resources/test.json | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index d8a9349..23ba30f 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | ecs | [Sets up and runs coding standard checks](https://github.com/Symplify/EasyCodingStandard) | ✅ | ✅ | ✅ | | gherkin-lint-php | [Gherkin linter for PHP](https://github.com/dantleech/gherkin-lint-php) | ✅ | ✅ | ✅ | | infection | [AST based PHP Mutation Testing Framework](https://infection.github.io/) | ✅ | ✅ | ✅ | +| kahlan | [Kahlan is a full-featured Unit & BDD test framework a la RSpec/JSpec](https://kahlan.github.io/docs/) | ✅ | ✅ | ✅ | | larastan | [PHPStan extension for Laravel](https://github.com/nunomaduro/larastan) | ✅ | ✅ | ✅ | | lines | [CLI tool for quick metrics of PHP projects](https://github.com/tomasVotruba/lines) | ✅ | ✅ | ✅ | | local-php-security-checker | [Checks composer dependencies for known security vulnerabilities](https://github.com/fabpot/local-php-security-checker) | ✅ | ✅ | ✅ | diff --git a/resources/test.json b/resources/test.json index 9ee36f0..cb328d6 100644 --- a/resources/test.json +++ b/resources/test.json @@ -198,6 +198,20 @@ }, "test": "simple-phpunit --version", "tags": ["test"] + }, + { + "name": "kahlan", + "summary": "Kahlan is a full-featured Unit & BDD test framework a la RSpec/JSpec", + "website": "https://kahlan.github.io/docs/", + "command": { + "composer-bin-plugin": { + "package": "kahlan/kahlan", + "namespace": "kahlan", + "links": {"%target-dir%/kahlan": "kahlan"} + } + }, + "test": "kahlan --version", + "tags": ["test"] } ] } From 0b8a0cff8d2be6b51b18b7203310ec28a70efa95 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 14 Apr 2025 11:17:13 +0100 Subject: [PATCH 07/22] Disable php-smever-checker until it is available again --- README.md | 2 +- resources/compatibility.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 23ba30f..2d1a7aa 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,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 419a6ca..ce25466 100644 --- a/resources/compatibility.json +++ b/resources/compatibility.json @@ -11,7 +11,7 @@ } }, "test": "php-semver-checker list", - "tags": ["compatibility"] + "tags": ["compatibility", "exclude-php:8.2", "exclude-php:8.3", "exclude-php:8.4"] }, { "name": "roave-backward-compatibility-check", From 12caea32290ab14e83f87d9cb5fcbf66bde442c0 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Fri, 11 Apr 2025 03:51:46 +0000 Subject: [PATCH 08/22] Update tools --- resources/pre-installation.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/pre-installation.json b/resources/pre-installation.json index dc785a1..8fedc89 100644 --- a/resources/pre-installation.json +++ b/resources/pre-installation.json @@ -18,11 +18,11 @@ "website": "https://phar.io/", "command": { "file-download": { - "url": "https://github.com/phar-io/phive/releases/download/0.15.3/phive-0.15.3.phar.asc", + "url": "https://github.com/phar-io/phive/releases/download/0.16.0/phive-0.16.0.phar.asc", "file": "%target-dir%/phive.asc" }, "phar-download": { - "phar": "https://github.com/phar-io/phive/releases/download/0.15.3/phive-0.15.3.phar", + "phar": "https://github.com/phar-io/phive/releases/download/0.16.0/phive-0.16.0.phar", "bin": "%target-dir%/phive" }, "sh": { From 12db3f8e0963e2cc0435af82fae28bf167b98bcd Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 14 Apr 2025 11:43:22 +0100 Subject: [PATCH 09/22] Remove the duplicated composer-normalize The tool has changed the ownership at some point, but was not abandoned. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 2d1a7aa..2ca92e6 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,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) | | 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-coupling-detector | [Detects code coupling issues](https://akeneo.github.io/php-coupling-detector/) | From 491e0326b9107b123e5a7193dd41dcd9e7f432a1 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 1 Jun 2025 22:21:15 +0100 Subject: [PATCH 10/22] Drop phpcov on PHP 8.2 --- README.md | 2 +- resources/test.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2ca92e6..1cb0c7a 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | phpcb | [PHP Code Browser](https://github.com/mayflower/PHP_CodeBrowser) | ✅ | ✅ | ✅ | | phpcbf | [Automatically corrects coding standard violations](https://github.com/squizlabs/PHP_CodeSniffer) | ✅ | ✅ | ✅ | | phpcodesniffer-composer-install | [Easy installation of PHP_CodeSniffer coding standards (rulesets).](https://github.com/Dealerdirect/phpcodesniffer-composer-installer) | ✅ | ✅ | ✅ | -| phpcov | [a command-line frontend for the PHP_CodeCoverage library](https://github.com/sebastianbergmann/phpcov) | ✅ | ✅ | ✅ | +| phpcov | [a command-line frontend for the PHP_CodeCoverage library](https://github.com/sebastianbergmann/phpcov) | ❌ | ✅ | ✅ | | phpcpd | [Copy/Paste Detector](https://github.com/sebastianbergmann/phpcpd) | ✅ | ✅ | ✅ | | phpcs | [Detects coding standard violations](https://github.com/squizlabs/PHP_CodeSniffer) | ✅ | ✅ | ✅ | | phpcs-security-audit | [Finds vulnerabilities and weaknesses related to security in PHP code](https://github.com/FloeDesignTechnologies/phpcs-security-audit) | ✅ | ✅ | ✅ | diff --git a/resources/test.json b/resources/test.json index cb328d6..bc2be89 100644 --- a/resources/test.json +++ b/resources/test.json @@ -84,7 +84,7 @@ } }, "test": "phpcov -v", - "tags": ["test"] + "tags": ["test", "exclude-php:8.2"] }, { "name": "php-fuzzer", From 3ea9d36ffbdd3a71ea18f86fb9fa983ebffa7182 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 22 Jun 2025 22:00:42 +0100 Subject: [PATCH 11/22] Update the signature key for phpcbf --- resources/checkstyle.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/checkstyle.json b/resources/checkstyle.json index 9d03a46..0acf5a6 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -50,7 +50,7 @@ "phive-install": { "alias": "phpcbf", "bin": "%target-dir%/phpcbf", - "sig": "A978220305CD5C32" + "sig": "97B02DD8E5071466" } }, "test": "phpcbf --help", From 90eb3d37c55c45d53d110d2ac01ef65b70abc34d Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 30 Jun 2025 16:30:10 +0100 Subject: [PATCH 12/22] Enable php-cs-fixer on PHP 8.4 Fixes #533 --- README.md | 2 +- resources/checkstyle.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1cb0c7a..483cd9c 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | 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/) | ✅ | ✅ | ❌ | +| 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) | ❌ | ❌ | ❌ | | phpa | [Checks for weak assumptions](https://github.com/rskuipers/php-assumptions) | ✅ | ✅ | ✅ | diff --git a/resources/checkstyle.json b/resources/checkstyle.json index 0acf5a6..0c92d62 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -40,7 +40,7 @@ } }, "test": "php-cs-fixer list", - "tags": ["featured", "checkstyle", "exclude-php:8.4"] + "tags": ["featured", "checkstyle"] }, { "name": "phpcbf", From 5c720106230a708f8e80f18e3dd5a7236faa03ad Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 24 Aug 2025 22:08:01 +0100 Subject: [PATCH 13/22] 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 2b591cf..bc2fb1a 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 14/22] 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 483cd9c..18061ee 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 bc2be89..ad84176 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 15/22] 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 07bc7bd..491427c 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 16/22] 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 d0b3113..78578f9 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 17/22] 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 be7baee..38259d8 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 18/22] 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 38259d8..3660499 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 19/22] 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 18061ee..0d20feb 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 ce25466..a97024b 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 20/22] 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 ad84176..10268fc 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 21/22] 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 0d20feb..a6b6bf1 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 22/22] 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 a97024b..a6310d3 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" } },