From e8ce78b778db05f99c67c1970c76bca710602b29 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 28 Mar 2022 03:52:38 +0000 Subject: [PATCH 001/206] 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 a1d79b90..a65aea9c 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.0/phive-0.15.0.phar.asc", + "url": "https://github.com/phar-io/phive/releases/download/0.15.1/phive-0.15.1.phar.asc", "file": "%target-dir%/phive.asc" }, "phar-download": { - "phar": "https://github.com/phar-io/phive/releases/download/0.15.0/phive-0.15.0.phar", + "phar": "https://github.com/phar-io/phive/releases/download/0.15.1/phive-0.15.1.phar", "bin": "%target-dir%/phive" }, "sh": { From 942c5da94e7c467b7e909fa88b03967d5e6bffe2 Mon Sep 17 00:00:00 2001 From: Samuel <20537389+SampicBE@users.noreply.github.com> Date: Tue, 12 Apr 2022 23:35:58 +0200 Subject: [PATCH 002/206] chore: updating version local-php-security-checker --- resources/security.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/security.json b/resources/security.json index aa7c53b1..0749ee4b 100644 --- a/resources/security.json +++ b/resources/security.json @@ -20,7 +20,7 @@ "website": "https://github.com/fabpot/local-php-security-checker", "command": { "file-download": { - "url": "https://github.com/fabpot/local-php-security-checker/releases/download/v1.0.0/local-php-security-checker_1.0.0_linux_amd64", + "url": "https://github.com/fabpot/local-php-security-checker/releases/download/v2.0.3/local-php-security-checker_2.0.3_linux_amd64", "file": "%target-dir%/local-php-security-checker" }, "sh": { From faa0d10e36081b6567fa63567cb1898fc02ce0bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Tue, 10 May 2022 10:19:40 +0200 Subject: [PATCH 003/206] bump: Infection ^0.26 --- resources/test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/test.json b/resources/test.json index 9634c4ff..b9da0851 100644 --- a/resources/test.json +++ b/resources/test.json @@ -32,7 +32,7 @@ "website": "https://infection.github.io/", "command": { "phive-install": { - "alias": "infection@^0.21", + "alias": "infection@^0.26", "bin": "%target-dir%/infection", "sig": "C5095986493B4AA0" } From f358e01dccd633fac38c3f365d87fb02f9b492bd Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 10 May 2022 21:52:10 +0100 Subject: [PATCH 004/206] Always install the latest version of infection --- resources/test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/test.json b/resources/test.json index b9da0851..58387c6a 100644 --- a/resources/test.json +++ b/resources/test.json @@ -32,7 +32,7 @@ "website": "https://infection.github.io/", "command": { "phive-install": { - "alias": "infection@^0.26", + "alias": "infection", "bin": "%target-dir%/infection", "sig": "C5095986493B4AA0" } From dc00d9da318966da7d36afcda4fb3445bbe9ccbf Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 10 May 2022 21:53:31 +0100 Subject: [PATCH 005/206] Drop infection on PHP 7.4 --- README.md | 2 +- resources/test.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e295263a..b4c65fa9 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,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/qossmic/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) | ✅ | ✅ | ✅ | -| infection | [AST based PHP Mutation Testing Framework](https://infection.github.io/) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | | parallel-lint | [Checks PHP file syntax](https://github.com/php-parallel-lint/PHP-Parallel-Lint) | ✅ | ✅ | ✅ | diff --git a/resources/test.json b/resources/test.json index 58387c6a..c9e9f3f0 100644 --- a/resources/test.json +++ b/resources/test.json @@ -38,7 +38,7 @@ } }, "test": "infection --version", - "tags": ["featured", "test"] + "tags": ["featured", "test", "exclude-php:7.4"] }, { "name": "paratest", From 265e14f0c25d0c264988e82d6731bde2e2769427 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 18 May 2022 21:36:59 +0100 Subject: [PATCH 006/206] Remove the constraint from yaml-lint --- resources/linting.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/linting.json b/resources/linting.json index 511fce68..90c35cd7 100644 --- a/resources/linting.json +++ b/resources/linting.json @@ -45,7 +45,7 @@ "website": "https://github.com/j13k/yaml-lint", "command": { "phive-install": { - "alias": "j13k/yaml-lint@^1.1.3", + "alias": "j13k/yaml-lint", "bin": "%target-dir%/yaml-lint", "sig": "D684BDC6C6CAB80F" } From 63257488a09cb95c476e55fcc8b0fed4de12c845 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 18 May 2022 21:39:48 +0100 Subject: [PATCH 007/206] Remove the constraint from pdepend --- resources/architecture.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/architecture.json b/resources/architecture.json index daa555d6..38e26815 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -34,7 +34,7 @@ "website": "https://pdepend.org/", "command": { "phive-install": { - "alias": "pdepend/pdepend@^2.0", + "alias": "pdepend/pdepend", "bin": "%target-dir%/pdepend" } }, From 83bf4917ea0963fac40bbe00f79c3f99bb7e5073 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 18 May 2022 21:43:27 +0100 Subject: [PATCH 008/206] Remove version constraints from phive installs --- resources/checkstyle.json | 4 ++-- resources/deprecation.json | 2 +- resources/metrics.json | 2 +- resources/phpcs.json | 2 +- resources/pre-installation.json | 2 +- resources/refactoring.json | 4 ++-- resources/test.json | 2 +- resources/tools.json | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/resources/checkstyle.json b/resources/checkstyle.json index 06aecea3..992315a7 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -20,7 +20,7 @@ "website": "http://cs.symfony.com/", "command": { "phive-install": { - "alias": "php-cs-fixer@^3.0", + "alias": "php-cs-fixer", "bin": "%target-dir%/php-cs-fixer", "sig": "E82B2FB314E9906E" } @@ -48,7 +48,7 @@ "website": "https://github.com/friendsoftwig/twigcs", "command": { "phive-install": { - "alias": "friendsoftwig/twigcs@^5.0", + "alias": "friendsoftwig/twigcs", "bin": "%target-dir%/twigcs", "sig": "C0DD602D1DD2E5AF" } diff --git a/resources/deprecation.json b/resources/deprecation.json index 4161541b..be3656a6 100644 --- a/resources/deprecation.json +++ b/resources/deprecation.json @@ -19,7 +19,7 @@ "website": "http://wapmorgan.github.io/PhpDeprecationDetector", "command": { "phive-install": { - "alias": "wapmorgan/phpdeprecationdetector@^2.0", + "alias": "wapmorgan/phpdeprecationdetector", "bin": "%target-dir%/phpdd" } }, diff --git a/resources/metrics.json b/resources/metrics.json index 8919dbe8..41c2f393 100644 --- a/resources/metrics.json +++ b/resources/metrics.json @@ -47,7 +47,7 @@ "website": "http://www.phpmetrics.org/", "command": { "phive-install": { - "alias": "phpmetrics/PhpMetrics@^2.0", + "alias": "phpmetrics/PhpMetrics", "bin": "%target-dir%/phpmetrics" } }, diff --git a/resources/phpcs.json b/resources/phpcs.json index 0ffa3b8a..f6fc27c1 100644 --- a/resources/phpcs.json +++ b/resources/phpcs.json @@ -41,4 +41,4 @@ "tags": ["security"] } ] -} \ No newline at end of file +} diff --git a/resources/pre-installation.json b/resources/pre-installation.json index a65aea9c..fad308fd 100644 --- a/resources/pre-installation.json +++ b/resources/pre-installation.json @@ -53,7 +53,7 @@ "website": "https://github.com/humbug/box", "command": { "phive-install": { - "alias": "humbug/box@^3.0", + "alias": "humbug/box", "bin": "%target-dir%/box" } }, diff --git a/resources/refactoring.json b/resources/refactoring.json index 16450bba..9d192e1d 100644 --- a/resources/refactoring.json +++ b/resources/refactoring.json @@ -6,7 +6,7 @@ "website": "https://github.com/bmitch/churn-php", "command": { "phive-install": { - "alias": "churn@^1.0", + "alias": "churn", "bin": "%target-dir%/churn", "sig": "96141E4421A9B0D5" } @@ -20,7 +20,7 @@ "website": "https://github.com/dunglas/phpdoc-to-typehint", "command": { "phive-install": { - "alias": "dunglas/phpdoc-to-typehint@^0.1.0", + "alias": "dunglas/phpdoc-to-typehint", "bin": "%target-dir%/phpdoc-to-typehint" } }, diff --git a/resources/test.json b/resources/test.json index c9e9f3f0..97e491b0 100644 --- a/resources/test.json +++ b/resources/test.json @@ -87,7 +87,7 @@ "website": "http://www.phpspec.net/", "command": { "phive-install": { - "alias": "phpspec/phpspec@^7.0", + "alias": "phpspec/phpspec", "bin": "%target-dir%/phpspec" } }, diff --git a/resources/tools.json b/resources/tools.json index feb4fa0f..87d38554 100644 --- a/resources/tools.json +++ b/resources/tools.json @@ -20,7 +20,7 @@ "website": "https://github.com/phan/phan", "command": { "phive-install": { - "alias": "phan@^4.0.3", + "alias": "phan", "bin": "%target-dir%/phan", "sig": "8101FB57DD8130F0" } From c16714033b1da560b863952aa438091571cdb68a Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 18 May 2022 21:44:36 +0100 Subject: [PATCH 009/206] Remove the constraint from roave/backwardcompatibilitycheck --- resources/compatibility.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/compatibility.json b/resources/compatibility.json index effa91e6..0ffbd47e 100644 --- a/resources/compatibility.json +++ b/resources/compatibility.json @@ -19,7 +19,7 @@ "website": "https://github.com/Roave/BackwardCompatibilityCheck", "command": { "phive-install": { - "alias": "roave/backwardcompatibilitycheck@^5.0", + "alias": "roave/backwardcompatibilitycheck", "bin": "%target-dir%/roave-backward-compatibility-check" } }, From 81e25bb12a242d6645aede1869fdb9e5a87185a2 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 23 May 2022 11:33:46 +0100 Subject: [PATCH 010/206] Remove the version restriction for larastan --- resources/phpstan.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/phpstan.json b/resources/phpstan.json index 8c8892e4..2f7ed4fc 100644 --- a/resources/phpstan.json +++ b/resources/phpstan.json @@ -151,7 +151,7 @@ "website": "https://github.com/nunomaduro/larastan", "command": { "composer-bin-plugin": { - "package": "nunomaduro/larastan:^1.0", + "package": "nunomaduro/larastan", "namespace": "larastan" } }, From b9f548a7f590127d8b9ea965a058ecd2c8ec4097 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 23 May 2022 11:37:58 +0100 Subject: [PATCH 011/206] Remove the abandoned phpdoc-to-typehint --- README.md | 2 +- resources/refactoring.json | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/README.md b/README.md index b4c65fa9..f8a206e2 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,6 @@ It has been extracted as a separate project to make maintenance easier and enabl | phpcs-security-audit | [Finds vulnerabilities and weaknesses related to security in PHP code](https://github.com/FloeDesignTechnologies/phpcs-security-audit) | ✅ | ✅ | ✅ | | phpda | [Generates dependency graphs](https://mamuz.github.io/PhpDependencyAnalysis/) | ✅ | ✅ | ❌ | | phpdd | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector) | ✅ | ✅ | ✅ | -| phpdoc-to-typehint | [Automatically adds type hints and return types based on PHPDocs](https://github.com/dunglas/phpdoc-to-typehint) | ✅ | ✅ | ✅ | | phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ✅ | ✅ | ✅ | | phpinsights | [Analyses code quality, style, architecture and complexity](https://phpinsights.com/) | ✅ | ✅ | ✅ | | phplint | [Lints php files in parallel](https://github.com/overtrue/phplint) | ✅ | ✅ | ✅ | @@ -104,6 +103,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | 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/) | +| phpdoc-to-typehint | [Automatically adds type hints and return types based on PHPDocs](https://github.com/dunglas/phpdoc-to-typehint) | | 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) | | testability | [Analyses and reports testability issues of a php codebase](https://github.com/edsonmedina/php_testability) | diff --git a/resources/refactoring.json b/resources/refactoring.json index 9d192e1d..67a3dd19 100644 --- a/resources/refactoring.json +++ b/resources/refactoring.json @@ -14,19 +14,6 @@ "test": "churn --version", "tags": ["featured", "refactoring"] }, - { - "name": "phpdoc-to-typehint", - "summary": "Automatically adds type hints and return types based on PHPDocs", - "website": "https://github.com/dunglas/phpdoc-to-typehint", - "command": { - "phive-install": { - "alias": "dunglas/phpdoc-to-typehint", - "bin": "%target-dir%/phpdoc-to-typehint" - } - }, - "test": "phpdoc-to-typehint -V", - "tags": ["refactoring"] - }, { "name": "rector", "summary": "Tool for instant code upgrades and refactoring", From cc1daaac59b1f2c7f540416fc1bfe5e57ed4f9e4 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 23 May 2022 11:41:10 +0100 Subject: [PATCH 012/206] Enable roave-backward-compatibility-check on PHP 8.0 and 8.1 --- README.md | 2 +- resources/compatibility.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b4c65fa9..1d95ca13 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | psalm-plugin-symfony | [Psalm Plugin for Symfony](https://github.com/psalm/psalm-plugin-symfony) | ✅ | ✅ | ✅ | | psecio-parse | [Scans code for potential security-related issues](https://github.com/psecio/parse) | ✅ | ✅ | ✅ | | rector | [Tool for instant code upgrades and refactoring](https://github.com/rectorphp/rector) | ✅ | ✅ | ✅ | -| roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ❌ | ❌ | +| roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ✅ | ✅ | | simple-phpunit | [Provides utilities to report legacy tests and usage of deprecated code](https://symfony.com/doc/current/components/phpunit_bridge.html) | ✅ | ✅ | ✅ | | twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | ✅ | | twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | ✅ | diff --git a/resources/compatibility.json b/resources/compatibility.json index 0ffbd47e..4dfd38fc 100644 --- a/resources/compatibility.json +++ b/resources/compatibility.json @@ -24,7 +24,7 @@ } }, "test": "roave-backward-compatibility-check --version", - "tags": ["exclude-php:8.1", "exclude-php:8.0", "compatibility"] + "tags": ["compatibility"] } ] } From 1485dc78f8c579ea1355ecf6fade51691ea4e976 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 23 May 2022 11:50:56 +0100 Subject: [PATCH 013/206] Sewitch roave/backwardcompatibilitycheck to composer installation as phars are no longer published --- resources/compatibility.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/compatibility.json b/resources/compatibility.json index 4dfd38fc..ccb051d6 100644 --- a/resources/compatibility.json +++ b/resources/compatibility.json @@ -18,9 +18,10 @@ "summary": "Tool to compare two revisions of a class API to check for BC breaks", "website": "https://github.com/Roave/BackwardCompatibilityCheck", "command": { - "phive-install": { - "alias": "roave/backwardcompatibilitycheck", - "bin": "%target-dir%/roave-backward-compatibility-check" + "composer-bin-plugin": { + "package": "roave/backward-compatibility-check", + "namespace": "roavebackwardcompatibilitycheck", + "links": {"%target-dir%/roave-backward-compatibility-check": "roave-backward-compatibility-check"} } }, "test": "roave-backward-compatibility-check --version", From e9f0cc261ca129efec243a640a7faa5c3e59a616 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 23 May 2022 11:59:56 +0100 Subject: [PATCH 014/206] Enable phpspec on PHP 8.1 --- README.md | 2 +- resources/test.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1d95ca13..340e07df 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,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-beberlei-assert | [PHPStan extension for beberlei/assert](https://github.com/phpstan/phpstan-beberlei-assert) | ✅ | ✅ | ✅ | | phpstan-deprecation-rules | [PHPStan rules for detecting deprecated code](https://github.com/phpstan/phpstan-deprecation-rules) | ✅ | ✅ | ✅ | diff --git a/resources/test.json b/resources/test.json index 97e491b0..240d8418 100644 --- a/resources/test.json +++ b/resources/test.json @@ -92,7 +92,7 @@ } }, "test": "phpspec --version", - "tags": ["exclude-php:8.1", "featured", "test"] + "tags": ["featured", "test"] }, { "name": "phpunit", From 0f658091ac54d258ad13e7eed97b03d83c012cda Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 23 May 2022 13:24:21 +0100 Subject: [PATCH 015/206] Reduce output generated by test commands --- resources/composer.json | 2 +- resources/tools.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/composer.json b/resources/composer.json index 8a50f725..915f25e7 100644 --- a/resources/composer.json +++ b/resources/composer.json @@ -23,7 +23,7 @@ "sig": "F4D32E2C9343B2AE" } }, - "test": "composer-unused -vvv | grep 'Your system is ready'", + "test": "composer-unused -V", "tags": ["composer"] }, { diff --git a/resources/tools.json b/resources/tools.json index 87d38554..919d1ee0 100644 --- a/resources/tools.json +++ b/resources/tools.json @@ -39,7 +39,7 @@ "sig": "15E1F8E2B149E6F5" } }, - "test": "phpbench", + "test": "phpbench -V", "tags": [] }, { From 5b02f548b30419d0ff492c600434d418d7d3a9e0 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 23 May 2022 20:48:43 +0100 Subject: [PATCH 016/206] Add the infection extension installer to allowed plugins --- composer.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/composer.json b/composer.json index a0b5a7e2..91e31f88 100644 --- a/composer.json +++ b/composer.json @@ -34,5 +34,10 @@ "branch-alias": { "dev-master": "1.x-dev" } + }, + "config": { + "allow-plugins": { + "infection/extension-installer": true + } } } From bbbccd6b1b2e4edfbaedaf44fb78d8c67bc12105 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 23 May 2022 21:12:52 +0100 Subject: [PATCH 017/206] Allow composer global bin plugin --- resources/pre-installation.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/pre-installation.json b/resources/pre-installation.json index fad308fd..c03056f7 100644 --- a/resources/pre-installation.json +++ b/resources/pre-installation.json @@ -37,11 +37,11 @@ "summary": "Composer plugin to install bin vendors in isolated locations", "website": "https://github.com/bamarni/composer-bin-plugin", "command": { + "sh": { + "command": "composer global config extra.bamarni-bin.bin-links false && composer config --global allow-plugins.bamarni/composer-bin-plugin true" + }, "composer-global-install": { "package": "bamarni/composer-bin-plugin" - }, - "sh": { - "command": "composer global config extra.bamarni-bin.bin-links false" } }, "test": "composer global show bamarni/composer-bin-plugin", From 47aa8542c8d84d5c217ef420552e54cdd150ec94 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 23 May 2022 21:30:20 +0100 Subject: [PATCH 018/206] Declare allow-plugins configuration for composer plugins --- resources/composer.json | 3 +++ resources/metrics.json | 3 +++ resources/phpcs.json | 3 +++ 3 files changed, 9 insertions(+) diff --git a/resources/composer.json b/resources/composer.json index 915f25e7..acf9d513 100644 --- a/resources/composer.json +++ b/resources/composer.json @@ -5,6 +5,9 @@ "summary": "Composer plugin to normalize composer.json files", "website": "https://github.com/ergebnis/composer-normalize", "command": { + "sh": { + "command": "composer config --global allow-plugins.ergebnis/composer-normalize true" + }, "composer-global-install": { "package": "ergebnis/composer-normalize" } diff --git a/resources/metrics.json b/resources/metrics.json index 41c2f393..4b27785e 100644 --- a/resources/metrics.json +++ b/resources/metrics.json @@ -18,6 +18,9 @@ "summary": "Analyses code quality, style, architecture and complexity", "website": "https://phpinsights.com/", "command": { + "sh": { + "command": "composer global bin phpinsights config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true" + }, "composer-bin-plugin": { "package": "nunomaduro/phpinsights", "namespace": "phpinsights", diff --git a/resources/phpcs.json b/resources/phpcs.json index f6fc27c1..9699117e 100644 --- a/resources/phpcs.json +++ b/resources/phpcs.json @@ -19,6 +19,9 @@ "summary": "Easy installation of PHP_CodeSniffer coding standards (rulesets).", "website": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer", "command": { + "sh": { + "command": "composer global bin phpcs config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true" + }, "composer-bin-plugin": { "package": "dealerdirect/phpcodesniffer-composer-installer", "namespace": "phpcs" From de40007665ec12add527299ec41d72be38a1f94d Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 23 May 2022 22:07:29 +0100 Subject: [PATCH 019/206] Remove the use of deprecated composer option --no-suggest --- src/Tool/Command/BoxBuildCommand.php | 2 +- src/Tool/Command/ComposerBinPluginCommand.php | 2 +- src/Tool/Command/ComposerGlobalInstallCommand.php | 2 +- src/Tool/Command/ComposerGlobalMultiInstallCommand.php | 2 +- src/Tool/Command/ComposerInstallCommand.php | 2 +- src/Tool/Command/OptimisedComposerBinPluginCommand.php | 2 +- tests/Tool/Command/BoxBuildCommandTest.php | 2 +- tests/Tool/Command/ComposerInstallCommandTest.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Tool/Command/BoxBuildCommand.php b/src/Tool/Command/BoxBuildCommand.php index c6c43e2e..d2e0e8ce 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 compile && mv %s %s && chmod +x %s && cd && rm -rf %s', + 'git clone %s %s&& cd %s && git checkout %s && composer install --no-dev --prefer-dist -n && box compile && mv %s %s && chmod +x %s && cd && rm -rf %s', $this->repository, $this->targetDir(), $this->targetDir(), diff --git a/src/Tool/Command/ComposerBinPluginCommand.php b/src/Tool/Command/ComposerBinPluginCommand.php index 01145199..de66ceaa 100644 --- a/src/Tool/Command/ComposerBinPluginCommand.php +++ b/src/Tool/Command/ComposerBinPluginCommand.php @@ -22,7 +22,7 @@ public function __construct(string $package, string $namespace, Collection $link public function __toString(): string { - return \sprintf('composer global bin %s require --no-suggest --prefer-dist --update-no-dev -n %s%s', $this->namespace, $this->package, $this->linkCommand()); + return \sprintf('composer global bin %s require --prefer-dist --update-no-dev -n %s%s', $this->namespace, $this->package, $this->linkCommand()); } public function package(): string diff --git a/src/Tool/Command/ComposerGlobalInstallCommand.php b/src/Tool/Command/ComposerGlobalInstallCommand.php index b34aa836..1fef35c4 100644 --- a/src/Tool/Command/ComposerGlobalInstallCommand.php +++ b/src/Tool/Command/ComposerGlobalInstallCommand.php @@ -15,7 +15,7 @@ public function __construct(string $package) public function __toString(): string { - return \sprintf('composer global require --no-suggest --prefer-dist --update-no-dev -n %s', $this->package); + return \sprintf('composer global require --prefer-dist --update-no-dev -n %s', $this->package); } public function package(): string diff --git a/src/Tool/Command/ComposerGlobalMultiInstallCommand.php b/src/Tool/Command/ComposerGlobalMultiInstallCommand.php index 6b8c392b..1a2b1e70 100644 --- a/src/Tool/Command/ComposerGlobalMultiInstallCommand.php +++ b/src/Tool/Command/ComposerGlobalMultiInstallCommand.php @@ -27,6 +27,6 @@ public function __toString(): string return $command->package(); }, $this->commands->toArray())); - return \sprintf('composer global require --no-suggest --prefer-dist --update-no-dev -n %s', $packages); + return \sprintf('composer global require --prefer-dist --update-no-dev -n %s', $packages); } } diff --git a/src/Tool/Command/ComposerInstallCommand.php b/src/Tool/Command/ComposerInstallCommand.php index 9a8e646f..519c04c7 100644 --- a/src/Tool/Command/ComposerInstallCommand.php +++ b/src/Tool/Command/ComposerInstallCommand.php @@ -20,7 +20,7 @@ public function __construct(string $repository, string $targetDir, ?string $vers public function __toString(): string { return \sprintf( - 'git clone %s %s && cd %s && git checkout %s && composer install --no-dev --no-suggest --prefer-dist -n', + 'git clone %s %s && cd %s && git checkout %s && composer install --no-dev --prefer-dist -n', $this->repository, $this->targetDir, $this->targetDir, diff --git a/src/Tool/Command/OptimisedComposerBinPluginCommand.php b/src/Tool/Command/OptimisedComposerBinPluginCommand.php index 29ca3011..e7d0c62a 100644 --- a/src/Tool/Command/OptimisedComposerBinPluginCommand.php +++ b/src/Tool/Command/OptimisedComposerBinPluginCommand.php @@ -37,7 +37,7 @@ private function packagesGroupedByNamespace(): array private function commandToRun(string $namespace, array $packages): string { - return \sprintf('composer global bin %s require --no-suggest --prefer-dist --update-no-dev -n %s', $namespace, \implode(' ', $packages)); + return \sprintf('composer global bin %s require --prefer-dist --update-no-dev -n %s', $namespace, \implode(' ', $packages)); } private function commandsToRun(array $packagesGrouped): array diff --git a/tests/Tool/Command/BoxBuildCommandTest.php b/tests/Tool/Command/BoxBuildCommandTest.php index 8461e452..d095c848 100644 --- a/tests/Tool/Command/BoxBuildCommandTest.php +++ b/tests/Tool/Command/BoxBuildCommandTest.php @@ -44,7 +44,7 @@ public function test_it_generates_the_installation_command() $this->assertMatchesRegularExpression('#git clone '.self::REPOSITORY.'#', (string) $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('#composer install --no-dev --prefer-dist -n#', (string) $command); $this->assertMatchesRegularExpression('#box compile#', (string) $command); } diff --git a/tests/Tool/Command/ComposerInstallCommandTest.php b/tests/Tool/Command/ComposerInstallCommandTest.php index 0b860679..e9089fb4 100644 --- a/tests/Tool/Command/ComposerInstallCommandTest.php +++ b/tests/Tool/Command/ComposerInstallCommandTest.php @@ -25,7 +25,7 @@ public function test_it_generates_the_installation_command() $this->assertMatchesRegularExpression('#git clone '.self::REPOSITORY.'#', (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('#composer install --no-dev --prefer-dist -n#', (string) $command); } public function test_it_tries_to_guess_version_number_if_not_given_one() From 1ed4571eacfea470c34f18d38ac8865e7c5e1acd Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 23 May 2022 22:09:48 +0100 Subject: [PATCH 020/206] Install phplint with composer as phar has not been published since version 3 --- resources/linting.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/linting.json b/resources/linting.json index 90c35cd7..efe412d0 100644 --- a/resources/linting.json +++ b/resources/linting.json @@ -18,9 +18,10 @@ "summary": "Lints php files in parallel", "website": "https://github.com/overtrue/phplint", "command": { - "phive-install": { - "alias": "overtrue/phplint", - "bin": "%target-dir%/phplint" + "composer-bin-plugin": { + "package": "overtrue/phplint", + "namespace": "phplint", + "links": {"%target-dir%/phplint": "phplint"} } }, "test": "phplint -V", From a39dbedb7e21dd133a63c03bb1332801bf8e7b1b Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 30 Jun 2022 10:50:24 +0100 Subject: [PATCH 021/206] Add signature for box --- resources/pre-installation.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/pre-installation.json b/resources/pre-installation.json index c03056f7..7b8abc28 100644 --- a/resources/pre-installation.json +++ b/resources/pre-installation.json @@ -54,7 +54,8 @@ "command": { "phive-install": { "alias": "humbug/box", - "bin": "%target-dir%/box" + "bin": "%target-dir%/box", + "sig": "2DF45277AEF09A2F" } }, "test": "box list", From 8f46277a003c6fa0d436b580d7246cb5bc58a362 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Fri, 1 Jul 2022 21:19:22 +0100 Subject: [PATCH 022/206] Exclude the latest box on PHP 7.4 and 8.0 --- README.md | 3 ++- resources/pre-installation.json | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e4fff53d..b60d190a 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ 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 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ❌ | ❌ | ✅ | +| box-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ✅ | ✅ | | 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/) | ✅ | ✅ | ✅ | diff --git a/resources/pre-installation.json b/resources/pre-installation.json index 7b8abc28..02459c99 100644 --- a/resources/pre-installation.json +++ b/resources/pre-installation.json @@ -59,6 +59,20 @@ } }, "test": "box list", + "tags": ["pre-installation", "exclude-php:7.4", "exclude-php:8.0"] + }, + { + "name": "box-3", + "summary": "Fast, zero config application bundler with PHARs", + "website": "https://github.com/humbug/box", + "command": { + "phive-install": { + "alias": "humbug/box:^3.16", + "bin": "%target-dir%/box-3", + "sig": "2DF45277AEF09A2F" + } + }, + "test": "box-3 list", "tags": ["pre-installation"] } ] From 570300054bf47c9c7848fdf39d27fb894b86ae2a Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 4 Jul 2022 22:03:11 +0100 Subject: [PATCH 023/206] Replace the abandoned symplify/easy-coding-standard-prefixed --- resources/checkstyle.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/checkstyle.json b/resources/checkstyle.json index 992315a7..89b1bace 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -6,8 +6,8 @@ "website": "https://github.com/Symplify/EasyCodingStandard", "command": { "composer-bin-plugin": { - "package": "symplify/easy-coding-standard-prefixed", - "namespace": "tools", + "package": "symplify/easy-coding-standard", + "namespace": "ecs", "links": {"%target-dir%/ecs": "ecs"} } }, From 8abd0e8cc1a285eba171981981fd18b4908dfeb9 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 4 Jul 2022 22:05:13 +0100 Subject: [PATCH 024/206] Drop ecs from the PATH --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 24f12b24..fee7c5ad 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ test-min: update-min cs deptrac phpunit infection test-integration: build/toolbox.phar rm -rf ./build/tools && \ - export PATH="$(shell pwd)/build/tools:$(shell pwd)/build/tools/.composer/vendor/bin:$(shell pwd)/build/tools/QualityAnalyzer/bin:$(shell pwd)/build/tools/EasyCodingStandard/bin:$$PATH" && \ + export PATH="$(shell pwd)/build/tools:$(shell pwd)/build/tools/.composer/vendor/bin:$(shell pwd)/build/tools/QualityAnalyzer/bin:$$PATH" && \ export COMPOSER_HOME=$(shell pwd)/build/tools/.composer && \ chmod +x build/toolbox.phar && \ mkdir -p ./build/tools && \ From fb4038f5ecac833a6c744a70034fddfd3f4e5eea Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 6 Jul 2022 11:51:45 +0100 Subject: [PATCH 025/206] Allow the ocramius/package-versions plugin with roave-backward-compatibility-check --- resources/compatibility.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/compatibility.json b/resources/compatibility.json index ccb051d6..4ad290a4 100644 --- a/resources/compatibility.json +++ b/resources/compatibility.json @@ -18,6 +18,9 @@ "summary": "Tool to compare two revisions of a class API to check for BC breaks", "website": "https://github.com/Roave/BackwardCompatibilityCheck", "command": { + "sh": { + "command": "composer global bin roavebackwardcompatibilitycheck config allow-plugins.ocramius/package-versions true" + }, "composer-bin-plugin": { "package": "roave/backward-compatibility-check", "namespace": "roavebackwardcompatibilitycheck", From 753919923db067d4201137ad27b04b8acb81726a Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Fri, 8 Jul 2022 04:22:35 +0000 Subject: [PATCH 026/206] Update tools --- resources/test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/test.json b/resources/test.json index 240d8418..2b63cdce 100644 --- a/resources/test.json +++ b/resources/test.json @@ -6,7 +6,7 @@ "website": "http://behat.org/", "command": { "phar-download": { - "phar": "https://github.com/Behat/Behat/releases/download/v3.10.0/behat.phar", + "phar": "https://github.com/Behat/Behat/releases/download/v3.11.0/behat.phar", "bin": "%target-dir%/behat" } }, From f45c0125fc0aa0f21c18c387462dea3a9848e558 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Fri, 15 Jul 2022 20:27:55 +0100 Subject: [PATCH 027/206] Ensure boolean config options are not handled as strings --- resources/composer.json | 2 +- resources/pre-installation.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/composer.json b/resources/composer.json index acf9d513..c90f9837 100644 --- a/resources/composer.json +++ b/resources/composer.json @@ -6,7 +6,7 @@ "website": "https://github.com/ergebnis/composer-normalize", "command": { "sh": { - "command": "composer config --global allow-plugins.ergebnis/composer-normalize true" + "command": "composer config --global --json allow-plugins.ergebnis/composer-normalize true" }, "composer-global-install": { "package": "ergebnis/composer-normalize" diff --git a/resources/pre-installation.json b/resources/pre-installation.json index 02459c99..a6d8b630 100644 --- a/resources/pre-installation.json +++ b/resources/pre-installation.json @@ -38,7 +38,7 @@ "website": "https://github.com/bamarni/composer-bin-plugin", "command": { "sh": { - "command": "composer global config extra.bamarni-bin.bin-links false && composer config --global allow-plugins.bamarni/composer-bin-plugin true" + "command": "composer global config --json extra.bamarni-bin.bin-links false && composer config --global --json allow-plugins.bamarni/composer-bin-plugin true" }, "composer-global-install": { "package": "bamarni/composer-bin-plugin" From a44326d3b33672df507e157fe9427e204ca8825c Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 2 Aug 2022 23:18:26 +0200 Subject: [PATCH 028/206] Add phparkitect --- README.md | 1 + resources/architecture.json | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/README.md b/README.md index b60d190a..308742a9 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | 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) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | | phpbench | [PHP Benchmarking framework](https://github.com/phpbench/phpbench) | ✅ | ✅ | ✅ | | phpca | [Finds usage of non-built-in extensions](https://github.com/wapmorgan/PhpCodeAnalyzer) | ✅ | ✅ | ✅ | diff --git a/resources/architecture.json b/resources/architecture.json index 38e26815..7331cf63 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -55,6 +55,19 @@ "test": "php-coupling-detector list", "tags": ["architecture"] }, + { + "name": "phparkitect", + "summary": "Helps to put architectural constraints in a PHP code base", + "website": "https://github.com/phparkitect/arkitect", + "command": { + "phar-download": { + "phar": "https://github.com/phparkitect/arkitect/releases/latest/download/phparkitect.phar", + "bin": "%target-dir%/phparkitect" + } + }, + "test": "phparkitect --version", + "tags": ["architecture"] + }, { "name": "phpat", "summary": "Easy to use architecture testing tool", From 817270a1f393b2fd2ccff23115daff2a038d1548 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 3 Aug 2022 04:47:37 +0000 Subject: [PATCH 029/206] Update tools --- resources/architecture.json | 2 +- resources/pre-installation.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/architecture.json b/resources/architecture.json index 7331cf63..d84dea21 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -61,7 +61,7 @@ "website": "https://github.com/phparkitect/arkitect", "command": { "phar-download": { - "phar": "https://github.com/phparkitect/arkitect/releases/latest/download/phparkitect.phar", + "phar": "https://github.com/phparkitect/arkitect/releases/download/0.2.26/phparkitect.phar", "bin": "%target-dir%/phparkitect" } }, diff --git a/resources/pre-installation.json b/resources/pre-installation.json index a6d8b630..e7550f58 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.1/phive-0.15.1.phar.asc", + "url": "https://github.com/phar-io/phive/releases/download/0.15.2/phive-0.15.2.phar.asc", "file": "%target-dir%/phive.asc" }, "phar-download": { - "phar": "https://github.com/phar-io/phive/releases/download/0.15.1/phive-0.15.1.phar", + "phar": "https://github.com/phar-io/phive/releases/download/0.15.2/phive-0.15.2.phar", "bin": "%target-dir%/phive" }, "sh": { From 7e56a8a2dc18647279ad0bb5da12a7d584d1824e Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 4 Aug 2022 06:02:25 +0000 Subject: [PATCH 030/206] Update tools --- resources/architecture.json | 2 +- resources/pre-installation.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/architecture.json b/resources/architecture.json index 7331cf63..d84dea21 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -61,7 +61,7 @@ "website": "https://github.com/phparkitect/arkitect", "command": { "phar-download": { - "phar": "https://github.com/phparkitect/arkitect/releases/latest/download/phparkitect.phar", + "phar": "https://github.com/phparkitect/arkitect/releases/download/0.2.26/phparkitect.phar", "bin": "%target-dir%/phparkitect" } }, diff --git a/resources/pre-installation.json b/resources/pre-installation.json index a6d8b630..e7550f58 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.1/phive-0.15.1.phar.asc", + "url": "https://github.com/phar-io/phive/releases/download/0.15.2/phive-0.15.2.phar.asc", "file": "%target-dir%/phive.asc" }, "phar-download": { - "phar": "https://github.com/phar-io/phive/releases/download/0.15.1/phive-0.15.1.phar", + "phar": "https://github.com/phar-io/phive/releases/download/0.15.2/phive-0.15.2.phar", "bin": "%target-dir%/phive" }, "sh": { From 99ac0fa63b489a6ab3881ff771d25a43f7e97483 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 7 Aug 2022 04:01:43 +0000 Subject: [PATCH 031/206] Update tools --- resources/architecture.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/architecture.json b/resources/architecture.json index d84dea21..ed310574 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -61,7 +61,7 @@ "website": "https://github.com/phparkitect/arkitect", "command": { "phar-download": { - "phar": "https://github.com/phparkitect/arkitect/releases/download/0.2.26/phparkitect.phar", + "phar": "https://github.com/phparkitect/arkitect/releases/download/0.2.27/phparkitect.phar", "bin": "%target-dir%/phparkitect" } }, From cf06e7309c4dc23076482048bb8e2efde93ada0e Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 10 Aug 2022 09:40:17 +0200 Subject: [PATCH 032/206] Do not update a phar if the latest version is already used --- bin/devkit.php | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/devkit.php b/bin/devkit.php index ad3b7709..8926ab04 100755 --- a/bin/devkit.php +++ b/bin/devkit.php @@ -148,6 +148,7 @@ private function findLatestPharsCommand(string $jsonPath): Command { $command = <<<'CMD' grep -e 'github\.com.*releases.*\.phar"' %TOOLBOX_JSON% | + grep -v -e '/latest/' | sed -e 's@.*github.com/\(.*\)/releases.*@\1@' | xargs -I"{}" sh -c "curl -s -XGET 'https://api.github.com/repos/{}/releases/latest' -H 'Accept:application/json' | grep browser_download_url | grep .phar | head -n 1" | sed -e 's/^[^:]*: "\([^"]*\)"/\1/' From 242a7e52d44ed96cacd3fd35cf95b24808f1cbeb Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 10 Aug 2022 09:48:02 +0200 Subject: [PATCH 033/206] Force the 0.0.5 version of php-fuzzer since the latest phar is broken (0.0.6) --- resources/test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/test.json b/resources/test.json index 2b63cdce..d5c9d3a0 100644 --- a/resources/test.json +++ b/resources/test.json @@ -74,7 +74,7 @@ "website": "https://github.com/nikic/PHP-Fuzzer", "command": { "phive-install": { - "alias": "nikic/php-fuzzer", + "alias": "nikic/php-fuzzer:0.0.5", "bin": "%target-dir%/php-fuzzer" } }, From aec774fae0c256636ef5a0046bb1f4e981b1377d Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 10 Aug 2022 09:53:48 +0200 Subject: [PATCH 034/206] Always install the latest version of phparkitect --- resources/architecture.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/architecture.json b/resources/architecture.json index ed310574..7331cf63 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -61,7 +61,7 @@ "website": "https://github.com/phparkitect/arkitect", "command": { "phar-download": { - "phar": "https://github.com/phparkitect/arkitect/releases/download/0.2.27/phparkitect.phar", + "phar": "https://github.com/phparkitect/arkitect/releases/latest/download/phparkitect.phar", "bin": "%target-dir%/phparkitect" } }, From cfacd0f50f6183bb16ce1fee3e359e53eaa942b5 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 10 Aug 2022 10:22:22 +0200 Subject: [PATCH 035/206] Simplify installation instructions --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index 308742a9..5c0d6f81 100644 --- a/README.md +++ b/README.md @@ -116,11 +116,7 @@ Get the `toolbox.phar` from the [latest release](https://github.com/jakzal/toolb The command below should do the job: ```bash -curl -s https://api.github.com/repos/jakzal/toolbox/releases/latest \ - | grep "browser_download_url.*toolbox.phar" \ - | cut -d '"' -f 4 \ - | xargs curl -Ls -o toolbox \ - && chmod +x toolbox +curl -Ls https://github.com/jakzal/toolbox/releases/latest/download/toolbox.phar -o toolbox && chmod +x toolbox ``` ## Usage From 215d5a78f17b41f038c2d688e05fa3bddb72ca40 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 25 Aug 2022 20:28:13 +0100 Subject: [PATCH 036/206] Update the phpmd key --- resources/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/tools.json b/resources/tools.json index 919d1ee0..96ad5551 100644 --- a/resources/tools.json +++ b/resources/tools.json @@ -91,7 +91,7 @@ "phive-install": { "alias": "phpmd", "bin": "%target-dir%/phpmd", - "sig": "0F9684B8B16B7AB0" + "sig": "A4E55EA12C7C085C" } }, "test": "phpmd --version" From be4acf12c8802dd8b8b08c73f3f9adb7379c5a0b Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 25 Aug 2022 20:39:19 +0100 Subject: [PATCH 037/206] Allow Symfony 6.1 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 91e31f88..55db0f8a 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "type": "project", "require": { "php": "^7.4.7 || ~8.0.0 || ~8.1.0", - "symfony/console": "^4.4 || ^5.3", + "symfony/console": "^4.4 || ^5.4 || ^6.1", "psr/container": "^1.0" }, "require-dev": { From 10a665bfce8c494c27c0663eee10f225c42e3ec3 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 25 Aug 2022 20:41:50 +0100 Subject: [PATCH 038/206] Make the method definition compatible with Symfony 6 --- src/Cli/Application.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Cli/Application.php b/src/Cli/Application.php index 6bad5944..8fd96087 100644 --- a/src/Cli/Application.php +++ b/src/Cli/Application.php @@ -6,6 +6,7 @@ use Symfony\Component\Console\Application as CliApplication; use Symfony\Component\Console\CommandLoader\CommandLoaderInterface; use Symfony\Component\Console\CommandLoader\ContainerCommandLoader; +use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -34,7 +35,7 @@ public function doRun(InputInterface $input, OutputInterface $output) return parent::doRun($input, $output); } - protected function getDefaultInputDefinition() + protected function getDefaultInputDefinition(): InputDefinition { $definition = parent::getDefaultInputDefinition(); $definition->addOption(new InputOption('tools', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Path(s) to the list of tools. Can also be set with TOOLBOX_JSON environment variable.', $this->toolsJsonDefault())); From f6c083cae554e89d37165e1dd1e0c2424ec9c7f6 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 28 Aug 2022 21:22:54 +0100 Subject: [PATCH 039/206] Unlock php-fuzzer since the latest phar has been fixed --- resources/test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/test.json b/resources/test.json index d5c9d3a0..2b63cdce 100644 --- a/resources/test.json +++ b/resources/test.json @@ -74,7 +74,7 @@ "website": "https://github.com/nikic/PHP-Fuzzer", "command": { "phive-install": { - "alias": "nikic/php-fuzzer:0.0.5", + "alias": "nikic/php-fuzzer", "bin": "%target-dir%/php-fuzzer" } }, From e4785f527603117cb86c720f9ecf3a9554849dc5 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 25 Sep 2022 21:22:48 +0100 Subject: [PATCH 040/206] Change the phpat installation method to phpstan extension --- resources/architecture.json | 14 -------------- resources/phpstan.json | 13 +++++++++++++ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/resources/architecture.json b/resources/architecture.json index 7331cf63..e20a0261 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -68,20 +68,6 @@ "test": "phparkitect --version", "tags": ["architecture"] }, - { - "name": "phpat", - "summary": "Easy to use architecture testing tool", - "website": "https://github.com/carlosas/phpat", - "command": { - "composer-bin-plugin": { - "package": "phpat/phpat", - "namespace": "tools", - "links": {"%target-dir%/phpat": "phpat"} - } - }, - "test": "which phpat", - "tags": ["architecture"] - }, { "name": "phpda", "summary": "Generates dependency graphs", diff --git a/resources/phpstan.json b/resources/phpstan.json index 2f7ed4fc..5670b171 100644 --- a/resources/phpstan.json +++ b/resources/phpstan.json @@ -131,6 +131,19 @@ "test": "composer global bin phpstan show pepakriz/phpstan-exception-rules", "tags": ["phpstan"] }, + { + "name": "phpat", + "summary": "Easy to use architecture testing tool", + "website": "https://github.com/carlosas/phpat", + "command": { + "composer-bin-plugin": { + "package": "phpat/phpat", + "namespace": "phpstan" + } + }, + "test": "composer global bin phpstan show phpat/phpat", + "tags": ["phpstan", "architecture"] + }, { "name": "phpstan-larastan", "summary": "Separate installation of phpstan for larastan", From 8eac34ade280adb334d7299a5ab34721f9a0dd72 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 2 Nov 2022 21:00:34 +0100 Subject: [PATCH 041/206] Exclude deptrac on PHP 7.4 and 8.0 --- resources/architecture.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/architecture.json b/resources/architecture.json index e20a0261..c1074cb6 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -26,7 +26,7 @@ } }, "test": "deptrac list", - "tags": ["featured", "architecture"] + "tags": ["featured", "architecture", "exclude-php:7.4", "exclude-php:8.0"] }, { "name": "pdepend", From f05f9339e20eac71b549f8bbddf21537d97f55c6 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 2 Nov 2022 21:32:30 +0100 Subject: [PATCH 042/206] Bump actions/checkout --- .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 93c3af85..342b2aa8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: deps: low steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -62,7 +62,7 @@ jobs: php: [7.4, 8.0, 8.1] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup PHP uses: shivammathur/setup-php@v2 From 3b566a589684dcead3eadee5122b4357013cf3a4 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 2 Nov 2022 21:34:35 +0100 Subject: [PATCH 043/206] Bump JamesIves/github-pages-deploy-action --- .github/workflows/publish-website.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-website.yml b/.github/workflows/publish-website.yml index 71718396..5b170114 100644 --- a/.github/workflows/publish-website.yml +++ b/.github/workflows/publish-website.yml @@ -25,7 +25,7 @@ jobs: run: make package-devkit website - name: Publish the website - uses: JamesIves/github-pages-deploy-action@releases/v3 + uses: JamesIves/github-pages-deploy-action@v4 with: ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} BRANCH: gh-pages From 6b26bfa4e4c083fc64f06dfc6d7b64e94969a7c3 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 2 Nov 2022 21:34:40 +0100 Subject: [PATCH 044/206] Bump actions/checkout --- .github/workflows/publish-website.yml | 2 +- .github/workflows/update-phars.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-website.yml b/.github/workflows/publish-website.yml index 5b170114..9e956a1f 100644 --- a/.github/workflows/publish-website.yml +++ b/.github/workflows/publish-website.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest name: Build and publish steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: persist-credentials: false diff --git a/.github/workflows/update-phars.yml b/.github/workflows/update-phars.yml index cbf8433b..feaaee5d 100644 --- a/.github/workflows/update-phars.yml +++ b/.github/workflows/update-phars.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest name: Create a PR steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup PHP uses: shivammathur/setup-php@v2 From 23837107acbe931c22645e424c92f1803bbc79ff Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 30 Nov 2022 03:45:20 +0000 Subject: [PATCH 045/206] Update tools --- resources/test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/test.json b/resources/test.json index 2b63cdce..e4378bd8 100644 --- a/resources/test.json +++ b/resources/test.json @@ -6,7 +6,7 @@ "website": "http://behat.org/", "command": { "phar-download": { - "phar": "https://github.com/Behat/Behat/releases/download/v3.11.0/behat.phar", + "phar": "https://github.com/Behat/Behat/releases/download/v3.12.0/behat.phar", "bin": "%target-dir%/behat" } }, From ca0db216136e53dfd9d1d14b4bb28f6716451876 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Fri, 2 Dec 2022 16:22:27 +0000 Subject: [PATCH 046/206] Lock psalm version until plugins catch up with version 5 --- resources/psalm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/psalm.json b/resources/psalm.json index f21158f8..a837c9ee 100644 --- a/resources/psalm.json +++ b/resources/psalm.json @@ -6,7 +6,7 @@ "website": "https://psalm.dev/", "command": { "composer-bin-plugin": { - "package": "vimeo/psalm", + "package": "vimeo/psalm:~4.0", "namespace": "psalm", "links": { "%target-dir%/psalm": "psalm", From 4be9a3e4b499d77a16425d0a5f88ec9c484db3b3 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 12 Dec 2022 15:08:16 +0000 Subject: [PATCH 047/206] Update box on latest PHP versions --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index fee7c5ad..067aecc1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ default: build PHP_VERSION:=$(shell php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;') +IS_PHP81:=$(shell php -r 'echo (int)version_compare(PHP_VERSION, "8.1", ">=");') TOOLBOX_VERSION?=dev build: install test @@ -141,4 +142,8 @@ tools/deptrac: curl -Ls https://github.com/qossmic/deptrac/releases/download/0.18.0/deptrac.phar.asc -o tools/deptrac.asc tools/box: +ifeq ($(IS_PHP81),1) + curl -Ls https://github.com/humbug/box/releases/download/4.2.0/box.phar -o tools/box && chmod +x tools/box +else curl -Ls https://github.com/humbug/box/releases/download/3.15.0/box.phar -o tools/box && chmod +x tools/box +endif From 29051b30754cea806af65e75f71e5d9e14c1b76a Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 12 Dec 2022 15:12:57 +0000 Subject: [PATCH 048/206] Update deptrac on latest PHP versions --- Makefile | 9 ++++++-- depfile.yaml | 62 --------------------------------------------------- deptrac.yaml | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 64 deletions(-) delete mode 100644 depfile.yaml create mode 100644 deptrac.yaml diff --git a/Makefile b/Makefile index 067aecc1..56498883 100644 --- a/Makefile +++ b/Makefile @@ -138,8 +138,13 @@ tools/php-cs-fixer: curl -Ls https://cs.symfony.com/download/php-cs-fixer-v3.phar -o tools/php-cs-fixer && chmod +x tools/php-cs-fixer tools/deptrac: - curl -Ls https://github.com/qossmic/deptrac/releases/download/0.18.0/deptrac.phar -o tools/deptrac && chmod +x tools/deptrac - curl -Ls https://github.com/qossmic/deptrac/releases/download/0.18.0/deptrac.phar.asc -o tools/deptrac.asc +ifeq ($(IS_PHP81),1) + curl -Ls https://github.com/qossmic/deptrac/releases/download/1.0.2/deptrac.phar -o tools/deptrac && chmod +x tools/deptrac + curl -Ls https://github.com/qossmic/deptrac/releases/download/1.0.2/deptrac.phar.asc -o tools/deptrac.asc +else + curl -Ls https://github.com/qossmic/deptrac/releases/download/0.24.0/deptrac.phar -o tools/deptrac && chmod +x tools/deptrac + curl -Ls https://github.com/qossmic/deptrac/releases/download/0.24.0/deptrac.phar.asc -o tools/deptrac.asc +endif tools/box: ifeq ($(IS_PHP81),1) diff --git a/depfile.yaml b/depfile.yaml deleted file mode 100644 index a7ab9c03..00000000 --- a/depfile.yaml +++ /dev/null @@ -1,62 +0,0 @@ -paths: - - ./src -exclude_files: ~ -layers: - - name: Cli - collectors: - - type: className - regex: ^Zalas\\Toolbox\\Cli\\.* - - name: Json - collectors: - - type: className - regex: ^Zalas\\Toolbox\\Json\\.* - - name: Runner - collectors: - - type: className - regex: ^Zalas\\Toolbox\\Runner\\.* - - name: Tool - collectors: - - type: className - regex: ^Zalas\\Toolbox\\Tool\\.* - - name: UseCase - collectors: - - type: className - regex: ^Zalas\\Toolbox\\UseCase\\.* - - name: Psr Container - collectors: - - type: className - regex: ^Psr\\Container\\.* - - name: Symfony Console - collectors: - - type: className - regex: ^Symfony\\Component\\Console\\.* - - name: Other Vendors - collectors: - - type: bool - must: - # must be outside of global namespace - - type: className - regex: '[\\]+' - must_not: - # must not be one of the known vendors - - type: className - regex: ^Zalas\\Toolbox\\(Cli|Json|Runner|Tool|UseCase)\\.* - - type: className - regex: ^Psr\\Container\\.* - - type: className - regex: ^Symfony\\Component\\Console\\.* -ruleset: - Cli: - - Tool - - Json - - Runner - - UseCase - - Symfony Console - - Psr Container - Json: - - Tool - Runner: - - Tool - Tool: - UseCase: - - Tool diff --git a/deptrac.yaml b/deptrac.yaml new file mode 100644 index 00000000..99dfe48c --- /dev/null +++ b/deptrac.yaml @@ -0,0 +1,63 @@ +parameters: + paths: + - ./src + exclude_files: [] + layers: + - name: Cli + collectors: + - type: className + regex: ^Zalas\\Toolbox\\Cli\\.* + - name: Json + collectors: + - type: className + regex: ^Zalas\\Toolbox\\Json\\.* + - name: Runner + collectors: + - type: className + regex: ^Zalas\\Toolbox\\Runner\\.* + - name: Tool + collectors: + - type: className + regex: ^Zalas\\Toolbox\\Tool\\.* + - name: UseCase + collectors: + - type: className + regex: ^Zalas\\Toolbox\\UseCase\\.* + - name: Psr Container + collectors: + - type: className + regex: ^Psr\\Container\\.* + - name: Symfony Console + collectors: + - type: className + regex: ^Symfony\\Component\\Console\\.* + - name: Other Vendors + collectors: + - type: bool + must: + # must be outside of global namespace + - type: className + regex: '[\\]+' + must_not: + # must not be one of the known vendors + - type: className + regex: ^Zalas\\Toolbox\\(Cli|Json|Runner|Tool|UseCase)\\.* + - type: className + regex: ^Psr\\Container\\.* + - type: className + regex: ^Symfony\\Component\\Console\\.* + ruleset: + Cli: + - Tool + - Json + - Runner + - UseCase + - Symfony Console + - Psr Container + Json: + - Tool + Runner: + - Tool + Tool: + UseCase: + - Tool From 2c358bc7579d36d269f7386e9a804bc678cf77d5 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 12 Dec 2022 15:32:23 +0000 Subject: [PATCH 049/206] Enable PHP 8.2 support --- .github/workflows/build.yml | 4 ++-- composer.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 342b2aa8..cb942bc3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: name: Build and test strategy: matrix: - php: [7.4, 8.0, 8.1] + php: [7.4, 8.0, 8.1, 8.2] deps: [high] include: - php: 7.4 @@ -59,7 +59,7 @@ jobs: needs: tests strategy: matrix: - php: [7.4, 8.0, 8.1] + php: [7.4, 8.0, 8.1, 8.2] steps: - uses: actions/checkout@v3 diff --git a/composer.json b/composer.json index 55db0f8a..33c69425 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Helps to discover and install tools", "type": "project", "require": { - "php": "^7.4.7 || ~8.0.0 || ~8.1.0", + "php": "^7.4.7 || ~8.0.0 || ~8.1.0 || ~8.2.0", "symfony/console": "^4.4 || ^5.4 || ^6.1", "psr/container": "^1.0" }, From 806ee42d64be44d2c7e9a23cb1e3542d1cda887b Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 12 Dec 2022 15:37:22 +0000 Subject: [PATCH 050/206] Update the list of tools with PHP 8.2 support --- README.md | 160 ++++++++++++++++++------------------ bin/devkit.php | 9 +- resources/architecture.json | 2 +- resources/metrics.json | 2 +- resources/test.json | 4 +- 5 files changed, 89 insertions(+), 88 deletions(-) diff --git a/README.md b/README.md index 5c0d6f81..812bc97f 100644 --- a/README.md +++ b/README.md @@ -14,86 +14,86 @@ It has been extracted as a separate project to make maintenance easier and enabl ## Available tools -| Name | Description | PHP 7.4 | PHP 8.0 | PHP 8.1 -| :--- | :---------- | :------ | :------ | :------ -| 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-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ✅ | ✅ | -| 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/) | ✅ | ✅ | ✅ | -| composer-bin-plugin | [Composer plugin to install bin vendors in isolated locations](https://github.com/bamarni/composer-bin-plugin) | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | -| composer-unused | [Show unused packages by scanning your code](https://github.com/icanhazstring/composer-unused) | ✅ | ✅ | ✅ | -| dephpend | [Detect flaws in your architecture](https://dephpend.com/) | ✅ | ✅ | ✅ | -| deprecation-detector | [Finds usages of deprecated code](https://github.com/sensiolabs-de/deprecation-detector) | ✅ | ✅ | ✅ | -| deptrac | [Enforces dependency rules between software layers](https://github.com/qossmic/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) | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | -| 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/) | ✅ | ✅ | ✅ | -| phan | [Static Analysis Tool](https://github.com/phan/phan) | ✅ | ✅ | ✅ | -| 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-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) | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | -| phpbench | [PHP Benchmarking framework](https://github.com/phpbench/phpbench) | ✅ | ✅ | ✅ | -| phpca | [Finds usage of non-built-in extensions](https://github.com/wapmorgan/PhpCodeAnalyzer) | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | -| phpda | [Generates dependency graphs](https://mamuz.github.io/PhpDependencyAnalysis/) | ✅ | ✅ | ❌ | -| phpdd | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector) | ✅ | ✅ | ✅ | -| phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ✅ | ✅ | ✅ | -| phpinsights | [Analyses code quality, style, architecture and complexity](https://phpinsights.com/) | ✅ | ✅ | ✅ | -| phplint | [Lints php files in parallel](https://github.com/overtrue/phplint) | ✅ | ✅ | ✅ | -| phploc | [A tool for quickly measuring the size of a PHP project](https://github.com/sebastianbergmann/phploc) | ✅ | ✅ | ✅ | -| 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/) | ✅ | ✅ | ✅ | -| phpstan | [Static Analysis Tool](https://github.com/phpstan/phpstan) | ✅ | ✅ | ✅ | -| phpstan-beberlei-assert | [PHPStan extension for beberlei/assert](https://github.com/phpstan/phpstan-beberlei-assert) | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | -| phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | ✅ | -| phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | -| phpunit | [The PHP testing framework](https://phpunit.de/) | ✅ | ✅ | ✅ | -| phpunit-5 | [The PHP testing framework (5.x version)](https://phpunit.de/) | ✅ | ❌ | ❌ | -| phpunit-7 | [The PHP testing framework (7.x version)](https://phpunit.de/) | ✅ | ❌ | ❌ | -| phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | -| psalm | [Finds errors in PHP applications](https://psalm.dev/) | ✅ | ✅ | ✅ | -| psalm-plugin-doctrine | [Stubs to let Psalm understand Doctrine better](https://github.com/weirdan/doctrine-psalm-plugin) | ✅ | ✅ | ✅ | -| psalm-plugin-phpunit | [Psalm plugin for PHPUnit](https://github.com/psalm/psalm-plugin-phpunit) | ✅ | ✅ | ✅ | -| psalm-plugin-symfony | [Psalm Plugin for Symfony](https://github.com/psalm/psalm-plugin-symfony) | ✅ | ✅ | ✅ | -| psecio-parse | [Scans code for potential security-related issues](https://github.com/psecio/parse) | ✅ | ✅ | ✅ | -| rector | [Tool for instant code upgrades and refactoring](https://github.com/rectorphp/rector) | ✅ | ✅ | ✅ | -| roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ✅ | ✅ | -| simple-phpunit | [Provides utilities to report legacy tests and usage of deprecated code](https://symfony.com/doc/current/components/phpunit_bridge.html) | ✅ | ✅ | ✅ | -| twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | ✅ | -| twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | ✅ | -| twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | ✅ | -| yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ✅ | ✅ | ✅ | +| Name | Description | PHP 7.4 | PHP 8.0 | PHP 8.1 | PHP 8.2 +| :--- | :---------- | :------ | :------ | :------ | :------ +| 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-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ✅ | ✅ | ✅ | +| 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/) | ✅ | ✅ | ✅ | ✅ | +| composer-bin-plugin | [Composer plugin to install bin vendors in isolated locations](https://github.com/bamarni/composer-bin-plugin) | ✅ | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | ✅ | +| composer-unused | [Show unused packages by scanning your code](https://github.com/icanhazstring/composer-unused) | ✅ | ✅ | ✅ | ✅ | +| dephpend | [Detect flaws in your architecture](https://dephpend.com/) | ✅ | ✅ | ✅ | ✅ | +| deprecation-detector | [Finds usages of deprecated code](https://github.com/sensiolabs-de/deprecation-detector) | ✅ | ✅ | ✅ | ✅ | +| deptrac | [Enforces dependency rules between software layers](https://github.com/qossmic/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) | ✅ | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | ✅ | +| 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/) | ✅ | ✅ | ✅ | ✅ | +| phan | [Static Analysis Tool](https://github.com/phan/phan) | ✅ | ✅ | ✅ | ✅ | +| 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-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) | ✅ | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | ✅ | +| phpbench | [PHP Benchmarking framework](https://github.com/phpbench/phpbench) | ✅ | ✅ | ✅ | ✅ | +| phpca | [Finds usage of non-built-in extensions](https://github.com/wapmorgan/PhpCodeAnalyzer) | ✅ | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | ✅ | +| phpda | [Generates dependency graphs](https://mamuz.github.io/PhpDependencyAnalysis/) | ✅ | ✅ | ❌ | ❌ | +| phpdd | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector) | ✅ | ✅ | ✅ | ✅ | +| phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ✅ | ✅ | ✅ | ✅ | +| phpinsights | [Analyses code quality, style, architecture and complexity](https://phpinsights.com/) | ✅ | ✅ | ✅ | ✅ | +| phplint | [Lints php files in parallel](https://github.com/overtrue/phplint) | ✅ | ✅ | ✅ | ✅ | +| phploc | [A tool for quickly measuring the size of a PHP project](https://github.com/sebastianbergmann/phploc) | ✅ | ✅ | ✅ | ✅ | +| 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/) | ✅ | ✅ | ✅ | ✅ | +| phpstan | [Static Analysis Tool](https://github.com/phpstan/phpstan) | ✅ | ✅ | ✅ | ✅ | +| phpstan-beberlei-assert | [PHPStan extension for beberlei/assert](https://github.com/phpstan/phpstan-beberlei-assert) | ✅ | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | ✅ | +| phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | ✅ | ✅ | +| phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | ✅ | +| phpunit | [The PHP testing framework](https://phpunit.de/) | ✅ | ✅ | ✅ | ✅ | +| phpunit-5 | [The PHP testing framework (5.x version)](https://phpunit.de/) | ✅ | ❌ | ❌ | ❌ | +| phpunit-7 | [The PHP testing framework (7.x version)](https://phpunit.de/) | ✅ | ❌ | ❌ | ❌ | +| phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | ✅ | +| psalm | [Finds errors in PHP applications](https://psalm.dev/) | ✅ | ✅ | ✅ | ✅ | +| psalm-plugin-doctrine | [Stubs to let Psalm understand Doctrine better](https://github.com/weirdan/doctrine-psalm-plugin) | ✅ | ✅ | ✅ | ✅ | +| psalm-plugin-phpunit | [Psalm plugin for PHPUnit](https://github.com/psalm/psalm-plugin-phpunit) | ✅ | ✅ | ✅ | ✅ | +| psalm-plugin-symfony | [Psalm Plugin for Symfony](https://github.com/psalm/psalm-plugin-symfony) | ✅ | ✅ | ✅ | ✅ | +| psecio-parse | [Scans code for potential security-related issues](https://github.com/psecio/parse) | ✅ | ✅ | ✅ | ✅ | +| rector | [Tool for instant code upgrades and refactoring](https://github.com/rectorphp/rector) | ✅ | ✅ | ✅ | ✅ | +| roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ✅ | ✅ | ✅ | +| simple-phpunit | [Provides utilities to report legacy tests and usage of deprecated code](https://symfony.com/doc/current/components/phpunit_bridge.html) | ✅ | ✅ | ✅ | ✅ | +| twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | ✅ | ✅ | +| twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | ✅ | ✅ | +| twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | ✅ | ✅ | +| yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ✅ | ✅ | ✅ | ✅ | ### Removed tools diff --git a/bin/devkit.php b/bin/devkit.php index 8926ab04..35ce1be9 100755 --- a/bin/devkit.php +++ b/bin/devkit.php @@ -73,19 +73,20 @@ protected function execute(InputInterface $input, OutputInterface $output) $readmePath = $input->getOption('readme'); $tools = $this->loadTools($jsonPath); - $toolsList = '| Name | Description | PHP 7.4 | PHP 8.0 | PHP 8.1' . PHP_EOL; - $toolsList .= '| :--- | :---------- | :------ | :------ | :------' . PHP_EOL; + $toolsList = '| Name | Description | PHP 7.4 | PHP 8.0 | PHP 8.1 | PHP 8.2' . PHP_EOL; + $toolsList .= '| :--- | :---------- | :------ | :------ | :------ | :------' . PHP_EOL; $toolsList .= $tools->sort(function (Tool $left, Tool $right) { return strcasecmp($left->name(), $right->name()); })->reduce('', function ($acc, Tool $tool) { - return $acc . sprintf('| %s | [%s](%s) | %s | %s | %s |', + return $acc . sprintf('| %s | [%s](%s) | %s | %s | %s | %s |', $tool->name(), $tool->summary(), $tool->website(), in_array('exclude-php:7.4', $tool->tags(), true) ? '❌' : '✅' , in_array('exclude-php:8.0', $tool->tags(), true) ? '❌' : '✅', - in_array('exclude-php:8.1', $tool->tags(), true) ? '❌' : '✅' + in_array('exclude-php:8.1', $tool->tags(), true) ? '❌' : '✅', + in_array('exclude-php:8.2', $tool->tags(), true) ? '❌' : '✅' ) . PHP_EOL; }); diff --git a/resources/architecture.json b/resources/architecture.json index c1074cb6..bcd45b73 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -80,7 +80,7 @@ } }, "test": "phpda list", - "tags": ["exclude-php:8.1", "featured", "architecture"] + "tags": ["exclude-php:8.2", "exclude-php:8.1", "featured", "architecture"] } ] } diff --git a/resources/metrics.json b/resources/metrics.json index 4b27785e..06cec671 100644 --- a/resources/metrics.json +++ b/resources/metrics.json @@ -11,7 +11,7 @@ } }, "test": "analyze list", - "tags": ["exclude-php:8.1", "exclude-php:8.0", "metrics"] + "tags": ["exclude-php:8.2", "exclude-php:8.1", "exclude-php:8.0", "metrics"] }, { "name": "phpinsights", diff --git a/resources/test.json b/resources/test.json index e4378bd8..528008f6 100644 --- a/resources/test.json +++ b/resources/test.json @@ -134,7 +134,7 @@ } }, "test": "phpunit-7 --version", - "tags": ["exclude-php:8.1", "exclude-php:8.0", "test"] + "tags": ["exclude-php:8.2", "exclude-php:8.1", "exclude-php:8.0", "test"] }, { "name": "phpunit-5", @@ -148,7 +148,7 @@ } }, "test": "phpunit-5 --version", - "tags": ["exclude-php:8.1", "exclude-php:8.0", "test"] + "tags": ["exclude-php:8.2", "exclude-php:8.1", "exclude-php:8.0", "test"] }, { "name": "simple-phpunit", From aa9facf5f494e47b46585a5fe6b45ad043b0f1c3 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 12 Dec 2022 15:47:07 +0000 Subject: [PATCH 051/206] Disable php-cs-fixer on PHP 8.2 --- README.md | 2 +- resources/checkstyle.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 812bc97f..0cdd6233 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | phan | [Static Analysis Tool](https://github.com/phan/phan) | ✅ | ✅ | ✅ | ✅ | | 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-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 89b1bace..f8eff8ad 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -26,7 +26,7 @@ } }, "test": "php-cs-fixer list", - "tags": ["featured", "checkstyle"] + "tags": ["exclude-php:8.2", "featured", "checkstyle"] }, { "name": "phpcbf", From 5ecf05343b84e1f603090859205bcf49aa3e7637 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 12 Dec 2022 15:53:48 +0000 Subject: [PATCH 052/206] Disable phpspec 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 0cdd6233..a765f635 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,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-beberlei-assert | [PHPStan extension for beberlei/assert](https://github.com/phpstan/phpstan-beberlei-assert) | ✅ | ✅ | ✅ | ✅ | | phpstan-deprecation-rules | [PHPStan rules for detecting deprecated code](https://github.com/phpstan/phpstan-deprecation-rules) | ✅ | ✅ | ✅ | ✅ | diff --git a/resources/test.json b/resources/test.json index 528008f6..031dcc4d 100644 --- a/resources/test.json +++ b/resources/test.json @@ -92,7 +92,7 @@ } }, "test": "phpspec --version", - "tags": ["featured", "test"] + "tags": ["exclude-php:8.2", "featured", "test"] }, { "name": "phpunit", From 8cf50ba73a6b7fd8246fb440ea5a6990999bb83b Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 12 Dec 2022 20:40:42 +0000 Subject: [PATCH 053/206] Exclude box-3 on PHP 8.2 --- README.md | 2 +- resources/pre-installation.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a765f635..a9266a9e 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ 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-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ✅ | ✅ | ✅ | +| box-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ✅ | ✅ | ❌ | | 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/) | ✅ | ✅ | ✅ | ✅ | diff --git a/resources/pre-installation.json b/resources/pre-installation.json index e7550f58..200b3e8e 100644 --- a/resources/pre-installation.json +++ b/resources/pre-installation.json @@ -73,7 +73,7 @@ } }, "test": "box-3 list", - "tags": ["pre-installation"] + "tags": ["exclude-php:8.2", "pre-installation"] } ] } From 3d924ede0bab4e4cb8c1e49bb086c24010ed2f0a Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 12 Dec 2022 22:04:01 +0000 Subject: [PATCH 054/206] Drop PHP 7.4 support --- .github/workflows/build.yml | 10 +- .github/workflows/publish-website.yml | 2 +- .github/workflows/update-phars.yml | 2 +- Makefile | 4 +- README.md | 160 +++++++++++++------------- bin/devkit.php | 7 +- composer.json | 2 +- resources/architecture.json | 2 +- resources/composer.json | 2 +- resources/pre-installation.json | 2 +- resources/test.json | 2 +- 11 files changed, 97 insertions(+), 98 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cb942bc3..1250f0ba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,10 +18,10 @@ jobs: name: Build and test strategy: matrix: - php: [7.4, 8.0, 8.1, 8.2] + php: [8.0, 8.1, 8.2] deps: [high] include: - - php: 7.4 + - php: 8.0 deps: low steps: @@ -42,13 +42,13 @@ jobs: run: make update-min test-min - uses: actions/upload-artifact@v1 - if: matrix.php == '7.4' && matrix.deps == 'high' + if: matrix.php == '8.0' && matrix.deps == 'high' with: name: toolbox.phar path: build/toolbox.phar - uses: actions/upload-artifact@v1 - if: matrix.php == '7.4' && matrix.deps == 'high' + if: matrix.php == '8.0' && matrix.deps == 'high' with: name: devkit.phar path: build/devkit.phar @@ -59,7 +59,7 @@ jobs: needs: tests strategy: matrix: - php: [7.4, 8.0, 8.1, 8.2] + php: [8.0, 8.1, 8.2] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/publish-website.yml b/.github/workflows/publish-website.yml index 9e956a1f..1f87cc89 100644 --- a/.github/workflows/publish-website.yml +++ b/.github/workflows/publish-website.yml @@ -18,7 +18,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: "7.4" + php-version: "8.0" ini-values: "phar.readonly=0" - name: Build the website diff --git a/.github/workflows/update-phars.yml b/.github/workflows/update-phars.yml index feaaee5d..50d25efd 100644 --- a/.github/workflows/update-phars.yml +++ b/.github/workflows/update-phars.yml @@ -13,7 +13,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: "7.4" + php-version: "8.0" ini-values: "phar.readonly=0" - name: Configure git diff --git a/Makefile b/Makefile index 56498883..35386d75 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ package: tools/box sed -e 's/Application('"'"'dev/Application('"'"'$(TOOLBOX_VERSION)/g' bin/toolbox.php > build/phar/bin/toolbox.php cd build/phar && \ - composer config platform.php 7.4.7 && \ + composer config platform.php 8.0.0 && \ composer update --no-dev -o -a tools/box compile @@ -84,7 +84,7 @@ package-devkit: tools/box sed -e 's/\(Application(.*\)'"'"'dev/\1'"'"'$(TOOLBOX_VERSION)/g' bin/devkit.php > build/devkit-phar/bin/devkit.php cd build/devkit-phar && \ - composer config platform.php 7.4.7 && \ + composer config platform.php 8.0.0 && \ composer update --no-dev -o -a tools/box compile -c box-devkit.json.dist diff --git a/README.md b/README.md index a9266a9e..dcf1550c 100644 --- a/README.md +++ b/README.md @@ -14,86 +14,86 @@ It has been extracted as a separate project to make maintenance easier and enabl ## Available tools -| Name | Description | PHP 7.4 | PHP 8.0 | PHP 8.1 | PHP 8.2 -| :--- | :---------- | :------ | :------ | :------ | :------ -| 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-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ✅ | ✅ | ❌ | -| 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/) | ✅ | ✅ | ✅ | ✅ | -| composer-bin-plugin | [Composer plugin to install bin vendors in isolated locations](https://github.com/bamarni/composer-bin-plugin) | ✅ | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | ✅ | -| composer-unused | [Show unused packages by scanning your code](https://github.com/icanhazstring/composer-unused) | ✅ | ✅ | ✅ | ✅ | -| dephpend | [Detect flaws in your architecture](https://dephpend.com/) | ✅ | ✅ | ✅ | ✅ | -| deprecation-detector | [Finds usages of deprecated code](https://github.com/sensiolabs-de/deprecation-detector) | ✅ | ✅ | ✅ | ✅ | -| deptrac | [Enforces dependency rules between software layers](https://github.com/qossmic/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) | ✅ | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | ✅ | -| 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/) | ✅ | ✅ | ✅ | ✅ | -| phan | [Static Analysis Tool](https://github.com/phan/phan) | ✅ | ✅ | ✅ | ✅ | -| 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-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) | ✅ | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | ✅ | -| phpbench | [PHP Benchmarking framework](https://github.com/phpbench/phpbench) | ✅ | ✅ | ✅ | ✅ | -| phpca | [Finds usage of non-built-in extensions](https://github.com/wapmorgan/PhpCodeAnalyzer) | ✅ | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | ✅ | -| phpda | [Generates dependency graphs](https://mamuz.github.io/PhpDependencyAnalysis/) | ✅ | ✅ | ❌ | ❌ | -| phpdd | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector) | ✅ | ✅ | ✅ | ✅ | -| phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ✅ | ✅ | ✅ | ✅ | -| phpinsights | [Analyses code quality, style, architecture and complexity](https://phpinsights.com/) | ✅ | ✅ | ✅ | ✅ | -| phplint | [Lints php files in parallel](https://github.com/overtrue/phplint) | ✅ | ✅ | ✅ | ✅ | -| phploc | [A tool for quickly measuring the size of a PHP project](https://github.com/sebastianbergmann/phploc) | ✅ | ✅ | ✅ | ✅ | -| 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/) | ✅ | ✅ | ✅ | ❌ | -| phpstan | [Static Analysis Tool](https://github.com/phpstan/phpstan) | ✅ | ✅ | ✅ | ✅ | -| phpstan-beberlei-assert | [PHPStan extension for beberlei/assert](https://github.com/phpstan/phpstan-beberlei-assert) | ✅ | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | ✅ | -| phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | ✅ | ✅ | -| phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | ✅ | -| phpunit | [The PHP testing framework](https://phpunit.de/) | ✅ | ✅ | ✅ | ✅ | -| phpunit-5 | [The PHP testing framework (5.x version)](https://phpunit.de/) | ✅ | ❌ | ❌ | ❌ | -| phpunit-7 | [The PHP testing framework (7.x version)](https://phpunit.de/) | ✅ | ❌ | ❌ | ❌ | -| phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | ✅ | -| psalm | [Finds errors in PHP applications](https://psalm.dev/) | ✅ | ✅ | ✅ | ✅ | -| psalm-plugin-doctrine | [Stubs to let Psalm understand Doctrine better](https://github.com/weirdan/doctrine-psalm-plugin) | ✅ | ✅ | ✅ | ✅ | -| psalm-plugin-phpunit | [Psalm plugin for PHPUnit](https://github.com/psalm/psalm-plugin-phpunit) | ✅ | ✅ | ✅ | ✅ | -| psalm-plugin-symfony | [Psalm Plugin for Symfony](https://github.com/psalm/psalm-plugin-symfony) | ✅ | ✅ | ✅ | ✅ | -| psecio-parse | [Scans code for potential security-related issues](https://github.com/psecio/parse) | ✅ | ✅ | ✅ | ✅ | -| rector | [Tool for instant code upgrades and refactoring](https://github.com/rectorphp/rector) | ✅ | ✅ | ✅ | ✅ | -| roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ✅ | ✅ | ✅ | -| simple-phpunit | [Provides utilities to report legacy tests and usage of deprecated code](https://symfony.com/doc/current/components/phpunit_bridge.html) | ✅ | ✅ | ✅ | ✅ | -| twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | ✅ | ✅ | -| twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | ✅ | ✅ | -| twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | ✅ | ✅ | -| yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ✅ | ✅ | ✅ | ✅ | +| Name | Description | PHP 8.0 | PHP 8.1 | PHP 8.2 | +| :--- | :---------- | :------ | :------ | :------ | +| 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-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ✅ | ❌ | +| 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/) | ✅ | ✅ | ✅ | +| composer-bin-plugin | [Composer plugin to install bin vendors in isolated locations](https://github.com/bamarni/composer-bin-plugin) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| composer-unused | [Show unused packages by scanning your code](https://github.com/icanhazstring/composer-unused) | ✅ | ✅ | ✅ | +| dephpend | [Detect flaws in your architecture](https://dephpend.com/) | ✅ | ✅ | ✅ | +| deprecation-detector | [Finds usages of deprecated code](https://github.com/sensiolabs-de/deprecation-detector) | ✅ | ✅ | ✅ | +| deptrac | [Enforces dependency rules between software layers](https://github.com/qossmic/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) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| 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/) | ✅ | ✅ | ✅ | +| phan | [Static Analysis Tool](https://github.com/phan/phan) | ✅ | ✅ | ✅ | +| 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-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) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| phpbench | [PHP Benchmarking framework](https://github.com/phpbench/phpbench) | ✅ | ✅ | ✅ | +| phpca | [Finds usage of non-built-in extensions](https://github.com/wapmorgan/PhpCodeAnalyzer) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| phpda | [Generates dependency graphs](https://mamuz.github.io/PhpDependencyAnalysis/) | ✅ | ❌ | ❌ | +| phpdd | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector) | ✅ | ✅ | ✅ | +| phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ✅ | ✅ | ✅ | +| phpinsights | [Analyses code quality, style, architecture and complexity](https://phpinsights.com/) | ✅ | ✅ | ✅ | +| phplint | [Lints php files in parallel](https://github.com/overtrue/phplint) | ✅ | ✅ | ✅ | +| phploc | [A tool for quickly measuring the size of a PHP project](https://github.com/sebastianbergmann/phploc) | ✅ | ✅ | ✅ | +| 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/) | ✅ | ✅ | ❌ | +| phpstan | [Static Analysis Tool](https://github.com/phpstan/phpstan) | ✅ | ✅ | ✅ | +| phpstan-beberlei-assert | [PHPStan extension for beberlei/assert](https://github.com/phpstan/phpstan-beberlei-assert) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | ✅ | +| phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | +| phpunit | [The PHP testing framework](https://phpunit.de/) | ✅ | ✅ | ✅ | +| phpunit-5 | [The PHP testing framework (5.x version)](https://phpunit.de/) | ❌ | ❌ | ❌ | +| phpunit-7 | [The PHP testing framework (7.x version)](https://phpunit.de/) | ❌ | ❌ | ❌ | +| phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | +| psalm | [Finds errors in PHP applications](https://psalm.dev/) | ✅ | ✅ | ✅ | +| psalm-plugin-doctrine | [Stubs to let Psalm understand Doctrine better](https://github.com/weirdan/doctrine-psalm-plugin) | ✅ | ✅ | ✅ | +| psalm-plugin-phpunit | [Psalm plugin for PHPUnit](https://github.com/psalm/psalm-plugin-phpunit) | ✅ | ✅ | ✅ | +| psalm-plugin-symfony | [Psalm Plugin for Symfony](https://github.com/psalm/psalm-plugin-symfony) | ✅ | ✅ | ✅ | +| psecio-parse | [Scans code for potential security-related issues](https://github.com/psecio/parse) | ✅ | ✅ | ✅ | +| rector | [Tool for instant code upgrades and refactoring](https://github.com/rectorphp/rector) | ✅ | ✅ | ✅ | +| roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ✅ | ✅ | +| simple-phpunit | [Provides utilities to report legacy tests and usage of deprecated code](https://symfony.com/doc/current/components/phpunit_bridge.html) | ✅ | ✅ | ✅ | +| twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | ✅ | +| twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | ✅ | +| twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | ✅ | +| yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ✅ | ✅ | ✅ | ### Removed tools diff --git a/bin/devkit.php b/bin/devkit.php index 35ce1be9..ff870c03 100755 --- a/bin/devkit.php +++ b/bin/devkit.php @@ -73,17 +73,16 @@ protected function execute(InputInterface $input, OutputInterface $output) $readmePath = $input->getOption('readme'); $tools = $this->loadTools($jsonPath); - $toolsList = '| Name | Description | PHP 7.4 | PHP 8.0 | PHP 8.1 | PHP 8.2' . PHP_EOL; - $toolsList .= '| :--- | :---------- | :------ | :------ | :------ | :------' . PHP_EOL; + $toolsList = '| Name | Description | PHP 8.0 | PHP 8.1 | PHP 8.2 |' . PHP_EOL; + $toolsList .= '| :--- | :---------- | :------ | :------ | :------ |' . PHP_EOL; $toolsList .= $tools->sort(function (Tool $left, Tool $right) { return strcasecmp($left->name(), $right->name()); })->reduce('', function ($acc, Tool $tool) { - return $acc . sprintf('| %s | [%s](%s) | %s | %s | %s | %s |', + return $acc . sprintf('| %s | [%s](%s) | %s | %s | %s |', $tool->name(), $tool->summary(), $tool->website(), - in_array('exclude-php:7.4', $tool->tags(), true) ? '❌' : '✅' , in_array('exclude-php:8.0', $tool->tags(), true) ? '❌' : '✅', in_array('exclude-php:8.1', $tool->tags(), true) ? '❌' : '✅', in_array('exclude-php:8.2', $tool->tags(), true) ? '❌' : '✅' diff --git a/composer.json b/composer.json index 33c69425..9c1be361 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Helps to discover and install tools", "type": "project", "require": { - "php": "^7.4.7 || ~8.0.0 || ~8.1.0 || ~8.2.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "symfony/console": "^4.4 || ^5.4 || ^6.1", "psr/container": "^1.0" }, diff --git a/resources/architecture.json b/resources/architecture.json index bcd45b73..343fb1af 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -26,7 +26,7 @@ } }, "test": "deptrac list", - "tags": ["featured", "architecture", "exclude-php:7.4", "exclude-php:8.0"] + "tags": ["featured", "architecture", "exclude-php:8.0"] }, { "name": "pdepend", diff --git a/resources/composer.json b/resources/composer.json index c90f9837..d6807008 100644 --- a/resources/composer.json +++ b/resources/composer.json @@ -41,7 +41,7 @@ } }, "test": "composer-require-checker -V", - "tags": ["composer", "exclude-php:7.4"] + "tags": ["composer"] }, { "name": "composer-require-checker-3", diff --git a/resources/pre-installation.json b/resources/pre-installation.json index 200b3e8e..374123cb 100644 --- a/resources/pre-installation.json +++ b/resources/pre-installation.json @@ -59,7 +59,7 @@ } }, "test": "box list", - "tags": ["pre-installation", "exclude-php:7.4", "exclude-php:8.0"] + "tags": ["pre-installation", "exclude-php:8.0"] }, { "name": "box-3", diff --git a/resources/test.json b/resources/test.json index 031dcc4d..1af8b2f3 100644 --- a/resources/test.json +++ b/resources/test.json @@ -38,7 +38,7 @@ } }, "test": "infection --version", - "tags": ["featured", "test", "exclude-php:7.4"] + "tags": ["featured", "test"] }, { "name": "paratest", From 98e785126175045b8c19c9f0d6043392ac26a75d Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 12 Dec 2022 22:10:16 +0000 Subject: [PATCH 055/206] Remove analyze, phpunit-5 and phpunit-7 as no supported version is able to run them --- README.md | 14 +++++++------- resources/metrics.json | 13 ------------- resources/test.json | 28 ---------------------------- 3 files changed, 7 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index dcf1550c..f63a8a86 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,6 @@ It has been extracted as a separate project to make maintenance easier and enabl | Name | Description | PHP 8.0 | PHP 8.1 | PHP 8.2 | | :--- | :---------- | :------ | :------ | :------ | -| 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-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ✅ | ❌ | @@ -79,8 +78,6 @@ It has been extracted as a separate project to make maintenance easier and enabl | phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | ✅ | | phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | | phpunit | [The PHP testing framework](https://phpunit.de/) | ✅ | ✅ | ✅ | -| phpunit-5 | [The PHP testing framework (5.x version)](https://phpunit.de/) | ❌ | ❌ | ❌ | -| phpunit-7 | [The PHP testing framework (7.x version)](https://phpunit.de/) | ❌ | ❌ | ❌ | | phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | | psalm | [Finds errors in PHP applications](https://psalm.dev/) | ✅ | ✅ | ✅ | | psalm-plugin-doctrine | [Stubs to let Psalm understand Doctrine better](https://github.com/weirdan/doctrine-psalm-plugin) | ✅ | ✅ | ✅ | @@ -99,6 +96,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | Name | Summary | | :--- | :------ | +| 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) | @@ -107,6 +105,8 @@ 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/) | | phpdoc-to-typehint | [Automatically adds type hints and return types based on PHPDocs](https://github.com/dunglas/phpdoc-to-typehint) | | 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/) | | security-checker | [Checks composer dependencies for known security vulnerabilities](https://github.com/sensiolabs/security-checker) | | testability | [Analyses and reports testability issues of a php codebase](https://github.com/edsonmedina/php_testability) | @@ -133,7 +133,7 @@ To exclude some tools from the listing multiple `--exclude-tag` options can be a The `--tag` option can be used to filter tools by tags. ``` -./toolbox list-tools --exclude-tag exclude-php:7.4 --exclude-tag foo --tag bar +./toolbox list-tools --exclude-tag exclude-php:8.2 --exclude-tag foo --tag bar ``` ### Install tools @@ -171,7 +171,7 @@ To exclude some tools from the installation multiple `--exclude-tag` options can The `--tag` option can be used to filter tools by tags. ``` -./toolbox install --exclude-tag exclude-php:7.4 --exclude-tag foo --tag bar +./toolbox install --exclude-tag exclude-php:8.2 --exclude-tag foo --tag bar ``` ### Test if installed tools are usable @@ -194,7 +194,7 @@ To exclude some tools from the generated test command multiple `--exclude-tag` o The `--tag` option can be used to filter tools by tags. ``` -./toolbox test --exclude-tag exclude-php:7.4 --exclude-tag foo --tag bar +./toolbox test --exclude-tag exclude-php:8.2 --exclude-tag foo --tag bar ``` ### Tools definitions @@ -236,7 +236,7 @@ Tools can be tagged in order to enable grouping and filtering them. The tags below have a special meaning: * `pre-installation` - these tools will be installed before any other tools. -* `exclude-php:8.1`, `exclude-php:7.4` etc - used to exclude installation on the specified php version. +* `exclude-php:8.1`, `exclude-php:8.2` etc - used to exclude installation on the specified php version. ## Contributing diff --git a/resources/metrics.json b/resources/metrics.json index 06cec671..e19e5c17 100644 --- a/resources/metrics.json +++ b/resources/metrics.json @@ -1,18 +1,5 @@ { "tools": [ - { - "name": "analyze", - "summary": "Visualizes metrics and source code", - "website": "https://github.com/Qafoo/QualityAnalyzer", - "command": { - "composer-install": { - "repository": "https://github.com/Qafoo/QualityAnalyzer.git", - "target-dir": "%target-dir%/QualityAnalyzer" - } - }, - "test": "analyze list", - "tags": ["exclude-php:8.2", "exclude-php:8.1", "exclude-php:8.0", "metrics"] - }, { "name": "phpinsights", "summary": "Analyses code quality, style, architecture and complexity", diff --git a/resources/test.json b/resources/test.json index 1af8b2f3..4dff8536 100644 --- a/resources/test.json +++ b/resources/test.json @@ -122,34 +122,6 @@ "test": "phpunit-8 --version", "tags": ["test"] }, - { - "name": "phpunit-7", - "summary": "The PHP testing framework (7.x version)", - "website": "https://phpunit.de/", - "command": { - "phive-install": { - "alias": "phpunit@^7.0", - "bin": "%target-dir%/phpunit-7", - "sig": "4AA394086372C20A" - } - }, - "test": "phpunit-7 --version", - "tags": ["exclude-php:8.2", "exclude-php:8.1", "exclude-php:8.0", "test"] - }, - { - "name": "phpunit-5", - "summary": "The PHP testing framework (5.x version)", - "website": "https://phpunit.de/", - "command": { - "phive-install": { - "alias": "phpunit@^5.0", - "bin": "%target-dir%/phpunit-5", - "sig": "4AA394086372C20A" - } - }, - "test": "phpunit-5 --version", - "tags": ["exclude-php:8.2", "exclude-php:8.1", "exclude-php:8.0", "test"] - }, { "name": "simple-phpunit", "summary": "Provides utilities to report legacy tests and usage of deprecated code", From 6faf93d9874f1008f568fa15d537405fab9a8348 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 12 Dec 2022 22:12:43 +0000 Subject: [PATCH 056/206] Install phpunit 9 with simple-phpunit by default --- resources/test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/test.json b/resources/test.json index 4dff8536..aa5b5b96 100644 --- a/resources/test.json +++ b/resources/test.json @@ -133,7 +133,7 @@ "links": {"%target-dir%/simple-phpunit": "simple-phpunit"} }, "sh": { - "command": "simple-phpunit install && SYMFONY_PHPUNIT_VERSION=8 simple-phpunit install" + "command": "simple-phpunit install && SYMFONY_PHPUNIT_VERSION=9 simple-phpunit install" } }, "test": "simple-phpunit --version", From 31290347251fbb022884af829f3977d065c3f008 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 12 Dec 2022 22:29:26 +0000 Subject: [PATCH 057/206] Update local-php-security-checker (2.0.3 -> 2.0.6) --- resources/security.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/security.json b/resources/security.json index 0749ee4b..475fdabf 100644 --- a/resources/security.json +++ b/resources/security.json @@ -20,7 +20,7 @@ "website": "https://github.com/fabpot/local-php-security-checker", "command": { "file-download": { - "url": "https://github.com/fabpot/local-php-security-checker/releases/download/v2.0.3/local-php-security-checker_2.0.3_linux_amd64", + "url": "https://github.com/fabpot/local-php-security-checker/releases/download/v2.0.6/local-php-security-checker_2.0.6_linux_amd64", "file": "%target-dir%/local-php-security-checker" }, "sh": { From 0020a6c5ec580375e7ced543d3e16358a3a2252c Mon Sep 17 00:00:00 2001 From: benjy8001 Date: Mon, 18 Jul 2022 15:00:34 +0200 Subject: [PATCH 058/206] Add Laravel Pint CS tool --- README.md | 1 + resources/checkstyle.json | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index f63a8a86..dab0b278 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | | phpunit | [The PHP testing framework](https://phpunit.de/) | ✅ | ✅ | ✅ | | phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | +| pint | [Opinionated PHP code style fixer for Laravel](https://github.com/laravel/pint) | ❌ | ✅ | ✅ | | psalm | [Finds errors in PHP applications](https://psalm.dev/) | ✅ | ✅ | ✅ | | psalm-plugin-doctrine | [Stubs to let Psalm understand Doctrine better](https://github.com/weirdan/doctrine-psalm-plugin) | ✅ | ✅ | ✅ | | psalm-plugin-phpunit | [Psalm plugin for PHPUnit](https://github.com/psalm/psalm-plugin-phpunit) | ✅ | ✅ | ✅ | diff --git a/resources/checkstyle.json b/resources/checkstyle.json index f8eff8ad..b531e8b3 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -14,6 +14,20 @@ "test": "ecs -h", "tags": ["checkstyle"] }, + { + "name": "pint", + "summary": "Opinionated PHP code style fixer for Laravel", + "website": "https://github.com/laravel/pint", + "command": { + "composer-bin-plugin": { + "package": "laravel/pint", + "namespace": "pint", + "links": {"%target-dir%/pint": "pint"} + } + }, + "test": "pint --test", + "tags": ["featured", "checkstyle", "exclude-php:7.4"] + }, { "name": "php-cs-fixer", "summary": "PHP Coding Standards Fixer", From 2617fa3bcc87d9e406e6eda83e870294afd80911 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 18 Dec 2022 19:51:11 +0100 Subject: [PATCH 059/206] Enable psalm 5 --- resources/psalm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/psalm.json b/resources/psalm.json index a837c9ee..f21158f8 100644 --- a/resources/psalm.json +++ b/resources/psalm.json @@ -6,7 +6,7 @@ "website": "https://psalm.dev/", "command": { "composer-bin-plugin": { - "package": "vimeo/psalm:~4.0", + "package": "vimeo/psalm", "namespace": "psalm", "links": { "%target-dir%/psalm": "psalm", From 92c8fa7d609c9daca9ccd2ddf94a3086c012ac0c Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 18 Dec 2022 20:02:05 +0100 Subject: [PATCH 060/206] Remove the exclusion on unsupported PHP version --- resources/checkstyle.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/checkstyle.json b/resources/checkstyle.json index b531e8b3..e2f7115a 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -26,7 +26,7 @@ } }, "test": "pint --test", - "tags": ["featured", "checkstyle", "exclude-php:7.4"] + "tags": ["featured", "checkstyle"] }, { "name": "php-cs-fixer", From 1ea618fd803b039c2e81188cfd247cfb932842e1 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 18 Dec 2022 20:48:02 +0100 Subject: [PATCH 061/206] Do not attempt to execute pint checks just to verify if it is installed --- resources/checkstyle.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/checkstyle.json b/resources/checkstyle.json index e2f7115a..31d23cee 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -25,8 +25,8 @@ "links": {"%target-dir%/pint": "pint"} } }, - "test": "pint --test", - "tags": ["featured", "checkstyle"] + "test": "pint --version", + "tags": ["checkstyle"] }, { "name": "php-cs-fixer", From 8640f5462efcb0516337ca65afc061590fd2b90b Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 21 Dec 2022 21:55:31 +0100 Subject: [PATCH 062/206] Disable composer-require-checker on PHP 8.0 --- README.md | 4 ++-- resources/composer.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dab0b278..e309af7f 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | 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-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 | [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) | ✅ | ✅ | ✅ | | composer-unused | [Show unused packages by scanning your code](https://github.com/icanhazstring/composer-unused) | ✅ | ✅ | ✅ | | dephpend | [Detect flaws in your architecture](https://dephpend.com/) | ✅ | ✅ | ✅ | @@ -79,7 +79,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | | phpunit | [The PHP testing framework](https://phpunit.de/) | ✅ | ✅ | ✅ | | phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | -| pint | [Opinionated PHP code style fixer for Laravel](https://github.com/laravel/pint) | ❌ | ✅ | ✅ | +| pint | [Opinionated PHP code style fixer for Laravel](https://github.com/laravel/pint) | ✅ | ✅ | ✅ | | psalm | [Finds errors in PHP applications](https://psalm.dev/) | ✅ | ✅ | ✅ | | psalm-plugin-doctrine | [Stubs to let Psalm understand Doctrine better](https://github.com/weirdan/doctrine-psalm-plugin) | ✅ | ✅ | ✅ | | psalm-plugin-phpunit | [Psalm plugin for PHPUnit](https://github.com/psalm/psalm-plugin-phpunit) | ✅ | ✅ | ✅ | diff --git a/resources/composer.json b/resources/composer.json index d6807008..7b0d7c70 100644 --- a/resources/composer.json +++ b/resources/composer.json @@ -41,7 +41,7 @@ } }, "test": "composer-require-checker -V", - "tags": ["composer"] + "tags": ["composer", "exclude-php:8.0"] }, { "name": "composer-require-checker-3", From 4cd6721fe5a340bb4c2ef2c473385e2fe88ceed4 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 5 Jan 2023 10:42:40 +0000 Subject: [PATCH 063/206] Update the twigcs signature --- resources/checkstyle.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/checkstyle.json b/resources/checkstyle.json index 31d23cee..90b133a3 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -64,7 +64,7 @@ "phive-install": { "alias": "friendsoftwig/twigcs", "bin": "%target-dir%/twigcs", - "sig": "C0DD602D1DD2E5AF" + "sig": "C00543248C87FB13" } }, "test": "twigcs --help", From 55289ee3a7c3dc17b0e2d4fe3a8409714e448729 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 5 Jan 2023 10:45:23 +0000 Subject: [PATCH 064/206] Update infection --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9c1be361..5782f260 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "phpunit/phpunit": "^9.5", "zalas/phpunit-globals": "^2.1", "phpspec/prophecy-phpunit": "^2.0", - "infection/infection": "^0.25.4" + "infection/infection": "^0.26" }, "autoload": { "psr-4": { From e853cd01482828f770d9eec51f5ed88ba805ef8c Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sat, 21 Jan 2023 16:15:23 +0000 Subject: [PATCH 065/206] Update the phpbench key --- resources/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/tools.json b/resources/tools.json index 96ad5551..c2a3ff5a 100644 --- a/resources/tools.json +++ b/resources/tools.json @@ -36,7 +36,7 @@ "phive-install": { "alias": "phpbench", "bin": "%target-dir%/phpbench", - "sig": "15E1F8E2B149E6F5" + "sig": "6FC579F5F0FCC966" } }, "test": "phpbench -V", From 2e4639b9fd496c550be9d6104da6748926715986 Mon Sep 17 00:00:00 2001 From: Dmitri Goosens <1250047+dgoosens@users.noreply.github.com> Date: Wed, 8 Feb 2023 14:34:40 +0100 Subject: [PATCH 066/206] add support for PHPUnit 9 PHPUnit 10 has become the default... adding back PHPUnit 9 in the available packages --- resources/test.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/resources/test.json b/resources/test.json index aa5b5b96..0e237313 100644 --- a/resources/test.json +++ b/resources/test.json @@ -108,6 +108,20 @@ "test": "phpunit --version", "tags": ["featured", "test"] }, + { + "name": "phpunit-9", + "summary": "The PHP testing framework (9.x version)", + "website": "https://phpunit.de/", + "command": { + "phive-install": { + "alias": "phpunit@^9.0", + "bin": "%target-dir%/phpunit-9", + "sig": "4AA394086372C20A" + } + }, + "test": "phpunit --version", + "tags": ["test"] + }, { "name": "phpunit-8", "summary": "The PHP testing framework (8.x version)", From 632bf7b418dde721e947919a477ae720c8b82421 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 14 Feb 2023 19:28:17 +0000 Subject: [PATCH 067/206] Exclude phpunit 10 on PHP 8.0 --- resources/test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/test.json b/resources/test.json index 0e237313..d817e6fb 100644 --- a/resources/test.json +++ b/resources/test.json @@ -106,7 +106,7 @@ } }, "test": "phpunit --version", - "tags": ["featured", "test"] + "tags": ["exclude-php:8.0", "featured", "test"] }, { "name": "phpunit-9", From 6b62f8fb5e1658f1b500fe0ed4d520267aa526f6 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 14 Feb 2023 19:29:57 +0000 Subject: [PATCH 068/206] Update the README list of tools --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e309af7f..5ead64ae 100644 --- a/README.md +++ b/README.md @@ -77,8 +77,9 @@ It has been extracted as a separate project to make maintenance easier and enabl | phpstan-strict-rules | [Extra strict and opinionated rules for PHPStan](https://github.com/phpstan/phpstan-strict-rules) | ✅ | ✅ | ✅ | | phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | ✅ | | phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | -| phpunit | [The PHP testing framework](https://phpunit.de/) | ✅ | ✅ | ✅ | +| phpunit | [The PHP testing framework](https://phpunit.de/) | ❌ | ✅ | ✅ | | phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | +| phpunit-9 | [The PHP testing framework (9.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | | pint | [Opinionated PHP code style fixer for Laravel](https://github.com/laravel/pint) | ✅ | ✅ | ✅ | | psalm | [Finds errors in PHP applications](https://psalm.dev/) | ✅ | ✅ | ✅ | | psalm-plugin-doctrine | [Stubs to let Psalm understand Doctrine better](https://github.com/weirdan/doctrine-psalm-plugin) | ✅ | ✅ | ✅ | From 582fc0203cd031bb0b7302cdf8afe3ceea644ed3 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 14 Feb 2023 19:47:40 +0000 Subject: [PATCH 069/206] Disable phpcov on PHP 8.0 --- README.md | 2 +- resources/test.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5ead64ae..680e9939 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,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 d817e6fb..6ee08e5d 100644 --- a/resources/test.json +++ b/resources/test.json @@ -66,7 +66,7 @@ } }, "test": "phpcov -v", - "tags": ["test"] + "tags": ["exclude-php:8.0", "test"] }, { "name": "php-fuzzer", From 3dc533b50294934e2fb4d5c32999f1366ad11cc3 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 14 Feb 2023 19:56:19 +0000 Subject: [PATCH 070/206] Fix the test command for phpunit-9 --- resources/test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/test.json b/resources/test.json index 6ee08e5d..dc972bd4 100644 --- a/resources/test.json +++ b/resources/test.json @@ -119,7 +119,7 @@ "sig": "4AA394086372C20A" } }, - "test": "phpunit --version", + "test": "phpunit-9 --version", "tags": ["test"] }, { From 6ba763d42c13272a42f92929e5954eaa11ba211a Mon Sep 17 00:00:00 2001 From: Wahib LAROUI Date: Tue, 28 Feb 2023 08:00:26 +0100 Subject: [PATCH 071/206] feat(phpstan): add ekino/phpstan-banned-code --- README.md | 1 + resources/phpstan.json | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/README.md b/README.md index 680e9939..a68861b8 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | phpmnd | [Helps to detect magic numbers](https://github.com/povils/phpmnd) | ✅ | ✅ | ✅ | | 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) | ✅ | ✅ | ✅ | | 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) | ✅ | ✅ | ✅ | diff --git a/resources/phpstan.json b/resources/phpstan.json index 5670b171..5dcf3c54 100644 --- a/resources/phpstan.json +++ b/resources/phpstan.json @@ -170,6 +170,21 @@ }, "test": "composer global bin phpstan show ergebnis/phpstan-rules", "tags": ["phpstan"] + }, + { + "name": "phpstan-banned-code", + "summary": "PHPStan rules for detecting calls to specific functions you don't want in your project", + "website": "https://github.com/ekino/phpstan-banned-code", + "command": { + "composer-bin-plugin": { + "package": "ekino/phpstan-banned-code", + "namespace": "phpstan" + } + }, + "test": "composer global bin phpstan show ekino/phpstan-banned-code", + "tags": [ + "phpstan" + ] } ] } From fcbcf6a306eb83f0798bdedd1d6ac36f957259df Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Fri, 24 Mar 2023 10:51:06 +0000 Subject: [PATCH 072/206] Enable php-cs-fixer on PHP 8.2 --- README.md | 2 +- resources/checkstyle.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a68861b8..af9e9af8 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | phan | [Static Analysis Tool](https://github.com/phan/phan) | ✅ | ✅ | ✅ | | 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-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 90b133a3..f98cb6d7 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -40,7 +40,7 @@ } }, "test": "php-cs-fixer list", - "tags": ["exclude-php:8.2", "featured", "checkstyle"] + "tags": ["featured", "checkstyle"] }, { "name": "phpcbf", From 17dd197e4bcca620f91ce55ed8d8772f813ffe7b Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 16 Apr 2023 21:31:43 +0100 Subject: [PATCH 073/206] Drop infection on PHP 8.0 --- resources/test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/test.json b/resources/test.json index dc972bd4..aeed2cc8 100644 --- a/resources/test.json +++ b/resources/test.json @@ -38,7 +38,7 @@ } }, "test": "infection --version", - "tags": ["featured", "test"] + "tags": ["featured", "test", "exclude-php:8.0"] }, { "name": "paratest", From e52d0cf3135d8ff72533f293cbd6499bb2138190 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 16 Apr 2023 21:39:37 +0100 Subject: [PATCH 074/206] Update README tools --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index af9e9af8..bd6692b8 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,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/qossmic/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) | ✅ | ✅ | ✅ | -| infection | [AST based PHP Mutation Testing Framework](https://infection.github.io/) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | | parallel-lint | [Checks PHP file syntax](https://github.com/php-parallel-lint/PHP-Parallel-Lint) | ✅ | ✅ | ✅ | From b767a2c9b63de1fdfc485ee6c82051eab135e931 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 19 Apr 2023 03:38:40 +0000 Subject: [PATCH 075/206] Update tools --- resources/test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/test.json b/resources/test.json index aeed2cc8..5ee68c95 100644 --- a/resources/test.json +++ b/resources/test.json @@ -6,7 +6,7 @@ "website": "http://behat.org/", "command": { "phar-download": { - "phar": "https://github.com/Behat/Behat/releases/download/v3.12.0/behat.phar", + "phar": "https://github.com/Behat/Behat/releases/download/v3.13.0/behat.phar", "bin": "%target-dir%/behat" } }, From ffa8470f5281ad6c961d2cc48def8785ffdb2438 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 2 May 2023 10:28:37 +0100 Subject: [PATCH 076/206] Update the key for yaml lint --- resources/linting.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/linting.json b/resources/linting.json index efe412d0..9a87b64d 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": "D684BDC6C6CAB80F" + "sig": "985E1E22802973B2" } }, "test": "yaml-lint --version", From 409fe8f2c3cdba4cde3366fb047f295290a6643a Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 2 May 2023 13:09:14 +0100 Subject: [PATCH 077/206] Exclude yaml-lint on PHP 8.0 --- resources/linting.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/linting.json b/resources/linting.json index 9a87b64d..a73cea59 100644 --- a/resources/linting.json +++ b/resources/linting.json @@ -52,7 +52,7 @@ } }, "test": "yaml-lint --version", - "tags": ["linting"] + "tags": ["exclude-php:8.0", "linting"] }, { "name": "twig-linter", From bb766a29f8e9f2a31ed7d872334983653dd1d689 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 2 May 2023 14:43:19 +0100 Subject: [PATCH 078/206] Update README tools --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bd6692b8..f25618c9 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | ✅ | | twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | ✅ | | twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | ✅ | -| yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ✅ | ✅ | ✅ | +| yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ❌ | ✅ | ✅ | ### Removed tools From 223f0e56f776361f704c18e8e9682534551c165c Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 30 May 2023 10:12:20 +0200 Subject: [PATCH 079/206] Add a key for pdepend --- resources/architecture.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/architecture.json b/resources/architecture.json index 343fb1af..cf11dfe0 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -35,7 +35,8 @@ "command": { "phive-install": { "alias": "pdepend/pdepend", - "bin": "%target-dir%/pdepend" + "bin": "%target-dir%/pdepend", + "sig": "508003DAED98C308" } }, "test": "pdepend --version", From 1f3a793138035e3331e0ebd711b69dca779989c3 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 12 Jul 2023 09:41:44 +0100 Subject: [PATCH 080/206] Exclude phpbench on PHP 8.0 --- resources/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/tools.json b/resources/tools.json index c2a3ff5a..b3a7f785 100644 --- a/resources/tools.json +++ b/resources/tools.json @@ -40,7 +40,7 @@ } }, "test": "phpbench -V", - "tags": [] + "tags": ["exclude-php:8.0"] }, { "name": "phpa", From 24f8732f3194cad194e333f3179b08f6b5d84f98 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 12 Jul 2023 09:42:42 +0100 Subject: [PATCH 081/206] Update the readme list of tools --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f25618c9..1a83523c 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 | 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) | ✅ | ✅ | ✅ | -| phpbench | [PHP Benchmarking framework](https://github.com/phpbench/phpbench) | ✅ | ✅ | ✅ | +| phpbench | [PHP Benchmarking framework](https://github.com/phpbench/phpbench) | ❌ | ✅ | ✅ | | phpca | [Finds usage of non-built-in extensions](https://github.com/wapmorgan/PhpCodeAnalyzer) | ✅ | ✅ | ✅ | | phpcb | [PHP Code Browser](https://github.com/mayflower/PHP_CodeBrowser) | ✅ | ✅ | ✅ | | phpcbf | [Automatically corrects coding standard violations](https://github.com/squizlabs/PHP_CodeSniffer) | ✅ | ✅ | ✅ | From 7a44d803413d3571d8ee3a978e0d981703b26ed1 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 13 Aug 2023 21:53:06 +0100 Subject: [PATCH 082/206] Prevent php-fuzzer test command from reporting a failure --- resources/test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/test.json b/resources/test.json index 5ee68c95..e17d64f9 100644 --- a/resources/test.json +++ b/resources/test.json @@ -78,7 +78,7 @@ "bin": "%target-dir%/php-fuzzer" } }, - "test": "php-fuzzer --help", + "test": "php-fuzzer --help | grep 'Usage:'", "tags": ["test"] }, { From fe3617a3a3a02427c00a22577c445c10c3b2f7d8 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 17 Aug 2023 09:16:18 +0200 Subject: [PATCH 083/206] Update phpdocumentor key --- resources/documentation.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/documentation.json b/resources/documentation.json index 06c372a8..6a39f990 100644 --- a/resources/documentation.json +++ b/resources/documentation.json @@ -8,7 +8,7 @@ "phive-install": { "alias": "phpDocumentor", "bin": "%target-dir%/phpDocumentor", - "sig": "67F861C3D889C656" + "sig": "8AC0BAA79732DD42" } }, "test": "phpDocumentor list", From f59cee06b291d6f467900c8c4a682fcf71158c2d Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 17 Aug 2023 10:40:40 +0200 Subject: [PATCH 084/206] Exclude phpdocumentor on PHP 8.0 --- resources/documentation.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/documentation.json b/resources/documentation.json index 6a39f990..53ce4cc2 100644 --- a/resources/documentation.json +++ b/resources/documentation.json @@ -12,7 +12,7 @@ } }, "test": "phpDocumentor list", - "tags": ["featured", "documentation"] + "tags": ["featured", "documentation", "exclude-php:8.0"] }, { "name": "phpcb", From b164d2d5b9d701d70ad94cc12688bdb8129a2439 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 17 Aug 2023 13:26:46 +0200 Subject: [PATCH 085/206] Update tools in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a83523c..69a04f17 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | phpcs-security-audit | [Finds vulnerabilities and weaknesses related to security in PHP code](https://github.com/FloeDesignTechnologies/phpcs-security-audit) | ✅ | ✅ | ✅ | | phpda | [Generates dependency graphs](https://mamuz.github.io/PhpDependencyAnalysis/) | ✅ | ❌ | ❌ | | phpdd | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector) | ✅ | ✅ | ✅ | -| phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ✅ | ✅ | ✅ | +| phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ✅ | ✅ | ❌ | | phpinsights | [Analyses code quality, style, architecture and complexity](https://phpinsights.com/) | ✅ | ✅ | ✅ | | phplint | [Lints php files in parallel](https://github.com/overtrue/phplint) | ✅ | ✅ | ✅ | | phploc | [A tool for quickly measuring the size of a PHP project](https://github.com/sebastianbergmann/phploc) | ✅ | ✅ | ✅ | From ad41bb90300b812910d1383b1c61942809117d66 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 17 Aug 2023 13:28:16 +0200 Subject: [PATCH 086/206] Update tools in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 69a04f17..0351b344 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | phpcs-security-audit | [Finds vulnerabilities and weaknesses related to security in PHP code](https://github.com/FloeDesignTechnologies/phpcs-security-audit) | ✅ | ✅ | ✅ | | phpda | [Generates dependency graphs](https://mamuz.github.io/PhpDependencyAnalysis/) | ✅ | ❌ | ❌ | | phpdd | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector) | ✅ | ✅ | ✅ | -| phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ✅ | ✅ | ❌ | +| phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ❌ | ✅ | ✅ | | phpinsights | [Analyses code quality, style, architecture and complexity](https://phpinsights.com/) | ✅ | ✅ | ✅ | | phplint | [Lints php files in parallel](https://github.com/overtrue/phplint) | ✅ | ✅ | ✅ | | phploc | [A tool for quickly measuring the size of a PHP project](https://github.com/sebastianbergmann/phploc) | ✅ | ✅ | ✅ | From 1798dfc9c037360d85cc21b2be1f97d3135fcca2 Mon Sep 17 00:00:00 2001 From: benjy8001 Date: Sun, 27 Aug 2023 20:40:20 +0200 Subject: [PATCH 087/206] Add Pest tool --- README.md | 1 + resources/test.json | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index 0351b344..e25c297d 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ 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 | [an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP](https://github.com/pestphp/pest) | ✅ | ✅ | ✅ | | phan | [Static Analysis Tool](https://github.com/phan/phan) | ✅ | ✅ | ✅ | | phive | [PHAR Installation and Verification Environment](https://phar.io/) | ✅ | ✅ | ✅ | | php-coupling-detector | [Detects code coupling issues](https://akeneo.github.io/php-coupling-detector/) | ✅ | ✅ | ✅ | diff --git a/resources/test.json b/resources/test.json index e17d64f9..8a03c2f6 100644 --- a/resources/test.json +++ b/resources/test.json @@ -54,6 +54,20 @@ "test": "paratest --version", "tags": ["test"] }, + { + "name": "pest", + "summary": "an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP", + "website": "https://github.com/pestphp/pest", + "command": { + "composer-bin-plugin": { + "package": "laravel/pest", + "namespace": "pest", + "links": {"%target-dir%/pest": "pest"} + } + }, + "test": "pest -v", + "tags": ["test"] + }, { "name": "phpcov", "summary": "a command-line frontend for the PHP_CodeCoverage library", From 694879ca3030589f5f390333f0be27ac59e54758 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Fri, 1 Sep 2023 13:10:37 +0100 Subject: [PATCH 088/206] Fix the pest package name --- resources/test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/test.json b/resources/test.json index 8a03c2f6..4fd2ce2e 100644 --- a/resources/test.json +++ b/resources/test.json @@ -60,7 +60,7 @@ "website": "https://github.com/pestphp/pest", "command": { "composer-bin-plugin": { - "package": "laravel/pest", + "package": "pestphp/pest", "namespace": "pest", "links": {"%target-dir%/pest": "pest"} } From 3e7f19be0280f8d21336446c4393ae31e1c22765 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Fri, 1 Sep 2023 13:10:57 +0100 Subject: [PATCH 089/206] Shorten the description --- README.md | 2 +- resources/test.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e25c297d..c3236e26 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ 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 | [an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP](https://github.com/pestphp/pest) | ✅ | ✅ | ✅ | +| pest | [an elegant PHP testing Framework with a focus on simplicity](https://github.com/pestphp/pest) | ✅ | ✅ | ✅ | | phan | [Static Analysis Tool](https://github.com/phan/phan) | ✅ | ✅ | ✅ | | phive | [PHAR Installation and Verification Environment](https://phar.io/) | ✅ | ✅ | ✅ | | php-coupling-detector | [Detects code coupling issues](https://akeneo.github.io/php-coupling-detector/) | ✅ | ✅ | ✅ | diff --git a/resources/test.json b/resources/test.json index 4fd2ce2e..1fe40c89 100644 --- a/resources/test.json +++ b/resources/test.json @@ -56,7 +56,7 @@ }, { "name": "pest", - "summary": "an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP", + "summary": "an elegant PHP testing Framework with a focus on simplicity", "website": "https://github.com/pestphp/pest", "command": { "composer-bin-plugin": { From 1ef9e2f185afb5a208f3af214a5b77459e68c2a6 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Fri, 1 Sep 2023 13:20:48 +0100 Subject: [PATCH 090/206] Revert adding of pest --- README.md | 1 - resources/test.json | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/README.md b/README.md index c3236e26..0351b344 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,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 | [an elegant PHP testing Framework with a focus on simplicity](https://github.com/pestphp/pest) | ✅ | ✅ | ✅ | | phan | [Static Analysis Tool](https://github.com/phan/phan) | ✅ | ✅ | ✅ | | phive | [PHAR Installation and Verification Environment](https://phar.io/) | ✅ | ✅ | ✅ | | php-coupling-detector | [Detects code coupling issues](https://akeneo.github.io/php-coupling-detector/) | ✅ | ✅ | ✅ | diff --git a/resources/test.json b/resources/test.json index 1fe40c89..e17d64f9 100644 --- a/resources/test.json +++ b/resources/test.json @@ -54,20 +54,6 @@ "test": "paratest --version", "tags": ["test"] }, - { - "name": "pest", - "summary": "an elegant PHP testing Framework with a focus on simplicity", - "website": "https://github.com/pestphp/pest", - "command": { - "composer-bin-plugin": { - "package": "pestphp/pest", - "namespace": "pest", - "links": {"%target-dir%/pest": "pest"} - } - }, - "test": "pest -v", - "tags": ["test"] - }, { "name": "phpcov", "summary": "a command-line frontend for the PHP_CodeCoverage library", From cbf1d60c629238ca1863506d4fcf4efc4a920edc Mon Sep 17 00:00:00 2001 From: benjy8001 Date: Sun, 27 Aug 2023 20:40:20 +0200 Subject: [PATCH 091/206] Add Pest tool --- README.md | 1 + resources/test.json | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/README.md b/README.md index 0351b344..e25c297d 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ 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 | [an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP](https://github.com/pestphp/pest) | ✅ | ✅ | ✅ | | phan | [Static Analysis Tool](https://github.com/phan/phan) | ✅ | ✅ | ✅ | | phive | [PHAR Installation and Verification Environment](https://phar.io/) | ✅ | ✅ | ✅ | | php-coupling-detector | [Detects code coupling issues](https://akeneo.github.io/php-coupling-detector/) | ✅ | ✅ | ✅ | diff --git a/resources/test.json b/resources/test.json index e17d64f9..495cd8fe 100644 --- a/resources/test.json +++ b/resources/test.json @@ -54,6 +54,23 @@ "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 -v", + "tags": ["test"] + }, { "name": "phpcov", "summary": "a command-line frontend for the PHP_CodeCoverage library", From 7b2aa4e7fc31368bf747da35865786a162957717 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 6 Sep 2023 22:05:11 +0100 Subject: [PATCH 092/206] Use a test command for pest that does not fail --- resources/test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/test.json b/resources/test.json index 495cd8fe..1d762e50 100644 --- a/resources/test.json +++ b/resources/test.json @@ -68,7 +68,7 @@ "links": {"%target-dir%/pest": "pest"} } }, - "test": "pest -v", + "test": "pest --version", "tags": ["test"] }, { From 3c280f56d02f4627db79e907a1aacf7113f87cf8 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 6 Sep 2023 22:05:54 +0100 Subject: [PATCH 093/206] Update README tools --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e25c297d..b48a9208 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ 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 | [an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP](https://github.com/pestphp/pest) | ✅ | ✅ | ✅ | +| 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-coupling-detector | [Detects code coupling issues](https://akeneo.github.io/php-coupling-detector/) | ✅ | ✅ | ✅ | From 0cf1aabbe1fc510d171be9fbce95fe34810cc9ab Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sat, 16 Sep 2023 22:08:09 +0100 Subject: [PATCH 094/206] Export github auth token for phive --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1250f0ba..48320d91 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,8 @@ on: env: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} + # for phive + GITHUB_AUTH_TOKEN: ${{ secrets.ACCESS_TOKEN }} jobs: tests: From 981304ecc1b19b996a61a634e5e2e9372bfd0bf5 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 28 Sep 2023 11:21:23 +0100 Subject: [PATCH 095/206] Update phpmd signature --- resources/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/tools.json b/resources/tools.json index b3a7f785..47f79832 100644 --- a/resources/tools.json +++ b/resources/tools.json @@ -91,7 +91,7 @@ "phive-install": { "alias": "phpmd", "bin": "%target-dir%/phpmd", - "sig": "A4E55EA12C7C085C" + "sig": "9093F8B32E4815AA" } }, "test": "phpmd --version" From 68db31e1f6e271b021dcc054faa244aafc585711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Mon, 27 Nov 2023 10:00:03 +0100 Subject: [PATCH 096/206] feat: PHP 8.3 --- .github/workflows/build.yml | 4 ++-- bin/devkit.php | 9 +++++---- composer.json | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 48320d91..2b9fb3d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: name: Build and test strategy: matrix: - php: [8.0, 8.1, 8.2] + php: [8.0, 8.1, 8.2, 8.3] deps: [high] include: - php: 8.0 @@ -61,7 +61,7 @@ jobs: needs: tests strategy: matrix: - php: [8.0, 8.1, 8.2] + php: [8.0, 8.1, 8.2, 8.3] steps: - uses: actions/checkout@v3 diff --git a/bin/devkit.php b/bin/devkit.php index ff870c03..2f2bbb62 100755 --- a/bin/devkit.php +++ b/bin/devkit.php @@ -73,19 +73,20 @@ protected function execute(InputInterface $input, OutputInterface $output) $readmePath = $input->getOption('readme'); $tools = $this->loadTools($jsonPath); - $toolsList = '| Name | Description | PHP 8.0 | PHP 8.1 | PHP 8.2 |' . PHP_EOL; - $toolsList .= '| :--- | :---------- | :------ | :------ | :------ |' . PHP_EOL; + $toolsList = '| Name | Description | PHP 8.0 | PHP 8.1 | PHP 8.2 | PHP 8.3 |' . PHP_EOL; + $toolsList .= '| :--- | :---------- | :------ | :------ | :------ | :------ |' . PHP_EOL; $toolsList .= $tools->sort(function (Tool $left, Tool $right) { return strcasecmp($left->name(), $right->name()); })->reduce('', function ($acc, Tool $tool) { - return $acc . sprintf('| %s | [%s](%s) | %s | %s | %s |', + return $acc . sprintf('| %s | [%s](%s) | %s | %s | %s | %s |', $tool->name(), $tool->summary(), $tool->website(), in_array('exclude-php:8.0', $tool->tags(), true) ? '❌' : '✅', in_array('exclude-php:8.1', $tool->tags(), true) ? '❌' : '✅', - in_array('exclude-php:8.2', $tool->tags(), true) ? '❌' : '✅' + in_array('exclude-php:8.2', $tool->tags(), true) ? '❌' : '✅', + in_array('exclude-php:8.3', $tool->tags(), true) ? '❌' : '✅' ) . PHP_EOL; }); diff --git a/composer.json b/composer.json index 5782f260..23f6d9a0 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Helps to discover and install tools", "type": "project", "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", "symfony/console": "^4.4 || ^5.4 || ^6.1", "psr/container": "^1.0" }, From 48b843bd8d0d1e0a1f42a2d5dca2f14ddf605f45 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 11:03:12 +0000 Subject: [PATCH 097/206] Replace prophecy in InstallToolsTest --- tests/UseCase/InstallToolsTest.php | 61 ++++++++++++++++++------------ 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/tests/UseCase/InstallToolsTest.php b/tests/UseCase/InstallToolsTest.php index 3909e191..2cad1d2a 100644 --- a/tests/UseCase/InstallToolsTest.php +++ b/tests/UseCase/InstallToolsTest.php @@ -2,10 +2,8 @@ namespace Zalas\Toolbox\Tests\UseCase; +use PHPUnit\Framework\MockObject\Stub; use PHPUnit\Framework\TestCase; -use Prophecy\Argument; -use Prophecy\PhpUnit\ProphecyTrait; -use Prophecy\Prophecy\ObjectProphecy; use Zalas\Toolbox\Tool\Collection; use Zalas\Toolbox\Tool\Command; use Zalas\Toolbox\Tool\Command\BoxBuildCommand; @@ -17,6 +15,7 @@ use Zalas\Toolbox\Tool\Command\PharDownloadCommand; use Zalas\Toolbox\Tool\Command\PhiveInstallCommand; use Zalas\Toolbox\Tool\Command\ShCommand; +use Zalas\Toolbox\Tool\Command\TestCommand; use Zalas\Toolbox\Tool\Filter; use Zalas\Toolbox\Tool\Tool; use Zalas\Toolbox\Tool\Tools; @@ -24,29 +23,27 @@ class InstallToolsTest extends TestCase { - use ProphecyTrait; - /** * @var InstallTools */ private $useCase; /** - * @var Tools|ObjectProphecy + * @var Tools|Stub */ private $tools; protected function setUp(): void { - $this->tools = $this->prophesize(Tools::class); - $this->useCase = new InstallTools($this->tools->reveal()); + $this->tools = $this->createStub(Tools::class); + $this->useCase = new InstallTools($this->tools); } public function test_it_returns_a_multi_step_command() { $filter = $this->filter(); - $this->tools->all($filter)->willReturn(Collection::create([$this->tool(new ShCommand('echo "Foo"'))])); + $this->givenToolsFor($filter, Collection::create([$this->tool(new ShCommand('echo "Foo"'))])); $command = $this->useCase->__invoke($filter); @@ -55,7 +52,7 @@ public function test_it_returns_a_multi_step_command() public function test_it_groups_composer_global_install_commands() { - $this->tools->all(Argument::type(Filter::class))->willReturn(Collection::create([ + $this->givenTools(Collection::create([ $this->tool(new ComposerGlobalInstallCommand('phpstan/phpstan')), $this->tool(new ComposerGlobalInstallCommand('phan/phan')), ])); @@ -67,7 +64,7 @@ public function test_it_groups_composer_global_install_commands() public function test_it_does_not_include_empty_commands() { - $this->tools->all(Argument::type(Filter::class))->willReturn(Collection::create([ + $this->givenTools(Collection::create([ $this->tool(new ShCommand('echo "Foo"')), ])); @@ -79,7 +76,7 @@ public function test_it_does_not_include_empty_commands() public function test_it_groups_composer_bin_plugin_commands() { - $this->tools->all(Argument::type(Filter::class))->willReturn(Collection::create([ + $this->givenTools(Collection::create([ $this->tool(new ComposerBinPluginCommand('phpstan/phpstan', 'tools', Collection::create([]))), $this->tool(new ComposerBinPluginCommand('phan/phan', 'tools', Collection::create([]))), ])); @@ -91,7 +88,7 @@ public function test_it_groups_composer_bin_plugin_commands() public function test_it_includes_installation_tagged_commands_before_other_ones() { - $this->tools->all(Argument::type(Filter::class))->willReturn(Collection::create([ + $this->givenTools(Collection::create([ $this->tool(new ShCommand('echo "Foo"')), $this->tool(new ShCommand('echo "Installation"'), [InstallTools::PRE_INSTALLATION_TAG]), ])); @@ -104,7 +101,7 @@ public function test_it_includes_installation_tagged_commands_before_other_ones( public function test_it_includes_shell_commands() { - $this->tools->all(Argument::type(Filter::class))->willReturn(Collection::create([ + $this->givenTools(Collection::create([ $this->tool(new ShCommand('echo "Foo"')), ])); @@ -115,7 +112,7 @@ public function test_it_includes_shell_commands() public function test_it_includes_multi_step_commands() { - $this->tools->all(Argument::type(Filter::class))->willReturn(Collection::create([ + $this->givenTools(Collection::create([ $this->tool(new MultiStepCommand(Collection::create([ new ShCommand('echo "Foo"'), new ShCommand('echo "Bar"') @@ -129,7 +126,7 @@ public function test_it_includes_multi_step_commands() public function test_it_includes_composer_install_commands() { - $this->tools->all(Argument::type(Filter::class))->willReturn(Collection::create([ + $this->givenTools(Collection::create([ $this->tool(new ComposerInstallCommand('git@github.com:phpspec/phpspec.git', '/usr/local/bin')), ])); @@ -140,7 +137,7 @@ public function test_it_includes_composer_install_commands() public function test_it_includes_box_build_commands() { - $this->tools->all(Argument::type(Filter::class))->willReturn(Collection::create([ + $this->givenTools(Collection::create([ $this->tool(new BoxBuildCommand('https://github.com/behat/behat.git', 'behat.phar', '/tools/behat', '/tmp')), ])); @@ -151,7 +148,7 @@ public function test_it_includes_box_build_commands() public function test_it_includes_phar_download_commands() { - $this->tools->all(Argument::type(Filter::class))->willReturn(Collection::create([ + $this->givenTools(Collection::create([ $this->tool(new PharDownloadCommand('https://github.com/sensiolabs-de/deptrac/releases/download/0.2.0/deptrac-0.2.0.phar', '/tools/phar')), ])); @@ -162,7 +159,7 @@ public function test_it_includes_phar_download_commands() public function test_it_includes_phive_install_commands() { - $this->tools->all(Argument::type(Filter::class))->willReturn(Collection::create([ + $this->givenTools(Collection::create([ $this->tool(new PhiveInstallCommand('phpunit', '/tools/phpunit')), ])); @@ -172,7 +169,7 @@ public function test_it_includes_phive_install_commands() public function test_it_includes_file_download_commands() { - $this->tools->all(Argument::type(Filter::class))->willReturn(Collection::create([ + $this->givenTools(Collection::create([ $this->tool(new FileDownloadCommand('https://github.com/fabpot/local-php-security-checker/releases/download/v1.0.0/local-php-security-checker_1.0.0_linux_amd64', '/tools/security-checker')), ])); @@ -188,10 +185,26 @@ private function filter(): Filter private function tool(Command $command, array $tags = []): Tool { - $tool = $this->prophesize(Tool::class); - $tool->command()->willReturn($command); - $tool->tags()->willReturn($tags); + return new Tool( + "any name", + "any summary", + "https://example.com", + $tags, + $command, + new TestCommand("any test command", "any test name") + ); + } + + private function givenToolsFor(Filter $filter, Collection $tools): void + { + $this->tools->method('all') + ->with($filter) + ->willReturn($tools); + } - return $tool->reveal(); + private function givenTools(Collection $tools): void + { + $this->tools->method('all') + ->willReturn($tools); } } From 4446b696135f8645246f367f04b02e72acd34a87 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 11:08:09 +0000 Subject: [PATCH 098/206] Replace prophecy in ListToolsTest --- tests/UseCase/ListToolsTest.php | 34 +++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/tests/UseCase/ListToolsTest.php b/tests/UseCase/ListToolsTest.php index e47bf469..929138dc 100644 --- a/tests/UseCase/ListToolsTest.php +++ b/tests/UseCase/ListToolsTest.php @@ -3,8 +3,9 @@ namespace Zalas\Toolbox\Tests\UseCase; use PHPUnit\Framework\TestCase; -use Prophecy\PhpUnit\ProphecyTrait; use Zalas\Toolbox\Tool\Collection; +use Zalas\Toolbox\Tool\Command; +use Zalas\Toolbox\Tool\Command\TestCommand; use Zalas\Toolbox\Tool\Filter; use Zalas\Toolbox\Tool\Tool; use Zalas\Toolbox\Tool\Tools; @@ -12,20 +13,14 @@ class ListToolsTest extends TestCase { - use ProphecyTrait; - public function test_it_returns_loaded_tools() { - $tools = Collection::create([ - $this->prophesize(Tool::class)->reveal(), - $this->prophesize(Tool::class)->reveal(), - ]); + $tools = Collection::create([$this->anyTool(), $this->anyTool()]); $filter = $this->filter(); - $repository = $this->prophesize(Tools::class); - $repository->all($filter)->willReturn($tools); + $repository = $this->givenToolsFor($filter, $tools); - $useCase = new ListTools($repository->reveal()); + $useCase = new ListTools($repository); $this->assertSame($tools, $useCase($filter)); } @@ -34,4 +29,23 @@ private function filter(): Filter { return new Filter([], []); } + + private function anyTool(): Tool + { + return new Tool( + "any name", + "any summary", + "https://example.com", + [], + new Command\ShCommand("any command"), + new TestCommand("any test command", "any test name") + ); + } + + private function givenToolsFor(Filter $filter, Collection $tools): Tools + { + $repository = $this->createStub(Tools::class); + $repository->method('all')->with($filter)->willReturn($tools); + return $repository; + } } From f866e4de58f03586ce3c941f88012e78b33d3700 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 11:13:51 +0000 Subject: [PATCH 099/206] Replace prophecy in TestToolsTest --- tests/UseCase/TestToolsTest.php | 34 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/tests/UseCase/TestToolsTest.php b/tests/UseCase/TestToolsTest.php index 74ba8f89..5f410b2c 100644 --- a/tests/UseCase/TestToolsTest.php +++ b/tests/UseCase/TestToolsTest.php @@ -3,9 +3,9 @@ namespace Zalas\Toolbox\Tests\UseCase; use PHPUnit\Framework\TestCase; -use Prophecy\PhpUnit\ProphecyTrait; use Zalas\Toolbox\Tool\Collection; use Zalas\Toolbox\Tool\Command; +use Zalas\Toolbox\Tool\Command\ShCommand; use Zalas\Toolbox\Tool\Filter; use Zalas\Toolbox\Tool\Tool; use Zalas\Toolbox\Tool\Tools; @@ -13,8 +13,6 @@ class TestToolsTest extends TestCase { - use ProphecyTrait; - public function test_it_returns_test_aggregated_test_command() { $testCommands = [ @@ -31,30 +29,28 @@ public function test_it_returns_test_aggregated_test_command() private function tool(Command $testCommand): Tool { - $tool = $this->prophesize(Tool::class); - $tool->testCommand()->willReturn($testCommand); - $tool->tags()->willReturn([]); - - return $tool->reveal(); + return new Tool( + "any name", + "any summary", + "https://example.com", + [], + new Command\ShCommand("any command"), + $testCommand + ); } private function command(string $command): Command { - $c = $this->prophesize(Command::class); - $c->__toString()->willReturn($command); - - return $c->reveal(); + return new ShCommand($command); } private function tools(array $testCommands, Filter $filter): Tools { - $tools = $this->prophesize(Tools::class); - $tools->all($filter)->willReturn(Collection::create([ - $this->tool($testCommands[0]), - $this->tool($testCommands[1]), - ])); - - return $tools->reveal(); + $tools = $this->createStub(Tools::class); + $tools->method('all')->with($filter)->willReturn(Collection::create( + array_map(fn ($command) => $this->tool($command), $testCommands) + )); + return $tools; } private function filter(): Filter From 33435798f91d9cb0f8c32542196607e9095fa696 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 11:18:54 +0000 Subject: [PATCH 100/206] Replace prophecy in ApplicationTest --- tests/Cli/ApplicationTest.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/Cli/ApplicationTest.php b/tests/Cli/ApplicationTest.php index e5ed3960..15ff17ec 100644 --- a/tests/Cli/ApplicationTest.php +++ b/tests/Cli/ApplicationTest.php @@ -2,10 +2,8 @@ namespace Zalas\Toolbox\Tests\Cli; +use PHPUnit\Framework\MockObject\Stub; use PHPUnit\Framework\TestCase; -use Prophecy\Argument; -use Prophecy\PhpUnit\ProphecyTrait; -use Prophecy\Prophecy\ObjectProphecy; use Symfony\Component\Console\Application as CliApplication; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\NullOutput; @@ -17,8 +15,6 @@ class ApplicationTest extends TestCase { - use ProphecyTrait; - private const VERSION = 'test'; /** @@ -27,14 +23,14 @@ class ApplicationTest extends TestCase private $app; /** - * @var ServiceContainer|ObjectProphecy + * @var ServiceContainer|Stub */ private $container; protected function setUp(): void { - $this->container = $this->prophesize(ServiceContainer::class); - $this->app = new Application(self::VERSION, $this->container->reveal()); + $this->container = $this->createStub(ServiceContainer::class); + $this->app = new Application(self::VERSION, $this->container); } public function test_it_is_a_cli_application() @@ -113,7 +109,7 @@ public function test_it_allows_to_override_tools_location() */ public function test_it_runs_the_command_in_dry_run_mode() { - $output = $this->prophesize(OutputInterface::class); + $output = $this->givenOutputThatExpectsMessageWritten('composer global bin phpstan require'); $app = new Application(self::VERSION, new ServiceContainer()); $app->doRun( @@ -123,12 +119,16 @@ public function test_it_runs_the_command_in_dry_run_mode() '--tools' => [__DIR__.'/../resources/tools.json'], '--no-interaction' => true, ]), - $output->reveal() + $output ); + } - $output->writeln(Argument::allOf( - Argument::type('string'), - Argument::containingString('composer global bin phpstan require') - ))->shouldHaveBeenCalled(); + public function givenOutputThatExpectsMessageWritten(string $message): OutputInterface + { + $output = $this->createMock(OutputInterface::class); + $output->expects(self::once()) + ->method('writeln') + ->with(self::stringContains($message)); + return $output; } } From a617aa095cc1d687e13f33ac7ea15f6a4de87d66 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 11:20:13 +0000 Subject: [PATCH 101/206] Replace prophecy in ServiceContainerTest --- tests/Cli/ServiceContainerTest.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/Cli/ServiceContainerTest.php b/tests/Cli/ServiceContainerTest.php index ff1f8030..4cf1a90a 100644 --- a/tests/Cli/ServiceContainerTest.php +++ b/tests/Cli/ServiceContainerTest.php @@ -3,7 +3,6 @@ namespace Zalas\Toolbox\Tests\Cli; use PHPUnit\Framework\TestCase; -use Prophecy\PhpUnit\ProphecyTrait; use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerInterface; use Psr\Container\NotFoundExceptionInterface; @@ -18,8 +17,6 @@ class ServiceContainerTest extends TestCase { - use ProphecyTrait; - /** * @var ServiceContainer */ @@ -28,8 +25,8 @@ class ServiceContainerTest extends TestCase protected function setUp(): void { $this->container = new ServiceContainer(); - $this->container->set(InputInterface::class, $this->prophesize(InputInterface::class)->reveal()); - $this->container->set(OutputInterface::class, $this->prophesize(OutputInterface::class)->reveal()); + $this->container->set(InputInterface::class, $this->createStub(InputInterface::class)); + $this->container->set(OutputInterface::class, $this->createMock(OutputInterface::class)); } public function test_it_is_a_psr_container() @@ -69,7 +66,7 @@ public function test_it_throws_an_exception_if_unregistered_service_is_accessed( public function test_it_registers_a_runtime_service() { - $service = $this->prophesize(InputInterface::class)->reveal(); + $service = $this->createStub(InputInterface::class); $this->container->set(InputInterface::class, $service); From db760fad23f618d4bc222845969465bc5666fe2a Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 11:28:45 +0000 Subject: [PATCH 102/206] Replace prophecy in LazyRunnerTest --- tests/Cli/ServiceContainer/LazyRunnerTest.php | 52 +++++++++++-------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/tests/Cli/ServiceContainer/LazyRunnerTest.php b/tests/Cli/ServiceContainer/LazyRunnerTest.php index 6c533735..2558af6c 100644 --- a/tests/Cli/ServiceContainer/LazyRunnerTest.php +++ b/tests/Cli/ServiceContainer/LazyRunnerTest.php @@ -2,9 +2,8 @@ namespace Zalas\Toolbox\Tests\Cli\ServiceContainer; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Prophecy\PhpUnit\ProphecyTrait; -use Prophecy\Prophecy\ObjectProphecy; use Zalas\Toolbox\Cli\ServiceContainer\LazyRunner; use Zalas\Toolbox\Cli\ServiceContainer\RunnerFactory; use Zalas\Toolbox\Runner\Runner; @@ -12,59 +11,68 @@ class LazyRunnerTest extends TestCase { - use ProphecyTrait; - /** * @var LazyRunner */ - private $runner; + private $lazyRunner; /** - * @var RunnerFactory|ObjectProphecy + * @var RunnerFactory|MockObject */ private $factory; protected function setUp(): void { - $this->factory = $this->prophesize(RunnerFactory::class); + $this->factory = $this->createMock(RunnerFactory::class); - $this->runner = new LazyRunner($this->factory->reveal()); + $this->lazyRunner = new LazyRunner($this->factory); } public function test_it_is_a_runner() { - $this->assertInstanceOf(Runner::class, $this->runner); + $this->assertInstanceOf(Runner::class, $this->lazyRunner); } public function test_it_returns_status_code_of_returned_by_the_created_runner() { $command = $this->command(); - $runner = $this->prophesize(Runner::class); - $runner->run($command)->willReturn(1); - - $this->factory->createRunner()->willReturn($runner); + $runner = $this->givenRunner(command: $command, result: 1); + $this->givenFactoryCreates($runner); - $this->assertSame(1, $this->runner->run($command)); + $this->assertSame(1, $this->lazyRunner->run($command)); } public function test_it_only_initializes_the_runner_once() { $command = $this->command(); - $runner = $this->prophesize(Runner::class); - $runner->run($command)->willReturn(0); - - $this->factory->createRunner()->willReturn($runner); + $runner = $this->givenRunner($command, 0); - $this->runner->run($command); - $this->runner->run($command); + $this->factory + ->expects(self::once()) + ->method('createRunner') + ->willReturn($runner); - $this->factory->createRunner()->shouldHaveBeenCalledTimes(1); + $this->lazyRunner->run($command); + $this->lazyRunner->run($command); } private function command(): Command { - return $this->prophesize(Command::class)->reveal(); + return new Command\ShCommand('any command'); + } + + public function givenRunner(Command $command, int $result): Runner + { + $runner = $this->createStub(Runner::class); + $runner->method('run')->with($command)->willReturn($result); + + return $runner; + } + + private function givenFactoryCreates(Runner $runner): void + { + $this->factory->method('createRunner')->willReturn($runner); } } From 7c098836c843c13fbc578b51ff1558d393fed09b Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 11:59:31 +0000 Subject: [PATCH 103/206] Replace prophecy in RunnerFactoryTest --- .../ServiceContainer/RunnerFactoryTest.php | 75 ++++++++++++------- 1 file changed, 46 insertions(+), 29 deletions(-) diff --git a/tests/Cli/ServiceContainer/RunnerFactoryTest.php b/tests/Cli/ServiceContainer/RunnerFactoryTest.php index 0d415504..464202f7 100644 --- a/tests/Cli/ServiceContainer/RunnerFactoryTest.php +++ b/tests/Cli/ServiceContainer/RunnerFactoryTest.php @@ -2,12 +2,14 @@ namespace Zalas\Toolbox\Tests\Cli\ServiceContainer; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Prophecy\PhpUnit\ProphecyTrait; -use Prophecy\Prophecy\ObjectProphecy; use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerInterface; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Zalas\Toolbox\Cli\Runner\DryRunner; use Zalas\Toolbox\Cli\ServiceContainer\RunnerFactory; @@ -17,10 +19,8 @@ class RunnerFactoryTest extends TestCase { - use ProphecyTrait; - /** - * @var ContainerInterface|ObjectProphecy + * @var ContainerInterface */ private $container; @@ -30,27 +30,41 @@ class RunnerFactoryTest extends TestCase private $runnerFactory; /** - * @var InputInterface|ObjectProphecy + * @var InputInterface */ private $input; /** - * @var OutputInterface|ObjectProphecy + * @var OutputInterface|MockObject */ private $output; protected function setUp(): void { - $this->container = $this->prophesize(ContainerInterface::class); - $this->input = $this->prophesize(InputInterface::class); - $this->output = $this->prophesize(OutputInterface::class); + $this->input = $this->givenInput([]); + $this->output = $this->createStub(OutputInterface::class); + + $this->container = new class([ + InputInterface::class => &$this->input, + OutputInterface::class => &$this->output, + ]) implements ContainerInterface { + + public function __construct(private array $services) + { + } - $this->container->get(InputInterface::class)->willReturn($this->input); - $this->container->get(OutputInterface::class)->willReturn($this->output); - $this->input->getOption('dry-run')->willReturn(false); - $this->input->hasOption('target-dir')->willReturn(false); + public function get(string $id) + { + return $this->services[$id]; + } - $this->runnerFactory = new RunnerFactory($this->container->reveal()); + public function has(string $id): bool + { + return isset($this->services[$id]); + } + }; + + $this->runnerFactory = new RunnerFactory($this->container); } public function test_it_creates_the_passthru_runner_by_default() @@ -62,7 +76,7 @@ public function test_it_creates_the_passthru_runner_by_default() public function test_it_creates_the_dry_runner_if_dry_run_option_is_passed() { - $this->input->getOption('dry-run')->willReturn(true); + $this->givenInput(['--dry-run' => true]); $runner = $this->runnerFactory->createRunner(); @@ -71,8 +85,7 @@ public function test_it_creates_the_dry_runner_if_dry_run_option_is_passed() public function test_it_creates_the_parametrised_runner_if_target_dir_option_is_present() { - $this->input->hasOption('target-dir')->willReturn(true); - $this->input->getOption('target-dir')->willReturn('/usr/local/bin'); + $this->givenInput(['--target-dir' => '/usr/local/bin']); $runner = $this->runnerFactory->createRunner(); @@ -81,9 +94,9 @@ public function test_it_creates_the_parametrised_runner_if_target_dir_option_is_ public function test_the_parametrised_runner_includes_the_target_dir_parameter() { - $this->input->hasOption('target-dir')->willReturn(true); - $this->input->getOption('target-dir')->willReturn('/usr/local/bin'); - $this->input->getOption('dry-run')->willReturn(true); + $this->givenInput(['--target-dir' => '/usr/local/bin', '--dry-run' => true]); + + $this->output->expects(self::once())->method('writeln')->with('ls /usr/local/bin'); $runner = $this->runnerFactory->createRunner(); @@ -93,25 +106,22 @@ public function __toString(): string return 'ls %target-dir%'; } }); - - $this->output->writeln('ls /usr/local/bin')->shouldHaveBeenCalled(); } public function test_it_throws_an_exception_if_target_dir_does_not_exist() { $this->expectException(ContainerExceptionInterface::class); - $this->input->hasOption('target-dir')->willReturn(true); - $this->input->getOption('target-dir')->willReturn('/foo/bar/baz'); + $this->givenInput(['--target-dir' => '/foo/bar/baz']); $this->runnerFactory->createRunner(); } public function test_it_uses_the_real_path_as_target_dir() { - $this->input->hasOption('target-dir')->willReturn(true); - $this->input->getOption('target-dir')->willReturn(__DIR__.'/../../../bin'); - $this->input->getOption('dry-run')->willReturn(true); + $this->givenInput(['--target-dir' => __DIR__.'/../../../bin', '--dry-run' => true]); + + $this->output->expects(self::once())->method('writeln')->with(\sprintf('ls %s', \realpath(__DIR__.'/../../../bin'))); $runner = $this->runnerFactory->createRunner(); $runner->run(new class implements Command { @@ -120,7 +130,14 @@ public function __toString(): string return 'ls %target-dir%'; } }); + } - $this->output->writeln(\sprintf('ls %s', \realpath(__DIR__.'/../../../bin')))->shouldHaveBeenCalled(); + private function givenInput(array $parameters): InputInterface + { + $this->input = new ArrayInput($parameters, new InputDefinition(array_filter([ + new InputOption('dry-run', null, InputOption::VALUE_NONE), + isset($parameters['--target-dir']) ? new InputOption('target-dir', null, InputOption::VALUE_REQUIRED) : null, + ]))); + return $this->input; } } From 705ad71ed12be5f92bff8bcbb97bb85f7fa8b08d Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 12:01:01 +0000 Subject: [PATCH 104/206] Replace prophecy in DryRunnerTest --- tests/Cli/Runner/DryRunnerTest.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/tests/Cli/Runner/DryRunnerTest.php b/tests/Cli/Runner/DryRunnerTest.php index a0f20a4f..032ea609 100644 --- a/tests/Cli/Runner/DryRunnerTest.php +++ b/tests/Cli/Runner/DryRunnerTest.php @@ -2,9 +2,8 @@ namespace Zalas\Toolbox\Tests\Cli\Runner; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Prophecy\PhpUnit\ProphecyTrait; -use Prophecy\Prophecy\ObjectProphecy; use Symfony\Component\Console\Output\OutputInterface; use Zalas\Toolbox\Cli\Runner\DryRunner; use Zalas\Toolbox\Runner\Runner; @@ -12,22 +11,20 @@ class DryRunnerTest extends TestCase { - use ProphecyTrait; - /** * @var DryRunner */ private $runner; /** - * @var OutputInterface|ObjectProphecy + * @var OutputInterface|MockObject */ private $out; protected function setUp(): void { - $this->out = $this->prophesize(OutputInterface::class); - $this->runner = new DryRunner($this->out->reveal()); + $this->out = $this->createMock(OutputInterface::class); + $this->runner = new DryRunner($this->out); } public function test_it_is_a_runner() @@ -37,6 +34,10 @@ public function test_it_is_a_runner() public function test_it_sends_the_command_to_the_output() { + $this->out->expects(self::once()) + ->method('writeln') + ->with('echo "Foo"'); + $result = $this->runner->run(new class implements Command { public function __toString(): string { @@ -44,8 +45,6 @@ public function __toString(): string } }); - $this->out->writeln('echo "Foo"')->shouldHaveBeenCalled(); - $this->assertSame(0, $result); } } From ef829f7d1490570456f7d20a08ac097ea0edc581 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 12:05:42 +0000 Subject: [PATCH 105/206] Replace prophecy in InstallCommandTest --- tests/Cli/Command/InstallCommandTest.php | 43 ++++++++++-------------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/tests/Cli/Command/InstallCommandTest.php b/tests/Cli/Command/InstallCommandTest.php index 20c8b20a..8480777d 100644 --- a/tests/Cli/Command/InstallCommandTest.php +++ b/tests/Cli/Command/InstallCommandTest.php @@ -2,35 +2,32 @@ namespace Zalas\Toolbox\Tests\Cli\Command; -use Prophecy\Argument; -use Prophecy\PhpUnit\ProphecyTrait; -use Prophecy\Prophecy\ObjectProphecy; +use PHPUnit\Framework\MockObject\MockObject; use Zalas\Toolbox\Cli\Command\InstallCommand; use Zalas\Toolbox\Runner\Runner; use Zalas\Toolbox\Tool\Command; +use Zalas\Toolbox\Tool\Command\ShCommand; use Zalas\Toolbox\Tool\Filter; use Zalas\Toolbox\UseCase\InstallTools; class InstallCommandTest extends ToolboxCommandTestCase { - use ProphecyTrait; - protected const CLI_COMMAND_NAME = InstallCommand::NAME; /** - * @var Runner|ObjectProphecy + * @var Runner|MockObject */ private $runner; /** - * @var InstallTools|ObjectProphecy + * @var InstallTools|MockObject */ private $useCase; protected function setUp(): void { - $this->runner = $this->prophesize(Runner::class); - $this->useCase = $this->prophesize(InstallTools::class); + $this->runner = $this->createMock(Runner::class); + $this->useCase = $this->createMock(InstallTools::class); parent::setUp(); } @@ -38,20 +35,18 @@ protected function setUp(): void public function test_it_runs_the_install_tools_use_case() { $command = $this->createCommand(); - $this->useCase->__invoke(Argument::type(Filter::class))->willReturn($command); - $this->runner->run($command)->willReturn(0); + $this->useCase->method('__invoke')->willReturn($command); + $this->runner->expects(self::once())->method('run')->with($command)->willReturn(0); $tester = $this->executeCliCommand(); - $this->runner->run($command)->shouldHaveBeenCalled(); - $this->assertSame(0, $tester->getStatusCode()); } public function test_it_returns_the_status_code_of_the_run() { - $this->useCase->__invoke(Argument::type(Filter::class))->willReturn($this->createCommand()); - $this->runner->run(Argument::any())->willReturn(1); + $this->useCase->method('__invoke')->willReturn($this->createCommand()); + $this->runner->method('run')->willReturn(1); $tester = $this->executeCliCommand(); @@ -60,12 +55,13 @@ public function test_it_returns_the_status_code_of_the_run() public function test_it_filters_by_tags() { - $this->useCase->__invoke(Argument::type(Filter::class))->willReturn($this->createCommand()); - $this->runner->run(Argument::any())->willReturn(0); + $this->useCase->expects(self::once()) + ->method('__invoke') + ->with(new Filter(['foo'], ['bar'])) + ->willReturn($this->createCommand()); + $this->runner->method('run')->willReturn(0); $this->executeCliCommand(['--exclude-tag' => ['foo'], '--tag' => ['bar']]); - - $this->useCase->__invoke(new Filter(['foo'], ['bar']))->shouldBeCalled(); } public function test_it_defines_dry_run_option() @@ -118,16 +114,13 @@ public function test_it_takes_the_tag_option_default_from_environment_if_present protected function getContainerTestDoubles(): array { return [ - Runner::class => $this->runner->reveal(), - InstallTools::class => $this->useCase->reveal(), + Runner::class => $this->runner, + InstallTools::class => $this->useCase, ]; } private function createCommand(): Command { - $command = $this->prophesize(Command::class); - $command->__toString()->willReturn('echo "foo"'); - - return $command->reveal(); + return new ShCommand('echo "foo"'); } } From 8666ef6f340f8735653c1a5a5151d65c6719ea4e Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 12:06:49 +0000 Subject: [PATCH 106/206] Fix cs --- tests/Cli/ApplicationTest.php | 1 + tests/Cli/ServiceContainer/LazyRunnerTest.php | 10 +++++----- tests/Cli/ServiceContainer/RunnerFactoryTest.php | 8 +++----- tests/UseCase/ListToolsTest.php | 1 + tests/UseCase/TestToolsTest.php | 3 ++- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/tests/Cli/ApplicationTest.php b/tests/Cli/ApplicationTest.php index 15ff17ec..975b240a 100644 --- a/tests/Cli/ApplicationTest.php +++ b/tests/Cli/ApplicationTest.php @@ -129,6 +129,7 @@ public function givenOutputThatExpectsMessageWritten(string $message): OutputInt $output->expects(self::once()) ->method('writeln') ->with(self::stringContains($message)); + return $output; } } diff --git a/tests/Cli/ServiceContainer/LazyRunnerTest.php b/tests/Cli/ServiceContainer/LazyRunnerTest.php index 2558af6c..4144b012 100644 --- a/tests/Cli/ServiceContainer/LazyRunnerTest.php +++ b/tests/Cli/ServiceContainer/LazyRunnerTest.php @@ -58,11 +58,6 @@ public function test_it_only_initializes_the_runner_once() $this->lazyRunner->run($command); } - private function command(): Command - { - return new Command\ShCommand('any command'); - } - public function givenRunner(Command $command, int $result): Runner { $runner = $this->createStub(Runner::class); @@ -71,6 +66,11 @@ public function givenRunner(Command $command, int $result): Runner return $runner; } + private function command(): Command + { + return new Command\ShCommand('any command'); + } + private function givenFactoryCreates(Runner $runner): void { $this->factory->method('createRunner')->willReturn($runner); diff --git a/tests/Cli/ServiceContainer/RunnerFactoryTest.php b/tests/Cli/ServiceContainer/RunnerFactoryTest.php index 464202f7..22860d1f 100644 --- a/tests/Cli/ServiceContainer/RunnerFactoryTest.php +++ b/tests/Cli/ServiceContainer/RunnerFactoryTest.php @@ -44,10 +44,7 @@ protected function setUp(): void $this->input = $this->givenInput([]); $this->output = $this->createStub(OutputInterface::class); - $this->container = new class([ - InputInterface::class => &$this->input, - OutputInterface::class => &$this->output, - ]) implements ContainerInterface { + $this->container = new class([ InputInterface::class => &$this->input, OutputInterface::class => &$this->output, ]) implements ContainerInterface { public function __construct(private array $services) { @@ -134,10 +131,11 @@ public function __toString(): string private function givenInput(array $parameters): InputInterface { - $this->input = new ArrayInput($parameters, new InputDefinition(array_filter([ + $this->input = new ArrayInput($parameters, new InputDefinition(\array_filter([ new InputOption('dry-run', null, InputOption::VALUE_NONE), isset($parameters['--target-dir']) ? new InputOption('target-dir', null, InputOption::VALUE_REQUIRED) : null, ]))); + return $this->input; } } diff --git a/tests/UseCase/ListToolsTest.php b/tests/UseCase/ListToolsTest.php index 929138dc..fe1b1adb 100644 --- a/tests/UseCase/ListToolsTest.php +++ b/tests/UseCase/ListToolsTest.php @@ -46,6 +46,7 @@ private function givenToolsFor(Filter $filter, Collection $tools): Tools { $repository = $this->createStub(Tools::class); $repository->method('all')->with($filter)->willReturn($tools); + return $repository; } } diff --git a/tests/UseCase/TestToolsTest.php b/tests/UseCase/TestToolsTest.php index 5f410b2c..f0afd517 100644 --- a/tests/UseCase/TestToolsTest.php +++ b/tests/UseCase/TestToolsTest.php @@ -48,8 +48,9 @@ private function tools(array $testCommands, Filter $filter): Tools { $tools = $this->createStub(Tools::class); $tools->method('all')->with($filter)->willReturn(Collection::create( - array_map(fn ($command) => $this->tool($command), $testCommands) + \array_map(fn ($command) => $this->tool($command), $testCommands) )); + return $tools; } From 6259c609aa481d7e81e7803c5e7945e8cf70a3a4 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 12:53:05 +0000 Subject: [PATCH 107/206] Replace prophecy in ListCommandTest --- tests/Cli/Command/ListCommandTest.php | 41 ++++++++++++++------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/tests/Cli/Command/ListCommandTest.php b/tests/Cli/Command/ListCommandTest.php index a45be286..fb064a10 100644 --- a/tests/Cli/Command/ListCommandTest.php +++ b/tests/Cli/Command/ListCommandTest.php @@ -2,36 +2,34 @@ namespace Zalas\Toolbox\Tests\Cli\Command; -use Prophecy\Argument; -use Prophecy\PhpUnit\ProphecyTrait; -use Prophecy\Prophecy\ObjectProphecy; +use PHPUnit\Framework\MockObject\MockObject; use Zalas\Toolbox\Cli\Command\ListCommand; use Zalas\Toolbox\Tool\Collection; +use Zalas\Toolbox\Tool\Command\ShCommand; +use Zalas\Toolbox\Tool\Command\TestCommand; use Zalas\Toolbox\Tool\Filter; use Zalas\Toolbox\Tool\Tool; use Zalas\Toolbox\UseCase\ListTools; class ListCommandTest extends ToolboxCommandTestCase { - use ProphecyTrait; - protected const CLI_COMMAND_NAME = ListCommand::NAME; /** - * @var ListTools|ObjectProphecy + * @var ListTools|MockObject */ private $useCase; protected function setUp(): void { - $this->useCase = $this->prophesize(ListTools::class); + $this->useCase = $this->createMock(ListTools::class); parent::setUp(); } public function test_it_runs_the_list_tools_use_case() { - $this->useCase->__invoke(Argument::type(Filter::class))->willReturn(Collection::create([ + $this->useCase->method('__invoke')->willReturn(Collection::create([ $this->createTool('Behat', 'Tests business expectations', 'http://behat.org'), ])); @@ -44,13 +42,14 @@ public function test_it_runs_the_list_tools_use_case() public function test_it_filters_by_tags() { - $this->useCase->__invoke(Argument::type(Filter::class))->willReturn(Collection::create([ - $this->createTool('Behat', 'Tests business expectations', 'http://behat.org'), - ])); + $this->useCase->expects(self::once()) + ->method('__invoke') + ->with(new Filter(['foo'], ['bar'])) + ->willReturn(Collection::create([ + $this->createTool('Behat', 'Tests business expectations', 'http://behat.org'), + ])); $this->executeCliCommand(['--exclude-tag' => ['foo'], '--tag' => ['bar']]); - - $this->useCase->__invoke(new Filter(['foo'], ['bar']))->shouldHaveBeenCalled(); } public function test_it_defines_exclude_tag_option() @@ -83,17 +82,19 @@ public function test_it_takes_the_tag_option_default_from_environment_if_present protected function getContainerTestDoubles(): array { return [ - ListTools::class => $this->useCase->reveal(), + ListTools::class => $this->useCase, ]; } private function createTool(string $name, string $summary, string $website): Tool { - $tool = $this->prophesize(Tool::class); - $tool->name()->willReturn($name); - $tool->summary()->willReturn($summary); - $tool->website()->willReturn($website); - - return $tool->reveal(); + return new Tool( + $name, + $summary, + $website, + [], + new ShCommand('any command'), + new TestCommand('any test command', 'any') + ); } } From 08836c091694c0d90400501eae699506f44b82ea Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 12:58:08 +0000 Subject: [PATCH 108/206] Replace prophecy in TestCommandTest --- tests/Cli/Command/TestCommandTest.php | 42 +++++++++++---------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/tests/Cli/Command/TestCommandTest.php b/tests/Cli/Command/TestCommandTest.php index 43ee76fc..be6fb590 100644 --- a/tests/Cli/Command/TestCommandTest.php +++ b/tests/Cli/Command/TestCommandTest.php @@ -2,35 +2,32 @@ namespace Zalas\Toolbox\Tests\Cli\Command; -use Prophecy\Argument; -use Prophecy\PhpUnit\ProphecyTrait; -use Prophecy\Prophecy\ObjectProphecy; +use PHPUnit\Framework\MockObject\Stub; use Zalas\Toolbox\Cli\Command\TestCommand; use Zalas\Toolbox\Runner\Runner; use Zalas\Toolbox\Tool\Command; +use Zalas\Toolbox\Tool\Command\ShCommand; use Zalas\Toolbox\Tool\Filter; use Zalas\Toolbox\UseCase\TestTools; class TestCommandTest extends ToolboxCommandTestCase { - use ProphecyTrait; - protected const CLI_COMMAND_NAME = TestCommand::NAME; /** - * @var Runner|ObjectProphecy + * @var Runner|Stub */ private $runner; /** - * @var TestTools|ObjectProphecy + * @var TestTools|Stub */ private $useCase; protected function setUp(): void { - $this->runner = $this->prophesize(Runner::class); - $this->useCase = $this->prophesize(TestTools::class); + $this->runner = $this->createStub(Runner::class); + $this->useCase = $this->createStub(TestTools::class); parent::setUp(); } @@ -38,20 +35,18 @@ protected function setUp(): void public function test_it_runs_the_test_tools_use_case() { $command = $this->createCommand(); - $this->useCase->__invoke(Argument::type(Filter::class))->willReturn($command); - $this->runner->run($command)->willReturn(0); + $this->useCase->method('__invoke')->willReturn($command); + $this->runner->method('run')->with($command)->willReturn(0); $tester = $this->executeCliCommand(); - $this->runner->run($command)->shouldHaveBeenCalled(); - $this->assertSame(0, $tester->getStatusCode()); } public function test_it_returns_the_status_code_of_the_run() { - $this->useCase->__invoke(Argument::type(Filter::class))->willReturn($this->createCommand()); - $this->runner->run(Argument::any())->willReturn(1); + $this->useCase->method('__invoke')->willReturn($this->createCommand()); + $this->runner->method('run')->willReturn(1); $tester = $this->executeCliCommand(); @@ -60,12 +55,12 @@ public function test_it_returns_the_status_code_of_the_run() public function test_it_filters_by_tags() { - $this->useCase->__invoke(Argument::type(Filter::class))->willReturn($this->createCommand()); - $this->runner->run(Argument::any())->willReturn(0); + $this->useCase->method('__invoke')->with(new Filter(['foo'], ['bar']))->willReturn($this->createCommand()); + $this->runner->method('run')->willReturn(0); - $this->executeCliCommand(['--exclude-tag' => ['foo'], '--tag' => ['bar']]); + $tester = $this->executeCliCommand(['--exclude-tag' => ['foo'], '--tag' => ['bar']]); - $this->useCase->__invoke(new Filter(['foo'], ['bar']))->shouldBeCalled(); + $this->assertSame(0, $tester->getStatusCode()); } public function test_it_defines_dry_run_option() @@ -117,16 +112,13 @@ public function test_it_takes_the_tag_option_default_from_environment_if_present protected function getContainerTestDoubles(): array { return [ - Runner::class => $this->runner->reveal(), - TestTools::class => $this->useCase->reveal(), + Runner::class => $this->runner, + TestTools::class => $this->useCase, ]; } private function createCommand(): Command { - $command = $this->prophesize(Command::class); - $command->__toString()->willReturn('true'); - - return $command->reveal(); + return new ShCommand('true'); } } From ec6ba1f1a9c67b1f455ddd2d96f108c47807cecf Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 12:59:16 +0000 Subject: [PATCH 109/206] Do not use a mock object when a stub will do --- tests/Cli/Command/InstallCommandTest.php | 18 ++++++++++-------- tests/Cli/Command/ListCommandTest.php | 13 +++++++------ tests/Cli/ServiceContainerTest.php | 2 +- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/tests/Cli/Command/InstallCommandTest.php b/tests/Cli/Command/InstallCommandTest.php index 8480777d..4d4a5e2d 100644 --- a/tests/Cli/Command/InstallCommandTest.php +++ b/tests/Cli/Command/InstallCommandTest.php @@ -2,7 +2,7 @@ namespace Zalas\Toolbox\Tests\Cli\Command; -use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\MockObject\Stub; use Zalas\Toolbox\Cli\Command\InstallCommand; use Zalas\Toolbox\Runner\Runner; use Zalas\Toolbox\Tool\Command; @@ -15,19 +15,19 @@ class InstallCommandTest extends ToolboxCommandTestCase protected const CLI_COMMAND_NAME = InstallCommand::NAME; /** - * @var Runner|MockObject + * @var Runner|Stub */ private $runner; /** - * @var InstallTools|MockObject + * @var InstallTools|Stub */ private $useCase; protected function setUp(): void { - $this->runner = $this->createMock(Runner::class); - $this->useCase = $this->createMock(InstallTools::class); + $this->runner = $this->createStub(Runner::class); + $this->useCase = $this->createStub(InstallTools::class); parent::setUp(); } @@ -36,7 +36,7 @@ public function test_it_runs_the_install_tools_use_case() { $command = $this->createCommand(); $this->useCase->method('__invoke')->willReturn($command); - $this->runner->expects(self::once())->method('run')->with($command)->willReturn(0); + $this->runner->method('run')->with($command)->willReturn(0); $tester = $this->executeCliCommand(); @@ -55,13 +55,15 @@ public function test_it_returns_the_status_code_of_the_run() public function test_it_filters_by_tags() { - $this->useCase->expects(self::once()) + $this->useCase ->method('__invoke') ->with(new Filter(['foo'], ['bar'])) ->willReturn($this->createCommand()); $this->runner->method('run')->willReturn(0); - $this->executeCliCommand(['--exclude-tag' => ['foo'], '--tag' => ['bar']]); + $tester = $this->executeCliCommand(['--exclude-tag' => ['foo'], '--tag' => ['bar']]); + + $this->assertSame(0, $tester->getStatusCode()); } public function test_it_defines_dry_run_option() diff --git a/tests/Cli/Command/ListCommandTest.php b/tests/Cli/Command/ListCommandTest.php index fb064a10..a44eeea4 100644 --- a/tests/Cli/Command/ListCommandTest.php +++ b/tests/Cli/Command/ListCommandTest.php @@ -2,7 +2,7 @@ namespace Zalas\Toolbox\Tests\Cli\Command; -use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\MockObject\Stub; use Zalas\Toolbox\Cli\Command\ListCommand; use Zalas\Toolbox\Tool\Collection; use Zalas\Toolbox\Tool\Command\ShCommand; @@ -16,13 +16,13 @@ class ListCommandTest extends ToolboxCommandTestCase protected const CLI_COMMAND_NAME = ListCommand::NAME; /** - * @var ListTools|MockObject + * @var ListTools|Stub */ private $useCase; protected function setUp(): void { - $this->useCase = $this->createMock(ListTools::class); + $this->useCase = $this->createStub(ListTools::class); parent::setUp(); } @@ -42,14 +42,15 @@ public function test_it_runs_the_list_tools_use_case() public function test_it_filters_by_tags() { - $this->useCase->expects(self::once()) - ->method('__invoke') + $this->useCase->method('__invoke') ->with(new Filter(['foo'], ['bar'])) ->willReturn(Collection::create([ $this->createTool('Behat', 'Tests business expectations', 'http://behat.org'), ])); - $this->executeCliCommand(['--exclude-tag' => ['foo'], '--tag' => ['bar']]); + $tester = $this->executeCliCommand(['--exclude-tag' => ['foo'], '--tag' => ['bar']]); + + $this->assertSame(0, $tester->getStatusCode()); } public function test_it_defines_exclude_tag_option() diff --git a/tests/Cli/ServiceContainerTest.php b/tests/Cli/ServiceContainerTest.php index 4cf1a90a..5cf05849 100644 --- a/tests/Cli/ServiceContainerTest.php +++ b/tests/Cli/ServiceContainerTest.php @@ -26,7 +26,7 @@ protected function setUp(): void { $this->container = new ServiceContainer(); $this->container->set(InputInterface::class, $this->createStub(InputInterface::class)); - $this->container->set(OutputInterface::class, $this->createMock(OutputInterface::class)); + $this->container->set(OutputInterface::class, $this->createStub(OutputInterface::class)); } public function test_it_is_a_psr_container() From ea406322bf44c6cd0827cd84a7fa1c153f85c652 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 13:06:05 +0000 Subject: [PATCH 110/206] Replace prophecy in ParametrisedRunnerTest --- tests/Runner/ParametrisedRunnerTest.php | 32 +++++++++++-------------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/tests/Runner/ParametrisedRunnerTest.php b/tests/Runner/ParametrisedRunnerTest.php index 7d25f36f..c3934540 100644 --- a/tests/Runner/ParametrisedRunnerTest.php +++ b/tests/Runner/ParametrisedRunnerTest.php @@ -2,32 +2,29 @@ namespace Zalas\Toolbox\Tests\Runner; +use PHPUnit\Framework\MockObject\Stub; use PHPUnit\Framework\TestCase; -use Prophecy\Argument; -use Prophecy\PhpUnit\ProphecyTrait; -use Prophecy\Prophecy\ObjectProphecy; use Zalas\Toolbox\Runner\ParametrisedRunner; use Zalas\Toolbox\Runner\Runner; use Zalas\Toolbox\Tool\Command; +use Zalas\Toolbox\Tool\Command\ShCommand; class ParametrisedRunnerTest extends TestCase { - use ProphecyTrait; - /** * @var ParametrisedRunner */ private $runner; /** - * @var Runner|ObjectProphecy + * @var Runner|Stub */ private $decoratedRunner; protected function setUp(): void { - $this->decoratedRunner = $this->prophesize(Runner::class); - $this->runner = new ParametrisedRunner($this->decoratedRunner->reveal(), ['%foo%' => 'ABC']); + $this->decoratedRunner = $this->createStub(Runner::class); + $this->runner = new ParametrisedRunner($this->decoratedRunner, ['%foo%' => 'ABC']); } public function test_it_is_a_runner() @@ -39,13 +36,15 @@ public function test_it_replaces_parameter_holders_in_the_command_before_running { $command = $this->command('echo "%foo%"'); - $this->decoratedRunner->run(Argument::that(function (Command $c) { - if ('echo "ABC"' !== $c->__toString()) { - throw new \RuntimeException(\sprintf('Expected `echo "ABC"`, but got `%s`.', $c->__toString())); - } + $this->decoratedRunner->method('run') + ->with(self::callback(function (Command $c) { + if ('echo "ABC"' !== $c->__toString()) { + throw new \RuntimeException(\sprintf('Expected `echo "ABC"`, but got `%s`.', $c->__toString())); + } - return true; - }))->willReturn(42); + return true; + })) + ->willReturn(42); $exitCode = $this->runner->run($command); @@ -54,9 +53,6 @@ public function test_it_replaces_parameter_holders_in_the_command_before_running private function command(string $commandString): Command { - $command = $this->prophesize(Command::class); - $command->__toString()->willReturn($commandString); - - return $command->reveal(); + return new ShCommand($commandString); } } From ac2140ad96b9a5b084e9ad8489b5515c6159b9e7 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 13:07:14 +0000 Subject: [PATCH 111/206] Replace prophecy in FilterTest --- tests/Tool/FilterTest.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/Tool/FilterTest.php b/tests/Tool/FilterTest.php index 5688884c..7444e212 100644 --- a/tests/Tool/FilterTest.php +++ b/tests/Tool/FilterTest.php @@ -3,14 +3,13 @@ namespace Zalas\Toolbox\Tests\Tool; use PHPUnit\Framework\TestCase; -use Prophecy\PhpUnit\ProphecyTrait; +use Zalas\Toolbox\Tool\Command\ShCommand; +use Zalas\Toolbox\Tool\Command\TestCommand; use Zalas\Toolbox\Tool\Filter; use Zalas\Toolbox\Tool\Tool; class FilterTest extends TestCase { - use ProphecyTrait; - public function test_it_returns_true_if_no_excluded_tags_were_defined() { $filter = new Filter([], []); @@ -97,9 +96,13 @@ public function test_it_returns_false_if_a_tag_is_both_included_and_excluded() private function tool(array $tags): Tool { - $tool = $this->prophesize(Tool::class); - $tool->tags()->willReturn($tags); - - return $tool->reveal(); + return new Tool( + 'any name', + 'any summary', + 'https://example.com', + $tags, + new ShCommand('any command'), + new TestCommand('any test command', 'any') + ); } } From 56bb68c746684dcc237cd769d7487b79cb22cdc7 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 13:09:10 +0000 Subject: [PATCH 112/206] Replace prophecy in ToolTest --- tests/Tool/ToolTest.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tests/Tool/ToolTest.php b/tests/Tool/ToolTest.php index 2dd24433..e7b1449f 100644 --- a/tests/Tool/ToolTest.php +++ b/tests/Tool/ToolTest.php @@ -4,19 +4,16 @@ namespace Zalas\Toolbox\Tests\Tool; use PHPUnit\Framework\TestCase; -use Prophecy\PhpUnit\ProphecyTrait; use TypeError; -use Zalas\Toolbox\Tool\Command; +use Zalas\Toolbox\Tool\Command\ShCommand; use Zalas\Toolbox\Tool\Tool; class ToolTest extends TestCase { - use ProphecyTrait; - public function test_it_exposes_its_properties() { - $command = $this->prophesize(Command::class)->reveal(); - $testCommand = $this->prophesize(Command::class)->reveal(); + $command = $this->anyCommand(); + $testCommand = $this->anyCommand(); $tool = new Tool('phpstan', 'Static analysis tool', 'https://github.com/phpstan/phpstan', ['qa', 'static-analysis'], $command, $testCommand); @@ -31,9 +28,17 @@ public function test_it_exposes_its_properties() public function test_tags_can_only_be_strings() { $this->expectException(TypeError::class); - $command = $this->prophesize(Command::class)->reveal(); - $testCommand = $this->prophesize(Command::class)->reveal(); + $command = $this->anyCommand(); + $testCommand = $this->anyCommand(); new Tool('phpstan', 'Static analysis tool', 'https://github.com/phpstan/phpstan', [['qa'], ['static-analysis']], $command, $testCommand); } + + /** + * @return object + */ + public function anyCommand(): object + { + return new ShCommand('any command'); + } } From 63b71ff1472932cdfcee4f15e845cc1f6205d692 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 13:09:54 +0000 Subject: [PATCH 113/206] Replace prophecy in MultiStepCommandTest^ --- tests/Tool/Command/MultiStepCommandTest.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/Tool/Command/MultiStepCommandTest.php b/tests/Tool/Command/MultiStepCommandTest.php index 14e06a11..ff9ef985 100644 --- a/tests/Tool/Command/MultiStepCommandTest.php +++ b/tests/Tool/Command/MultiStepCommandTest.php @@ -4,15 +4,13 @@ use InvalidArgumentException; use PHPUnit\Framework\TestCase; -use Prophecy\PhpUnit\ProphecyTrait; use Zalas\Toolbox\Tool\Collection; use Zalas\Toolbox\Tool\Command; use Zalas\Toolbox\Tool\Command\MultiStepCommand; +use Zalas\Toolbox\Tool\Command\ShCommand; class MultiStepCommandTest extends TestCase { - use ProphecyTrait; - public function test_it_is_a_command() { $command = new MultiStepCommand(Collection::create([$this->command('echo "A"')])); @@ -49,9 +47,6 @@ public function test_it_throws_an_exception_if_there_is_no_steps() private function command(string $commandString): Command { - $command = $this->prophesize(Command::class); - $command->__toString()->willReturn($commandString); - - return $command->reveal(); + return new ShCommand($commandString); } } From 785a7b54750676128abdd27c8d96df8c4e497a40 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 13:12:05 +0000 Subject: [PATCH 114/206] Uninstall prophecy integration for phpunit --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 5782f260..bc1b0f98 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,6 @@ "require-dev": { "phpunit/phpunit": "^9.5", "zalas/phpunit-globals": "^2.1", - "phpspec/prophecy-phpunit": "^2.0", "infection/infection": "^0.26" }, "autoload": { From 8496c3a58e578c44e5f3207485f330806da12a70 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 13:17:34 +0000 Subject: [PATCH 115/206] Update psr/container --- composer.json | 2 +- src/Cli/ServiceContainer.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index bc1b0f98..32528efa 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "require": { "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "symfony/console": "^4.4 || ^5.4 || ^6.1", - "psr/container": "^1.0" + "psr/container": "^2.0" }, "require-dev": { "phpunit/phpunit": "^9.5", diff --git a/src/Cli/ServiceContainer.php b/src/Cli/ServiceContainer.php index 1cd3d9f5..11996ec7 100644 --- a/src/Cli/ServiceContainer.php +++ b/src/Cli/ServiceContainer.php @@ -51,7 +51,7 @@ public function set(string $id, /*object */$service): void /** * {@inheritdoc} */ - public function get($id) + public function get(string $id) { if (isset($this->runtimeServices[$id])) { return $this->runtimeServices[$id]; @@ -68,7 +68,7 @@ public function get($id) /** * {@inheritdoc} */ - public function has($id) + public function has(string $id): bool { return isset($this->services[$id]) || isset($this->runtimeServices[$id]); } From 5c95fd32422f1ffd138b2832a56fe1057cb1f9e8 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 13:21:28 +0000 Subject: [PATCH 116/206] Drop Symfony 4 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 32528efa..12d5bdb9 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "type": "project", "require": { "php": "~8.0.0 || ~8.1.0 || ~8.2.0", - "symfony/console": "^4.4 || ^5.4 || ^6.1", + "symfony/console": "^5.4.31 || ^6.3", "psr/container": "^2.0" }, "require-dev": { From 11c97cc19edd496b0bac93d2fc837ad801108a4e Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 13:29:17 +0000 Subject: [PATCH 117/206] Raise the minimal php 8.0 version to match Symfony --- Makefile | 4 ++-- composer.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 35386d75..a8e20cdd 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ package: tools/box sed -e 's/Application('"'"'dev/Application('"'"'$(TOOLBOX_VERSION)/g' bin/toolbox.php > build/phar/bin/toolbox.php cd build/phar && \ - composer config platform.php 8.0.0 && \ + composer config platform.php 8.0.2 && \ composer update --no-dev -o -a tools/box compile @@ -84,7 +84,7 @@ package-devkit: tools/box sed -e 's/\(Application(.*\)'"'"'dev/\1'"'"'$(TOOLBOX_VERSION)/g' bin/devkit.php > build/devkit-phar/bin/devkit.php cd build/devkit-phar && \ - composer config platform.php 8.0.0 && \ + composer config platform.php 8.0.2 && \ composer update --no-dev -o -a tools/box compile -c box-devkit.json.dist diff --git a/composer.json b/composer.json index 12d5bdb9..978cb7f6 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Helps to discover and install tools", "type": "project", "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "php": "~8.0.2 || ~8.1.0 || ~8.2.0", "symfony/console": "^5.4.31 || ^6.3", "psr/container": "^2.0" }, From 85b6122d277d5826f91f65cbc341e8838bb3eec3 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 20:34:21 +0000 Subject: [PATCH 118/206] Drop PHP 8.0 support --- .github/workflows/build.yml | 10 +- .github/workflows/publish-website.yml | 2 +- .github/workflows/update-phars.yml | 2 +- .scrutinizer.yml | 2 +- Makefile | 14 +-- README.md | 162 +++++++++++++------------- bin/devkit.php | 7 +- composer.json | 2 +- resources/architecture.json | 2 +- resources/composer.json | 2 +- resources/documentation.json | 2 +- resources/linting.json | 2 +- resources/pre-installation.json | 2 +- resources/test.json | 6 +- resources/tools.json | 2 +- 15 files changed, 104 insertions(+), 115 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 48320d91..ecd5fbfd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,10 +20,10 @@ jobs: name: Build and test strategy: matrix: - php: [8.0, 8.1, 8.2] + php: [8.1, 8.2] deps: [high] include: - - php: 8.0 + - php: 8.1 deps: low steps: @@ -44,13 +44,13 @@ jobs: run: make update-min test-min - uses: actions/upload-artifact@v1 - if: matrix.php == '8.0' && matrix.deps == 'high' + if: matrix.php == '8.1' && matrix.deps == 'high' with: name: toolbox.phar path: build/toolbox.phar - uses: actions/upload-artifact@v1 - if: matrix.php == '8.0' && matrix.deps == 'high' + if: matrix.php == '8.1' && matrix.deps == 'high' with: name: devkit.phar path: build/devkit.phar @@ -61,7 +61,7 @@ jobs: needs: tests strategy: matrix: - php: [8.0, 8.1, 8.2] + php: [8.1, 8.2] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/publish-website.yml b/.github/workflows/publish-website.yml index 1f87cc89..7681dbc0 100644 --- a/.github/workflows/publish-website.yml +++ b/.github/workflows/publish-website.yml @@ -18,7 +18,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: "8.0" + php-version: "8.1" ini-values: "phar.readonly=0" - name: Build the website diff --git a/.github/workflows/update-phars.yml b/.github/workflows/update-phars.yml index 50d25efd..0acfb873 100644 --- a/.github/workflows/update-phars.yml +++ b/.github/workflows/update-phars.yml @@ -13,7 +13,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: "8.0" + php-version: "8.1" ini-values: "phar.readonly=0" - name: Configure git diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 766c1964..588db2c2 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -3,7 +3,7 @@ inherit: true build: environment: php: - version: 8.0 + version: 8.2 tests: override: - make phpunit diff --git a/Makefile b/Makefile index a8e20cdd..2726a859 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,6 @@ default: build PHP_VERSION:=$(shell php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;') -IS_PHP81:=$(shell php -r 'echo (int)version_compare(PHP_VERSION, "8.1", ">=");') TOOLBOX_VERSION?=dev build: install test @@ -68,7 +67,7 @@ package: tools/box sed -e 's/Application('"'"'dev/Application('"'"'$(TOOLBOX_VERSION)/g' bin/toolbox.php > build/phar/bin/toolbox.php cd build/phar && \ - composer config platform.php 8.0.2 && \ + composer config platform.php 8.1.0 && \ composer update --no-dev -o -a tools/box compile @@ -84,7 +83,7 @@ package-devkit: tools/box sed -e 's/\(Application(.*\)'"'"'dev/\1'"'"'$(TOOLBOX_VERSION)/g' bin/devkit.php > build/devkit-phar/bin/devkit.php cd build/devkit-phar && \ - composer config platform.php 8.0.2 && \ + composer config platform.php 8.1.0 && \ composer update --no-dev -o -a tools/box compile -c box-devkit.json.dist @@ -138,17 +137,8 @@ tools/php-cs-fixer: curl -Ls https://cs.symfony.com/download/php-cs-fixer-v3.phar -o tools/php-cs-fixer && chmod +x tools/php-cs-fixer tools/deptrac: -ifeq ($(IS_PHP81),1) curl -Ls https://github.com/qossmic/deptrac/releases/download/1.0.2/deptrac.phar -o tools/deptrac && chmod +x tools/deptrac curl -Ls https://github.com/qossmic/deptrac/releases/download/1.0.2/deptrac.phar.asc -o tools/deptrac.asc -else - curl -Ls https://github.com/qossmic/deptrac/releases/download/0.24.0/deptrac.phar -o tools/deptrac && chmod +x tools/deptrac - curl -Ls https://github.com/qossmic/deptrac/releases/download/0.24.0/deptrac.phar.asc -o tools/deptrac.asc -endif tools/box: -ifeq ($(IS_PHP81),1) curl -Ls https://github.com/humbug/box/releases/download/4.2.0/box.phar -o tools/box && chmod +x tools/box -else - curl -Ls https://github.com/humbug/box/releases/download/3.15.0/box.phar -o tools/box && chmod +x tools/box -endif diff --git a/README.md b/README.md index b48a9208..62e8eeb5 100644 --- a/README.md +++ b/README.md @@ -14,87 +14,87 @@ It has been extracted as a separate project to make maintenance easier and enabl ## Available tools -| Name | Description | PHP 8.0 | PHP 8.1 | PHP 8.2 | -| :--- | :---------- | :------ | :------ | :------ | -| behat | [Helps to test business expectations](http://behat.org/) | ✅ | ✅ | ✅ | -| box | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ❌ | ✅ | ✅ | -| box-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ✅ | ❌ | -| 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/) | ✅ | ✅ | ✅ | -| composer-bin-plugin | [Composer plugin to install bin vendors in isolated locations](https://github.com/bamarni/composer-bin-plugin) | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | -| composer-unused | [Show unused packages by scanning your code](https://github.com/icanhazstring/composer-unused) | ✅ | ✅ | ✅ | -| dephpend | [Detect flaws in your architecture](https://dephpend.com/) | ✅ | ✅ | ✅ | -| deprecation-detector | [Finds usages of deprecated code](https://github.com/sensiolabs-de/deprecation-detector) | ✅ | ✅ | ✅ | -| deptrac | [Enforces dependency rules between software layers](https://github.com/qossmic/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) | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | -| 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-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-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) | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | -| phpbench | [PHP Benchmarking framework](https://github.com/phpbench/phpbench) | ❌ | ✅ | ✅ | -| phpca | [Finds usage of non-built-in extensions](https://github.com/wapmorgan/PhpCodeAnalyzer) | ✅ | ✅ | ✅ | -| 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) | ❌ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | -| phpda | [Generates dependency graphs](https://mamuz.github.io/PhpDependencyAnalysis/) | ✅ | ❌ | ❌ | -| phpdd | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector) | ✅ | ✅ | ✅ | -| phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ❌ | ✅ | ✅ | -| phpinsights | [Analyses code quality, style, architecture and complexity](https://phpinsights.com/) | ✅ | ✅ | ✅ | -| phplint | [Lints php files in parallel](https://github.com/overtrue/phplint) | ✅ | ✅ | ✅ | -| phploc | [A tool for quickly measuring the size of a PHP project](https://github.com/sebastianbergmann/phploc) | ✅ | ✅ | ✅ | -| 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/) | ✅ | ✅ | ❌ | -| 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) | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | -| phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | ✅ | -| phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | -| phpunit | [The PHP testing framework](https://phpunit.de/) | ❌ | ✅ | ✅ | -| phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | -| phpunit-9 | [The PHP testing framework (9.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | -| pint | [Opinionated PHP code style fixer for Laravel](https://github.com/laravel/pint) | ✅ | ✅ | ✅ | -| psalm | [Finds errors in PHP applications](https://psalm.dev/) | ✅ | ✅ | ✅ | -| psalm-plugin-doctrine | [Stubs to let Psalm understand Doctrine better](https://github.com/weirdan/doctrine-psalm-plugin) | ✅ | ✅ | ✅ | -| psalm-plugin-phpunit | [Psalm plugin for PHPUnit](https://github.com/psalm/psalm-plugin-phpunit) | ✅ | ✅ | ✅ | -| psalm-plugin-symfony | [Psalm Plugin for Symfony](https://github.com/psalm/psalm-plugin-symfony) | ✅ | ✅ | ✅ | -| psecio-parse | [Scans code for potential security-related issues](https://github.com/psecio/parse) | ✅ | ✅ | ✅ | -| rector | [Tool for instant code upgrades and refactoring](https://github.com/rectorphp/rector) | ✅ | ✅ | ✅ | -| roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ✅ | ✅ | -| simple-phpunit | [Provides utilities to report legacy tests and usage of deprecated code](https://symfony.com/doc/current/components/phpunit_bridge.html) | ✅ | ✅ | ✅ | -| twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | ✅ | -| twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | ✅ | -| twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | ✅ | -| yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ❌ | ✅ | ✅ | +| Name | Description | PHP 8.1 | PHP 8.2 | +| :--- | :---------- | :------ | :------ | +| behat | [Helps to test business expectations](http://behat.org/) | ✅ | ✅ | +| box | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ✅ | +| box-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ❌ | +| 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/) | ✅ | ✅ | +| composer-bin-plugin | [Composer plugin to install bin vendors in isolated locations](https://github.com/bamarni/composer-bin-plugin) | ✅ | ✅ | +| 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) | ✅ | ✅ | +| composer-unused | [Show unused packages by scanning your code](https://github.com/icanhazstring/composer-unused) | ✅ | ✅ | +| dephpend | [Detect flaws in your architecture](https://dephpend.com/) | ✅ | ✅ | +| deprecation-detector | [Finds usages of deprecated code](https://github.com/sensiolabs-de/deprecation-detector) | ✅ | ✅ | +| deptrac | [Enforces dependency rules between software layers](https://github.com/qossmic/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) | ✅ | ✅ | +| 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) | ✅ | ✅ | +| 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-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-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) | ✅ | ✅ | +| 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) | ✅ | ✅ | +| phpbench | [PHP Benchmarking framework](https://github.com/phpbench/phpbench) | ✅ | ✅ | +| phpca | [Finds usage of non-built-in extensions](https://github.com/wapmorgan/PhpCodeAnalyzer) | ✅ | ✅ | +| 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) | ✅ | ✅ | +| 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) | ✅ | ✅ | +| phpda | [Generates dependency graphs](https://mamuz.github.io/PhpDependencyAnalysis/) | ❌ | ❌ | +| phpdd | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector) | ✅ | ✅ | +| phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ✅ | ✅ | +| phpinsights | [Analyses code quality, style, architecture and complexity](https://phpinsights.com/) | ✅ | ✅ | +| phplint | [Lints php files in parallel](https://github.com/overtrue/phplint) | ✅ | ✅ | +| phploc | [A tool for quickly measuring the size of a PHP project](https://github.com/sebastianbergmann/phploc) | ✅ | ✅ | +| 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/) | ✅ | ❌ | +| 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) | ✅ | ✅ | +| 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) | ✅ | ✅ | +| phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | +| phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | +| phpunit | [The PHP testing framework](https://phpunit.de/) | ✅ | ✅ | +| phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | +| phpunit-9 | [The PHP testing framework (9.x version)](https://phpunit.de/) | ✅ | ✅ | +| pint | [Opinionated PHP code style fixer for Laravel](https://github.com/laravel/pint) | ✅ | ✅ | +| psalm | [Finds errors in PHP applications](https://psalm.dev/) | ✅ | ✅ | +| psalm-plugin-doctrine | [Stubs to let Psalm understand Doctrine better](https://github.com/weirdan/doctrine-psalm-plugin) | ✅ | ✅ | +| psalm-plugin-phpunit | [Psalm plugin for PHPUnit](https://github.com/psalm/psalm-plugin-phpunit) | ✅ | ✅ | +| psalm-plugin-symfony | [Psalm Plugin for Symfony](https://github.com/psalm/psalm-plugin-symfony) | ✅ | ✅ | +| psecio-parse | [Scans code for potential security-related issues](https://github.com/psecio/parse) | ✅ | ✅ | +| rector | [Tool for instant code upgrades and refactoring](https://github.com/rectorphp/rector) | ✅ | ✅ | +| roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ✅ | +| simple-phpunit | [Provides utilities to report legacy tests and usage of deprecated code](https://symfony.com/doc/current/components/phpunit_bridge.html) | ✅ | ✅ | +| twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | +| twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | +| twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | +| yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ✅ | ✅ | ### Removed tools diff --git a/bin/devkit.php b/bin/devkit.php index ff870c03..0408d0db 100755 --- a/bin/devkit.php +++ b/bin/devkit.php @@ -73,17 +73,16 @@ protected function execute(InputInterface $input, OutputInterface $output) $readmePath = $input->getOption('readme'); $tools = $this->loadTools($jsonPath); - $toolsList = '| Name | Description | PHP 8.0 | PHP 8.1 | PHP 8.2 |' . PHP_EOL; - $toolsList .= '| :--- | :---------- | :------ | :------ | :------ |' . PHP_EOL; + $toolsList = '| Name | Description | PHP 8.1 | PHP 8.2 |' . PHP_EOL; + $toolsList .= '| :--- | :---------- | :------ | :------ |' . PHP_EOL; $toolsList .= $tools->sort(function (Tool $left, Tool $right) { return strcasecmp($left->name(), $right->name()); })->reduce('', function ($acc, Tool $tool) { - return $acc . sprintf('| %s | [%s](%s) | %s | %s | %s |', + return $acc . sprintf('| %s | [%s](%s) | %s | %s |', $tool->name(), $tool->summary(), $tool->website(), - in_array('exclude-php:8.0', $tool->tags(), true) ? '❌' : '✅', in_array('exclude-php:8.1', $tool->tags(), true) ? '❌' : '✅', in_array('exclude-php:8.2', $tool->tags(), true) ? '❌' : '✅' ) . PHP_EOL; diff --git a/composer.json b/composer.json index 978cb7f6..dd90fbdd 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Helps to discover and install tools", "type": "project", "require": { - "php": "~8.0.2 || ~8.1.0 || ~8.2.0", + "php": "~8.1.0 || ~8.2.0", "symfony/console": "^5.4.31 || ^6.3", "psr/container": "^2.0" }, diff --git a/resources/architecture.json b/resources/architecture.json index cf11dfe0..cf393e91 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -26,7 +26,7 @@ } }, "test": "deptrac list", - "tags": ["featured", "architecture", "exclude-php:8.0"] + "tags": ["featured", "architecture"] }, { "name": "pdepend", diff --git a/resources/composer.json b/resources/composer.json index 7b0d7c70..d6807008 100644 --- a/resources/composer.json +++ b/resources/composer.json @@ -41,7 +41,7 @@ } }, "test": "composer-require-checker -V", - "tags": ["composer", "exclude-php:8.0"] + "tags": ["composer"] }, { "name": "composer-require-checker-3", diff --git a/resources/documentation.json b/resources/documentation.json index 53ce4cc2..6a39f990 100644 --- a/resources/documentation.json +++ b/resources/documentation.json @@ -12,7 +12,7 @@ } }, "test": "phpDocumentor list", - "tags": ["featured", "documentation", "exclude-php:8.0"] + "tags": ["featured", "documentation"] }, { "name": "phpcb", diff --git a/resources/linting.json b/resources/linting.json index a73cea59..9a87b64d 100644 --- a/resources/linting.json +++ b/resources/linting.json @@ -52,7 +52,7 @@ } }, "test": "yaml-lint --version", - "tags": ["exclude-php:8.0", "linting"] + "tags": ["linting"] }, { "name": "twig-linter", diff --git a/resources/pre-installation.json b/resources/pre-installation.json index 374123cb..73414b6a 100644 --- a/resources/pre-installation.json +++ b/resources/pre-installation.json @@ -59,7 +59,7 @@ } }, "test": "box list", - "tags": ["pre-installation", "exclude-php:8.0"] + "tags": ["pre-installation"] }, { "name": "box-3", diff --git a/resources/test.json b/resources/test.json index 1d762e50..5fb8c6fb 100644 --- a/resources/test.json +++ b/resources/test.json @@ -38,7 +38,7 @@ } }, "test": "infection --version", - "tags": ["featured", "test", "exclude-php:8.0"] + "tags": ["featured", "test"] }, { "name": "paratest", @@ -83,7 +83,7 @@ } }, "test": "phpcov -v", - "tags": ["exclude-php:8.0", "test"] + "tags": ["test"] }, { "name": "php-fuzzer", @@ -123,7 +123,7 @@ } }, "test": "phpunit --version", - "tags": ["exclude-php:8.0", "featured", "test"] + "tags": ["featured", "test"] }, { "name": "phpunit-9", diff --git a/resources/tools.json b/resources/tools.json index 47f79832..4b60120e 100644 --- a/resources/tools.json +++ b/resources/tools.json @@ -40,7 +40,7 @@ } }, "test": "phpbench -V", - "tags": ["exclude-php:8.0"] + "tags": [] }, { "name": "phpa", From 7dc4ef191fece4da362c47e00473f08e83591c27 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 20:54:02 +0000 Subject: [PATCH 119/206] Update PHPUnit (9.x -> 10.x) --- .github/workflows/build.yml | 2 +- Makefile | 4 ---- composer.json | 4 ++-- phpunit.xml.dist | 14 ++++++++------ tests/Cli/ServiceContainer/RunnerFactoryTest.php | 3 +++ tests/Cli/ServiceContainerTest.php | 2 +- tests/Json/Factory/BoxBuildCommandFactoryTest.php | 2 +- .../ComposerBinPluginCommandFactoryTest.php | 2 +- .../Factory/ComposerInstallCommandFactoryTest.php | 2 +- .../Factory/FileDownloadCommandFactoryTest.php | 2 +- .../Factory/PharDownloadCommandFactoryTest.php | 2 +- .../Factory/PhiveInstallCommandFactoryTest.php | 2 +- tests/Json/Factory/ToolFactoryTest.php | 2 +- 13 files changed, 22 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ecd5fbfd..a538053c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: php-version: "${{ matrix.php }}" tools: composer ini-values: "phar.readonly=0" - coverage: none + coverage: pcov - if: matrix.deps == 'high' run: make update test package package-devkit diff --git a/Makefile b/Makefile index 2726a859..eb8f5a35 100644 --- a/Makefile +++ b/Makefile @@ -56,10 +56,6 @@ phpunit: tools/phpunit tools/phpunit .PHONY: phpunit -phpunit-coverage: tools/phpunit - phpdbg -qrr tools/phpunit -.PHONY: phpunit - package: tools/box @rm -rf build/phar && mkdir -p build/phar build/phar/bin diff --git a/composer.json b/composer.json index dd90fbdd..f566ab88 100644 --- a/composer.json +++ b/composer.json @@ -8,8 +8,8 @@ "psr/container": "^2.0" }, "require-dev": { - "phpunit/phpunit": "^9.5", - "zalas/phpunit-globals": "^2.1", + "phpunit/phpunit": "^10.0", + "zalas/phpunit-globals": "^3.2", "infection/infection": "^0.26" }, "autoload": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 158f138e..091e0031 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,9 +1,6 @@ - - - - src - + + @@ -20,7 +17,12 @@ - + + + + src + + diff --git a/tests/Cli/ServiceContainer/RunnerFactoryTest.php b/tests/Cli/ServiceContainer/RunnerFactoryTest.php index 22860d1f..1d2ea6e7 100644 --- a/tests/Cli/ServiceContainer/RunnerFactoryTest.php +++ b/tests/Cli/ServiceContainer/RunnerFactoryTest.php @@ -2,6 +2,7 @@ namespace Zalas\Toolbox\Tests\Cli\ServiceContainer; +use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Container\ContainerExceptionInterface; @@ -89,6 +90,7 @@ public function test_it_creates_the_parametrised_runner_if_target_dir_option_is_ $this->assertInstanceOf(ParametrisedRunner::class, $runner); } + #[DoesNotPerformAssertions] public function test_the_parametrised_runner_includes_the_target_dir_parameter() { $this->givenInput(['--target-dir' => '/usr/local/bin', '--dry-run' => true]); @@ -114,6 +116,7 @@ public function test_it_throws_an_exception_if_target_dir_does_not_exist() $this->runnerFactory->createRunner(); } + #[DoesNotPerformAssertions] public function test_it_uses_the_real_path_as_target_dir() { $this->givenInput(['--target-dir' => __DIR__.'/../../../bin', '--dry-run' => true]); diff --git a/tests/Cli/ServiceContainerTest.php b/tests/Cli/ServiceContainerTest.php index 5cf05849..7bda293f 100644 --- a/tests/Cli/ServiceContainerTest.php +++ b/tests/Cli/ServiceContainerTest.php @@ -48,7 +48,7 @@ public function test_it_creates_application_services(string $serviceId, string $ $this->assertInstanceOf($expectedType, $this->container->get($serviceId)); } - public function provideApplicationServices() + public static function provideApplicationServices() { yield [InstallCommand::class, InstallCommand::class]; yield [ListCommand::class, ListCommand::class]; diff --git a/tests/Json/Factory/BoxBuildCommandFactoryTest.php b/tests/Json/Factory/BoxBuildCommandFactoryTest.php index d80f2bdc..df1170be 100644 --- a/tests/Json/Factory/BoxBuildCommandFactoryTest.php +++ b/tests/Json/Factory/BoxBuildCommandFactoryTest.php @@ -58,7 +58,7 @@ public function test_it_complains_if_any_of_required_properties_is_missing(strin BoxBuildCommandFactory::import($properties); } - public function provideRequiredProperties(): \Generator + public static function provideRequiredProperties(): \Generator { yield ['repository']; yield ['phar']; diff --git a/tests/Json/Factory/ComposerBinPluginCommandFactoryTest.php b/tests/Json/Factory/ComposerBinPluginCommandFactoryTest.php index 4d9d52b2..b214af01 100644 --- a/tests/Json/Factory/ComposerBinPluginCommandFactoryTest.php +++ b/tests/Json/Factory/ComposerBinPluginCommandFactoryTest.php @@ -57,7 +57,7 @@ public function test_it_complains_if_any_of_required_properties_is_missing(strin ComposerBinPluginCommandFactory::import($properties); } - public function provideRequiredProperties(): \Generator + public static function provideRequiredProperties(): \Generator { yield ['package']; yield ['namespace']; diff --git a/tests/Json/Factory/ComposerInstallCommandFactoryTest.php b/tests/Json/Factory/ComposerInstallCommandFactoryTest.php index a9c93742..c3fd5959 100644 --- a/tests/Json/Factory/ComposerInstallCommandFactoryTest.php +++ b/tests/Json/Factory/ComposerInstallCommandFactoryTest.php @@ -41,7 +41,7 @@ public function test_it_complains_if_a_required_property_is_missing(string $prop ComposerInstallCommandFactory::import($properties); } - public function provideRequiredProperties() + public static function provideRequiredProperties() { yield ['repository']; yield ['target-dir']; diff --git a/tests/Json/Factory/FileDownloadCommandFactoryTest.php b/tests/Json/Factory/FileDownloadCommandFactoryTest.php index 6dd9ff28..f17b0aa3 100644 --- a/tests/Json/Factory/FileDownloadCommandFactoryTest.php +++ b/tests/Json/Factory/FileDownloadCommandFactoryTest.php @@ -38,7 +38,7 @@ public function test_it_complains_if_any_of_required_properties_is_missing(strin FileDownloadCommandFactory::import($properties); } - public function provideRequiredProperties(): \Generator + public static function provideRequiredProperties(): \Generator { yield ['url']; yield ['file']; diff --git a/tests/Json/Factory/PharDownloadCommandFactoryTest.php b/tests/Json/Factory/PharDownloadCommandFactoryTest.php index 21ae9ae7..1664278d 100644 --- a/tests/Json/Factory/PharDownloadCommandFactoryTest.php +++ b/tests/Json/Factory/PharDownloadCommandFactoryTest.php @@ -38,7 +38,7 @@ public function test_it_complains_if_any_of_required_properties_is_missing(strin PharDownloadCommandFactory::import($properties); } - public function provideRequiredProperties(): \Generator + public static function provideRequiredProperties(): \Generator { yield ['phar']; yield ['bin']; diff --git a/tests/Json/Factory/PhiveInstallCommandFactoryTest.php b/tests/Json/Factory/PhiveInstallCommandFactoryTest.php index 3ec413f6..b8d406a0 100644 --- a/tests/Json/Factory/PhiveInstallCommandFactoryTest.php +++ b/tests/Json/Factory/PhiveInstallCommandFactoryTest.php @@ -53,7 +53,7 @@ public function test_it_accepts_unsigned_phars() $this->assertStringContainsString('unsigned', (string)$command); } - public function provideRequiredProperties(): \Generator + public static function provideRequiredProperties(): \Generator { yield ['alias']; yield ['bin']; diff --git a/tests/Json/Factory/ToolFactoryTest.php b/tests/Json/Factory/ToolFactoryTest.php index 42f0ce0b..bbf0b9b2 100644 --- a/tests/Json/Factory/ToolFactoryTest.php +++ b/tests/Json/Factory/ToolFactoryTest.php @@ -209,7 +209,7 @@ public function test_it_complains_if_any_of_required_properties_is_missing(strin ToolFactory::import($properties); } - public function provideRequiredProperties(): \Generator + public static function provideRequiredProperties(): \Generator { yield ['name']; yield ['summary']; From d1f072117ed03dbe92c17a09c440b9d913255a4b Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 21:21:47 +0000 Subject: [PATCH 120/206] Replace annotations with attributes --- phpunit.xml.dist | 2 +- tests/Cli/ApplicationTest.php | 9 +++------ tests/Cli/Command/InstallCommandTest.php | 13 ++++--------- tests/Cli/Command/ListCommandTest.php | 9 +++------ tests/Cli/Command/TestCommandTest.php | 13 ++++--------- 5 files changed, 15 insertions(+), 31 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 091e0031..6c596f44 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -17,7 +17,7 @@ - + diff --git a/tests/Cli/ApplicationTest.php b/tests/Cli/ApplicationTest.php index 975b240a..7963c001 100644 --- a/tests/Cli/ApplicationTest.php +++ b/tests/Cli/ApplicationTest.php @@ -8,6 +8,7 @@ use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\NullOutput; use Symfony\Component\Console\Output\OutputInterface; +use Zalas\PHPUnit\Globals\Attribute\Putenv; use Zalas\Toolbox\Cli\Application; use Zalas\Toolbox\Cli\Command\InstallCommand; use Zalas\Toolbox\Cli\Command\ListCommand; @@ -70,17 +71,13 @@ public function test_it_defines_tools_option() ); } - /** - * @putenv TOOLBOX_JSON=resources/pre.json,resources/tools.json - */ + #[Putenv('TOOLBOX_JSON', 'resources/pre.json,resources/tools.json')] public function test_it_takes_the_tools_option_default_from_environment_if_present() { $this->assertSame(['resources/pre.json', 'resources/tools.json'], $this->app->getDefinition()->getOption('tools')->getDefault()); } - /** - * @putenv TOOLBOX_JSON=resources/pre.json , resources/tools.json - */ + #[Putenv('TOOLBOX_JSON', 'resources/pre.json , resources/tools.json')] public function test_it_trims_the_tools_option() { $this->assertSame(['resources/pre.json', 'resources/tools.json'], $this->app->getDefinition()->getOption('tools')->getDefault()); diff --git a/tests/Cli/Command/InstallCommandTest.php b/tests/Cli/Command/InstallCommandTest.php index 4d4a5e2d..227fa937 100644 --- a/tests/Cli/Command/InstallCommandTest.php +++ b/tests/Cli/Command/InstallCommandTest.php @@ -3,6 +3,7 @@ namespace Zalas\Toolbox\Tests\Cli\Command; use PHPUnit\Framework\MockObject\Stub; +use Zalas\PHPUnit\Globals\Attribute\Putenv; use Zalas\Toolbox\Cli\Command\InstallCommand; use Zalas\Toolbox\Runner\Runner; use Zalas\Toolbox\Tool\Command; @@ -77,9 +78,7 @@ public function test_it_defines_target_dir_option() $this->assertSame('/usr/local/bin', $this->cliCommand()->getDefinition()->getOption('target-dir')->getDefault()); } - /** - * @putenv TOOLBOX_TARGET_DIR=/tmp - */ + #[Putenv('TOOLBOX_TARGET_DIR', '/tmp')] public function test_it_takes_the_target_dir_option_default_from_environment_if_present() { $this->assertSame('/tmp', $this->cliCommand()->getDefinition()->getOption('target-dir')->getDefault()); @@ -91,9 +90,7 @@ public function test_it_defines_exclude_tag_option() $this->assertSame([], $this->cliCommand()->getDefinition()->getOption('exclude-tag')->getDefault()); } - /** - * @putenv TOOLBOX_EXCLUDED_TAGS=foo,bar,baz - */ + #[Putenv('TOOLBOX_EXCLUDED_TAGS', 'foo,bar,baz')] public function test_it_takes_the_excluded_tag_option_default_from_environment_if_present() { $this->assertSame(['foo', 'bar', 'baz'], $this->cliCommand()->getDefinition()->getOption('exclude-tag')->getDefault()); @@ -105,9 +102,7 @@ public function test_it_defines_tag_option() $this->assertSame([], $this->cliCommand()->getDefinition()->getOption('tag')->getDefault()); } - /** - * @putenv TOOLBOX_TAGS=foo,bar,baz - */ + #[Putenv('TOOLBOX_TAGS', 'foo,bar,baz')] public function test_it_takes_the_tag_option_default_from_environment_if_present() { $this->assertSame(['foo', 'bar', 'baz'], $this->cliCommand()->getDefinition()->getOption('tag')->getDefault()); diff --git a/tests/Cli/Command/ListCommandTest.php b/tests/Cli/Command/ListCommandTest.php index a44eeea4..1d7142de 100644 --- a/tests/Cli/Command/ListCommandTest.php +++ b/tests/Cli/Command/ListCommandTest.php @@ -3,6 +3,7 @@ namespace Zalas\Toolbox\Tests\Cli\Command; use PHPUnit\Framework\MockObject\Stub; +use Zalas\PHPUnit\Globals\Attribute\Putenv; use Zalas\Toolbox\Cli\Command\ListCommand; use Zalas\Toolbox\Tool\Collection; use Zalas\Toolbox\Tool\Command\ShCommand; @@ -59,9 +60,7 @@ public function test_it_defines_exclude_tag_option() $this->assertSame([], $this->cliCommand()->getDefinition()->getOption('exclude-tag')->getDefault()); } - /** - * @putenv TOOLBOX_EXCLUDED_TAGS=foo,bar,baz - */ + #[Putenv('TOOLBOX_EXCLUDED_TAGS', 'foo,bar,baz')] public function test_it_takes_the_excluded_tag_option_default_from_environment_if_present() { $this->assertSame(['foo', 'bar', 'baz'], $this->cliCommand()->getDefinition()->getOption('exclude-tag')->getDefault()); @@ -72,9 +71,7 @@ public function test_it_defines_tag_option() $this->assertTrue($this->cliCommand()->getDefinition()->hasOption('tag')); } - /** - * @putenv TOOLBOX_TAGS=foo,bar,baz - */ + #[Putenv('TOOLBOX_TAGS', 'foo,bar,baz')] public function test_it_takes_the_tag_option_default_from_environment_if_present() { $this->assertSame(['foo', 'bar', 'baz'], $this->cliCommand()->getDefinition()->getOption('tag')->getDefault()); diff --git a/tests/Cli/Command/TestCommandTest.php b/tests/Cli/Command/TestCommandTest.php index be6fb590..d2198692 100644 --- a/tests/Cli/Command/TestCommandTest.php +++ b/tests/Cli/Command/TestCommandTest.php @@ -3,6 +3,7 @@ namespace Zalas\Toolbox\Tests\Cli\Command; use PHPUnit\Framework\MockObject\Stub; +use Zalas\PHPUnit\Globals\Attribute\Putenv; use Zalas\Toolbox\Cli\Command\TestCommand; use Zalas\Toolbox\Runner\Runner; use Zalas\Toolbox\Tool\Command; @@ -74,9 +75,7 @@ public function test_it_defines_target_dir_option() $this->assertTrue($this->cliCommand()->getDefinition()->hasOption('target-dir')); } - /** - * @putenv TOOLBOX_TARGET_DIR=/tmp - */ + #[Putenv('TOOLBOX_TARGET_DIR', '/tmp')] public function test_it_takes_the_target_dir_option_default_from_environment_if_present() { $this->assertSame('/tmp', $this->cliCommand()->getDefinition()->getOption('target-dir')->getDefault()); @@ -88,9 +87,7 @@ public function test_it_defines_exclude_tag_option() $this->assertSame([], $this->cliCommand()->getDefinition()->getOption('exclude-tag')->getDefault()); } - /** - * @putenv TOOLBOX_EXCLUDED_TAGS=foo,bar,baz - */ + #[Putenv('TOOLBOX_EXCLUDED_TAGS', 'foo,bar,baz')] public function test_it_takes_the_excluded_tag_option_default_from_environment_if_present() { $this->assertSame(['foo', 'bar', 'baz'], $this->cliCommand()->getDefinition()->getOption('exclude-tag')->getDefault()); @@ -101,9 +98,7 @@ public function test_it_defines_tag_option() $this->assertTrue($this->cliCommand()->getDefinition()->hasOption('tag')); } - /** - * @putenv TOOLBOX_TAGS=foo,bar,baz - */ + #[Putenv('TOOLBOX_TAGS', 'foo,bar,baz')] public function test_it_takes_the_tag_option_default_from_environment_if_present() { $this->assertSame(['foo', 'bar', 'baz'], $this->cliCommand()->getDefinition()->getOption('tag')->getDefault()); From 2871ffc7cc704c4c3c5f428a9fdf050c812ead24 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 21:30:23 +0000 Subject: [PATCH 121/206] Update infection --- Makefile | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index eb8f5a35..bbcd8ff8 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ deptrac: tools/deptrac .PHONY: deptrac infection: - phpdbg -qrr ./vendor/bin/infection --no-interaction --formatter=progress --min-msi=100 --min-covered-msi=100 --only-covered --ansi + ./vendor/bin/infection --no-interaction --formatter=progress --min-msi=100 --min-covered-msi=100 --only-covered --ansi .PHONY: infection phpunit: tools/phpunit diff --git a/composer.json b/composer.json index f566ab88..db1f09eb 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "require-dev": { "phpunit/phpunit": "^10.0", "zalas/phpunit-globals": "^3.2", - "infection/infection": "^0.26" + "infection/infection": "^0.27" }, "autoload": { "psr-4": { From a49038815607de41b35461f30f4702c2a8462ddb Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 21:33:15 +0000 Subject: [PATCH 122/206] Set the minimum phpunit version higher due to its BC breaks --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index db1f09eb..68521b65 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "psr/container": "^2.0" }, "require-dev": { - "phpunit/phpunit": "^10.0", + "phpunit/phpunit": "^10.4", "zalas/phpunit-globals": "^3.2", "infection/infection": "^0.27" }, From e841cf1fda8da9996c1d6360d7a24228d903c9d8 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 21:42:06 +0000 Subject: [PATCH 123/206] Configure cov in scrutinizer --- .scrutinizer.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 588db2c2..832cd37f 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -4,6 +4,8 @@ build: environment: php: version: 8.2 + variables: + XDEBUG_MODE: coverage tests: override: - make phpunit @@ -12,7 +14,7 @@ build: coverage: tests: override: - - command: make phpunit-coverage + - command: make phpunit coverage: file: build/coverage.xml format: clover From 041712026a643c7fada22c043889719e6f888794 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 22:24:49 +0000 Subject: [PATCH 124/206] Exclude phpda and phpspec on PHP 8.3 --- resources/architecture.json | 2 +- resources/test.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/architecture.json b/resources/architecture.json index cf393e91..d891da04 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -81,7 +81,7 @@ } }, "test": "phpda list", - "tags": ["exclude-php:8.2", "exclude-php:8.1", "featured", "architecture"] + "tags": ["exclude-php:8.3", "exclude-php:8.2", "exclude-php:8.1", "featured", "architecture"] } ] } diff --git a/resources/test.json b/resources/test.json index 5fb8c6fb..634822b1 100644 --- a/resources/test.json +++ b/resources/test.json @@ -109,7 +109,7 @@ } }, "test": "phpspec --version", - "tags": ["exclude-php:8.2", "featured", "test"] + "tags": ["exclude-php:8.3", "exclude-php:8.2", "featured", "test"] }, { "name": "phpunit", From c66dc68c88684605a41f61346844cd3f392a294b Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 28 Nov 2023 22:32:02 +0000 Subject: [PATCH 125/206] Exclude twigcs on PHP 8.3 --- resources/checkstyle.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/checkstyle.json b/resources/checkstyle.json index f98cb6d7..3273e8af 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -68,7 +68,7 @@ } }, "test": "twigcs --help", - "tags": ["checkstyle"] + "tags": ["exclude-php:8.3", "checkstyle"] } ] } From c0a2d2042b410886163ff64c7ebcc48ad82d2ca5 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 29 Nov 2023 09:50:00 +0000 Subject: [PATCH 126/206] Remove phpda since it does not work on any of the supported PHP versions --- README.md | 2 +- resources/architecture.json | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/README.md b/README.md index 62e8eeb5..c3083976 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,6 @@ It has been extracted as a separate project to make maintenance easier and enabl | 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) | ✅ | ✅ | -| phpda | [Generates dependency graphs](https://mamuz.github.io/PhpDependencyAnalysis/) | ❌ | ❌ | | phpdd | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector) | ✅ | ✅ | | phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ✅ | ✅ | | phpinsights | [Analyses code quality, style, architecture and complexity](https://phpinsights.com/) | ✅ | ✅ | @@ -107,6 +106,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | 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/) | +| 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-localheinz-rules | [Additional rules for PHPstan](https://github.com/localheinz/phpstan-rules) | | phpunit-5 | [The PHP testing framework (5.x version)](https://phpunit.de/) | diff --git a/resources/architecture.json b/resources/architecture.json index d891da04..9371b156 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -68,20 +68,6 @@ }, "test": "phparkitect --version", "tags": ["architecture"] - }, - { - "name": "phpda", - "summary": "Generates dependency graphs", - "website": "https://mamuz.github.io/PhpDependencyAnalysis/", - "command": { - "composer-bin-plugin": { - "package": "mamuz/php-dependency-analysis", - "namespace": "phpda", - "links": {"%target-dir%/phpda": "phpda"} - } - }, - "test": "phpda list", - "tags": ["exclude-php:8.3", "exclude-php:8.2", "exclude-php:8.1", "featured", "architecture"] } ] } From ba2eee20aa369cf2bbbfccdd6fd284bca0482519 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 29 Nov 2023 09:50:28 +0000 Subject: [PATCH 127/206] Update the README list of tools --- README.md | 160 +++++++++++++++++++++++++++--------------------------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/README.md b/README.md index c3083976..56aee879 100644 --- a/README.md +++ b/README.md @@ -14,86 +14,86 @@ It has been extracted as a separate project to make maintenance easier and enabl ## Available tools -| Name | Description | PHP 8.1 | PHP 8.2 | -| :--- | :---------- | :------ | :------ | -| behat | [Helps to test business expectations](http://behat.org/) | ✅ | ✅ | -| box | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ✅ | -| box-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ❌ | -| 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/) | ✅ | ✅ | -| composer-bin-plugin | [Composer plugin to install bin vendors in isolated locations](https://github.com/bamarni/composer-bin-plugin) | ✅ | ✅ | -| 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) | ✅ | ✅ | -| composer-unused | [Show unused packages by scanning your code](https://github.com/icanhazstring/composer-unused) | ✅ | ✅ | -| dephpend | [Detect flaws in your architecture](https://dephpend.com/) | ✅ | ✅ | -| deprecation-detector | [Finds usages of deprecated code](https://github.com/sensiolabs-de/deprecation-detector) | ✅ | ✅ | -| deptrac | [Enforces dependency rules between software layers](https://github.com/qossmic/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) | ✅ | ✅ | -| 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) | ✅ | ✅ | -| 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-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-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) | ✅ | ✅ | -| 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) | ✅ | ✅ | -| phpbench | [PHP Benchmarking framework](https://github.com/phpbench/phpbench) | ✅ | ✅ | -| phpca | [Finds usage of non-built-in extensions](https://github.com/wapmorgan/PhpCodeAnalyzer) | ✅ | ✅ | -| 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) | ✅ | ✅ | -| 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) | ✅ | ✅ | -| phpdd | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector) | ✅ | ✅ | -| phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ✅ | ✅ | -| phpinsights | [Analyses code quality, style, architecture and complexity](https://phpinsights.com/) | ✅ | ✅ | -| phplint | [Lints php files in parallel](https://github.com/overtrue/phplint) | ✅ | ✅ | -| phploc | [A tool for quickly measuring the size of a PHP project](https://github.com/sebastianbergmann/phploc) | ✅ | ✅ | -| 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/) | ✅ | ❌ | -| 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) | ✅ | ✅ | -| 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) | ✅ | ✅ | -| phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | -| phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | -| phpunit | [The PHP testing framework](https://phpunit.de/) | ✅ | ✅ | -| phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | -| phpunit-9 | [The PHP testing framework (9.x version)](https://phpunit.de/) | ✅ | ✅ | -| pint | [Opinionated PHP code style fixer for Laravel](https://github.com/laravel/pint) | ✅ | ✅ | -| psalm | [Finds errors in PHP applications](https://psalm.dev/) | ✅ | ✅ | -| psalm-plugin-doctrine | [Stubs to let Psalm understand Doctrine better](https://github.com/weirdan/doctrine-psalm-plugin) | ✅ | ✅ | -| psalm-plugin-phpunit | [Psalm plugin for PHPUnit](https://github.com/psalm/psalm-plugin-phpunit) | ✅ | ✅ | -| psalm-plugin-symfony | [Psalm Plugin for Symfony](https://github.com/psalm/psalm-plugin-symfony) | ✅ | ✅ | -| psecio-parse | [Scans code for potential security-related issues](https://github.com/psecio/parse) | ✅ | ✅ | -| rector | [Tool for instant code upgrades and refactoring](https://github.com/rectorphp/rector) | ✅ | ✅ | -| roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ✅ | -| simple-phpunit | [Provides utilities to report legacy tests and usage of deprecated code](https://symfony.com/doc/current/components/phpunit_bridge.html) | ✅ | ✅ | -| twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | -| twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | -| twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | -| yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ✅ | ✅ | +| Name | Description | PHP 8.1 | PHP 8.2 | PHP 8.3 | +| :--- | :---------- | :------ | :------ | :------ | +| behat | [Helps to test business expectations](http://behat.org/) | ✅ | ✅ | ✅ | +| box | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ✅ | ✅ | +| box-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ❌ | ✅ | +| 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/) | ✅ | ✅ | ✅ | +| composer-bin-plugin | [Composer plugin to install bin vendors in isolated locations](https://github.com/bamarni/composer-bin-plugin) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| composer-unused | [Show unused packages by scanning your code](https://github.com/icanhazstring/composer-unused) | ✅ | ✅ | ✅ | +| dephpend | [Detect flaws in your architecture](https://dephpend.com/) | ✅ | ✅ | ✅ | +| deprecation-detector | [Finds usages of deprecated code](https://github.com/sensiolabs-de/deprecation-detector) | ✅ | ✅ | ✅ | +| deptrac | [Enforces dependency rules between software layers](https://github.com/qossmic/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) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| 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-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-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) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| phpbench | [PHP Benchmarking framework](https://github.com/phpbench/phpbench) | ✅ | ✅ | ✅ | +| phpca | [Finds usage of non-built-in extensions](https://github.com/wapmorgan/PhpCodeAnalyzer) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| phpdd | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector) | ✅ | ✅ | ✅ | +| phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ✅ | ✅ | ✅ | +| phpinsights | [Analyses code quality, style, architecture and complexity](https://phpinsights.com/) | ✅ | ✅ | ✅ | +| phplint | [Lints php files in parallel](https://github.com/overtrue/phplint) | ✅ | ✅ | ✅ | +| phploc | [A tool for quickly measuring the size of a PHP project](https://github.com/sebastianbergmann/phploc) | ✅ | ✅ | ✅ | +| 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/) | ✅ | ❌ | ❌ | +| 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) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | ✅ | +| phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | +| phpunit | [The PHP testing framework](https://phpunit.de/) | ✅ | ✅ | ✅ | +| phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | +| phpunit-9 | [The PHP testing framework (9.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | +| pint | [Opinionated PHP code style fixer for Laravel](https://github.com/laravel/pint) | ✅ | ✅ | ✅ | +| psalm | [Finds errors in PHP applications](https://psalm.dev/) | ✅ | ✅ | ✅ | +| psalm-plugin-doctrine | [Stubs to let Psalm understand Doctrine better](https://github.com/weirdan/doctrine-psalm-plugin) | ✅ | ✅ | ✅ | +| psalm-plugin-phpunit | [Psalm plugin for PHPUnit](https://github.com/psalm/psalm-plugin-phpunit) | ✅ | ✅ | ✅ | +| psalm-plugin-symfony | [Psalm Plugin for Symfony](https://github.com/psalm/psalm-plugin-symfony) | ✅ | ✅ | ✅ | +| psecio-parse | [Scans code for potential security-related issues](https://github.com/psecio/parse) | ✅ | ✅ | ✅ | +| rector | [Tool for instant code upgrades and refactoring](https://github.com/rectorphp/rector) | ✅ | ✅ | ✅ | +| roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ✅ | ✅ | +| simple-phpunit | [Provides utilities to report legacy tests and usage of deprecated code](https://symfony.com/doc/current/components/phpunit_bridge.html) | ✅ | ✅ | ✅ | +| twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | ✅ | +| twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | ✅ | +| twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | ❌ | +| yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ✅ | ✅ | ✅ | ### Removed tools From a69ea8febf3b71fa666f70043ecc83443898400b Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 30 Nov 2023 09:42:05 +0000 Subject: [PATCH 128/206] Update phpcbf signature --- resources/checkstyle.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/checkstyle.json b/resources/checkstyle.json index 3273e8af..90f0ae67 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -50,7 +50,7 @@ "phive-install": { "alias": "phpcbf", "bin": "%target-dir%/phpcbf", - "sig": "31C7E470E2138192" + "sig": "C00543248C87FB13" } }, "test": "phpcbf --help", From c8fd721c6e9d2354bbf85e5af2ef741aedd35557 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 30 Nov 2023 09:46:39 +0000 Subject: [PATCH 129/206] Revert "Update phpcbf signature" This reverts commit a69ea8febf3b71fa666f70043ecc83443898400b. --- resources/checkstyle.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/checkstyle.json b/resources/checkstyle.json index 90f0ae67..3273e8af 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -50,7 +50,7 @@ "phive-install": { "alias": "phpcbf", "bin": "%target-dir%/phpcbf", - "sig": "C00543248C87FB13" + "sig": "31C7E470E2138192" } }, "test": "phpcbf --help", From fccf2fc13dfc44644c3fb9cf35c9f55b415a6635 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 30 Nov 2023 09:55:15 +0000 Subject: [PATCH 130/206] Enable twigcs on PHP 8.3 --- resources/checkstyle.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/checkstyle.json b/resources/checkstyle.json index 3273e8af..f98cb6d7 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -68,7 +68,7 @@ } }, "test": "twigcs --help", - "tags": ["exclude-php:8.3", "checkstyle"] + "tags": ["checkstyle"] } ] } From 8b6dcdffed528863f92fa7cc3192eac8ac784e76 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 30 Nov 2023 14:27:00 +0000 Subject: [PATCH 131/206] Update the README list of tools --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 56aee879..83d9caed 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | simple-phpunit | [Provides utilities to report legacy tests and usage of deprecated code](https://symfony.com/doc/current/components/phpunit_bridge.html) | ✅ | ✅ | ✅ | | twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | ✅ | | twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | ✅ | -| twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | ❌ | +| twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | ✅ | | yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ✅ | ✅ | ✅ | ### Removed tools From 3654d40ac6b5a18861b081c04d7d23125cbe4493 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 30 Nov 2023 16:55:14 +0000 Subject: [PATCH 132/206] Update the key for composer-unused --- resources/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/composer.json b/resources/composer.json index d6807008..acb54d7d 100644 --- a/resources/composer.json +++ b/resources/composer.json @@ -23,7 +23,7 @@ "phive-install": { "alias": "composer-unused", "bin": "%target-dir%/composer-unused", - "sig": "F4D32E2C9343B2AE" + "sig": "B1B5F6D21AB070E1" } }, "test": "composer-unused -V", From 212c70f9dbab0ab45ba3d7a4d211d3680d2211e3 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 4 Dec 2023 09:59:18 +0000 Subject: [PATCH 133/206] Exclude composer-require-checker on PHP 8.1 --- README.md | 2 +- resources/composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 83d9caed..1bce80b9 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | 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-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 | [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) | ✅ | ✅ | ✅ | | composer-unused | [Show unused packages by scanning your code](https://github.com/icanhazstring/composer-unused) | ✅ | ✅ | ✅ | | dephpend | [Detect flaws in your architecture](https://dephpend.com/) | ✅ | ✅ | ✅ | diff --git a/resources/composer.json b/resources/composer.json index acb54d7d..46a0ceca 100644 --- a/resources/composer.json +++ b/resources/composer.json @@ -41,7 +41,7 @@ } }, "test": "composer-require-checker -V", - "tags": ["composer"] + "tags": ["composer", "exclude-php:8.1"] }, { "name": "composer-require-checker-3", From 11a29e08b3da2294e3d3a1bd4ffb53133a4999d4 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 10 Dec 2023 21:38:40 +0000 Subject: [PATCH 134/206] Update the signature of phpcbf --- resources/checkstyle.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/checkstyle.json b/resources/checkstyle.json index f98cb6d7..216f01d1 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -50,7 +50,7 @@ "phive-install": { "alias": "phpcbf", "bin": "%target-dir%/phpcbf", - "sig": "31C7E470E2138192" + "sig": "5E6DDE998AB73B8E" } }, "test": "phpcbf --help", From 600b632d27284951ec57a4d06be57840198280fe Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 10 Dec 2023 21:50:36 +0000 Subject: [PATCH 135/206] Disable php-coupling-detector --- README.md | 2 +- resources/architecture.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1bce80b9..ea36853d 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,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-coupling-detector | [Detects code coupling issues](https://akeneo.github.io/php-coupling-detector/) | ✅ | ✅ | ✅ | +| 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-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) | ✅ | ✅ | ✅ | diff --git a/resources/architecture.json b/resources/architecture.json index 9371b156..16391728 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -54,7 +54,7 @@ } }, "test": "php-coupling-detector list", - "tags": ["architecture"] + "tags": ["exclude-php:8.1", "exclude-php:8.2", "exclude-php:8.3", "architecture"] }, { "name": "phparkitect", From 875de0fb0cd035d0e761e6368361c98b3c1d8f8a Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 10 Dec 2023 21:57:59 +0000 Subject: [PATCH 136/206] Disable box on PHP 8.1 --- README.md | 2 +- resources/pre-installation.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ea36853d..32349100 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | Name | Description | PHP 8.1 | PHP 8.2 | PHP 8.3 | | :--- | :---------- | :------ | :------ | :------ | | behat | [Helps to test business expectations](http://behat.org/) | ✅ | ✅ | ✅ | -| box | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ✅ | ✅ | +| box | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ❌ | ✅ | ✅ | | box-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ❌ | ✅ | | churn | [Discovers good candidates for refactoring](https://github.com/bmitch/churn-php) | ✅ | ✅ | ✅ | | codeception | [Codeception is a BDD-styled PHP testing framework](https://codeception.com/) | ✅ | ✅ | ✅ | diff --git a/resources/pre-installation.json b/resources/pre-installation.json index 73414b6a..42d83d7a 100644 --- a/resources/pre-installation.json +++ b/resources/pre-installation.json @@ -59,7 +59,7 @@ } }, "test": "box list", - "tags": ["pre-installation"] + "tags": ["exclude-php:8.1", "pre-installation"] }, { "name": "box-3", From b62792965d9c2f4d1114c8012c56c3a62cf5f881 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 11 Jan 2024 09:48:18 +0000 Subject: [PATCH 137/206] Install hub for the update phars job --- .github/workflows/update-phars.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/update-phars.yml b/.github/workflows/update-phars.yml index 0acfb873..8890961e 100644 --- a/.github/workflows/update-phars.yml +++ b/.github/workflows/update-phars.yml @@ -19,6 +19,9 @@ jobs: - name: Configure git run: git config user.email 'jakub@zalas.pl' && git config user.name 'Jakub Zalas' + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y hub + - name: Update PHARs run: make package-devkit update-phars From cba7164fbed44cedfed55e199befa6bacad4489e Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 11 Feb 2024 13:22:35 +0000 Subject: [PATCH 138/206] Disable phpcov on PHP 8.1 --- README.md | 2 +- resources/test.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 32349100..8905977c 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,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 634822b1..20e43b4d 100644 --- a/resources/test.json +++ b/resources/test.json @@ -83,7 +83,7 @@ } }, "test": "phpcov -v", - "tags": ["test"] + "tags": ["test", "exclude-php:8.1"] }, { "name": "php-fuzzer", From 9e41a201c199e644e61c673057917a8d07bd5d60 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 11 Feb 2024 13:29:56 +0000 Subject: [PATCH 139/206] Exclude phpunit 11 on PHP 8.1 --- README.md | 2 +- resources/test.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8905977c..cde15d8d 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | phpstan-strict-rules | [Extra strict and opinionated rules for PHPStan](https://github.com/phpstan/phpstan-strict-rules) | ✅ | ✅ | ✅ | | phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | ✅ | | phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | -| phpunit | [The PHP testing framework](https://phpunit.de/) | ✅ | ✅ | ✅ | +| phpunit | [The PHP testing framework](https://phpunit.de/) | ❌ | ✅ | ✅ | | phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | | phpunit-9 | [The PHP testing framework (9.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | | pint | [Opinionated PHP code style fixer for Laravel](https://github.com/laravel/pint) | ✅ | ✅ | ✅ | diff --git a/resources/test.json b/resources/test.json index 20e43b4d..fe9a216e 100644 --- a/resources/test.json +++ b/resources/test.json @@ -123,7 +123,7 @@ } }, "test": "phpunit --version", - "tags": ["featured", "test"] + "tags": ["featured", "test", "exclude-php:8.1"] }, { "name": "phpunit-9", From 09b56b92cd4b55d00da59fa57b10392ca335ceaa Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 11 Feb 2024 13:31:17 +0000 Subject: [PATCH 140/206] Add phpunit 10 back --- README.md | 1 + resources/test.json | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index cde15d8d..5c6fcc81 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | ✅ | | phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | | phpunit | [The PHP testing framework](https://phpunit.de/) | ❌ | ✅ | ✅ | +| phpunit-10 | [The PHP testing framework (10.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | | phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | | phpunit-9 | [The PHP testing framework (9.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | | pint | [Opinionated PHP code style fixer for Laravel](https://github.com/laravel/pint) | ✅ | ✅ | ✅ | diff --git a/resources/test.json b/resources/test.json index fe9a216e..9c32e0d1 100644 --- a/resources/test.json +++ b/resources/test.json @@ -125,6 +125,20 @@ "test": "phpunit --version", "tags": ["featured", "test", "exclude-php:8.1"] }, + { + "name": "phpunit-10", + "summary": "The PHP testing framework (10.x version)", + "website": "https://phpunit.de/", + "command": { + "phive-install": { + "alias": "phpunit@^10.0", + "bin": "%target-dir%/phpunit-10", + "sig": "4AA394086372C20A" + } + }, + "test": "phpunit-9 --version", + "tags": ["test"] + }, { "name": "phpunit-9", "summary": "The PHP testing framework (9.x version)", From 3f85671d1a4b47e05f33652c42220907f7159bae Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 11 Feb 2024 13:39:02 +0000 Subject: [PATCH 141/206] Switch Behat to bin plugin installation The phar remains broken and is not currently tested. See https://github.com/Behat/Behat/issues/1456 --- resources/test.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/test.json b/resources/test.json index 9c32e0d1..0ab5b519 100644 --- a/resources/test.json +++ b/resources/test.json @@ -5,9 +5,10 @@ "summary": "Helps to test business expectations", "website": "http://behat.org/", "command": { - "phar-download": { - "phar": "https://github.com/Behat/Behat/releases/download/v3.13.0/behat.phar", - "bin": "%target-dir%/behat" + "composer-bin-plugin": { + "package": "behat/behat", + "namespace": "behat", + "links": {"%target-dir%/behat": "behat"} } }, "test": "behat --version", From aa500afbaa491d2d1e710fe5087329c417b84d83 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 22 Feb 2024 21:38:29 +0000 Subject: [PATCH 142/206] Update actions/checkout --- .github/workflows/build.yml | 4 ++-- .github/workflows/publish-website.yml | 2 +- .github/workflows/update-phars.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 79bd7862..6ce79bb2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,7 @@ jobs: deps: low steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -64,7 +64,7 @@ jobs: php: [8.1, 8.2, 8.3] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/publish-website.yml b/.github/workflows/publish-website.yml index 7681dbc0..72cd3c11 100644 --- a/.github/workflows/publish-website.yml +++ b/.github/workflows/publish-website.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest name: Build and publish steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: persist-credentials: false diff --git a/.github/workflows/update-phars.yml b/.github/workflows/update-phars.yml index 8890961e..6e02a885 100644 --- a/.github/workflows/update-phars.yml +++ b/.github/workflows/update-phars.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest name: Create a PR steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 From 061761d283d4db9eba7baa2a52225bea81f0ad87 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Fri, 29 Mar 2024 17:14:00 +0100 Subject: [PATCH 143/206] Update the deptrac signature --- resources/architecture.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/architecture.json b/resources/architecture.json index 16391728..5c76a033 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -22,7 +22,7 @@ "phive-install": { "alias": "deptrac", "bin": "%target-dir%/deptrac", - "sig": "B8F640134AB1782E" + "sig": "47436587D82C4A39" } }, "test": "deptrac list", From a12b98e81944f9addcb3d94f9fca1433c138c72c Mon Sep 17 00:00:00 2001 From: Romain GRELET Date: Thu, 18 Apr 2024 19:41:04 +0000 Subject: [PATCH 144/206] add twig-cs-fixer tool --- README.md | 1 + resources/checkstyle.json | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index 5c6fcc81..2422c99b 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | rector | [Tool for instant code upgrades and refactoring](https://github.com/rectorphp/rector) | ✅ | ✅ | ✅ | | roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ✅ | ✅ | | simple-phpunit | [Provides utilities to report legacy tests and usage of deprecated code](https://symfony.com/doc/current/components/phpunit_bridge.html) | ✅ | ✅ | ✅ | +| twig-cs-fixer | [Automatically corrects twig files following the official coding standard rules](https://github.com/VincentLanglet/Twig-CS-Fixer) | ✅ | ✅ | ✅ | | twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | ✅ | | twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | ✅ | | twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | ✅ | diff --git a/resources/checkstyle.json b/resources/checkstyle.json index 216f01d1..4dcc4a8a 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -69,6 +69,20 @@ }, "test": "twigcs --help", "tags": ["checkstyle"] + }, + { + "name": "twig-cs-fixer", + "summary": "Automatically corrects twig files following the official coding standard rules", + "website": "https://github.com/VincentLanglet/Twig-CS-Fixer", + "command": { + "composer-bin-plugin": { + "package": "vincentlanglet/twig-cs-fixer", + "namespace": "twig-cs-fixer", + "links": {"%target-dir%/twig-cs-fixer": "twig-cs-fixer"} + } + }, + "test": "twig-cs-fixer --help", + "tags": ["checkstyle"] } ] } From 981e4e53d1d9fb24344e8d437c70431a930a6db7 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 22 Apr 2024 20:51:15 +0100 Subject: [PATCH 145/206] Disable yaml-lint on PHP 8.1 --- README.md | 2 +- resources/linting.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5c6fcc81..35068fcb 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | ✅ | | twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | ✅ | | twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | ✅ | -| yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ✅ | ✅ | ✅ | +| yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ❌ | ✅ | ✅ | ### Removed tools diff --git a/resources/linting.json b/resources/linting.json index 9a87b64d..b5f7465b 100644 --- a/resources/linting.json +++ b/resources/linting.json @@ -52,7 +52,7 @@ } }, "test": "yaml-lint --version", - "tags": ["linting"] + "tags": ["linting", "exclude-php:8.1"] }, { "name": "twig-linter", From 95751319310139c9dfcad8b0ad7ae3c6ccb09cc2 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 21 May 2024 13:40:08 +0100 Subject: [PATCH 146/206] Update the 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 4dcc4a8a..0854552f 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -50,7 +50,7 @@ "phive-install": { "alias": "phpcbf", "bin": "%target-dir%/phpcbf", - "sig": "5E6DDE998AB73B8E" + "sig": "A978220305CD5C32" } }, "test": "phpcbf --help", From fea4e3ba1dee6b85c87d86a30f958eb11abaf61e Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 30 May 2024 11:52:45 +0100 Subject: [PATCH 147/206] Update phpDocumentor test command --- resources/documentation.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/documentation.json b/resources/documentation.json index 6a39f990..b77c1ee5 100644 --- a/resources/documentation.json +++ b/resources/documentation.json @@ -11,7 +11,7 @@ "sig": "8AC0BAA79732DD42" } }, - "test": "phpDocumentor list", + "test": "phpDocumentor --help", "tags": ["featured", "documentation"] }, { From 23e4fc1d65bbcda53bd5ef6441d22368c201b7ec Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 5 Aug 2024 21:36:52 +0100 Subject: [PATCH 148/206] Download phan phar directly instead of using phive Phan key is missing which prevents it from being downloaded with phive. --- resources/tools.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/tools.json b/resources/tools.json index 4b60120e..6a53f7f7 100644 --- a/resources/tools.json +++ b/resources/tools.json @@ -19,10 +19,9 @@ "summary": "Static Analysis Tool", "website": "https://github.com/phan/phan", "command": { - "phive-install": { - "alias": "phan", - "bin": "%target-dir%/phan", - "sig": "8101FB57DD8130F0" + "phar-download": { + "phar": "https://github.com/phan/phan/releases/latest/download/phan.phar", + "bin": "%target-dir%/phan" } }, "test": "phan -v", From 046a1562addd2eee02dc467aeebd5b737693dc94 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Fri, 23 Aug 2024 03:39:48 +0000 Subject: [PATCH 149/206] 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 42d83d7a..23520650 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.2/phive-0.15.2.phar.asc", + "url": "https://github.com/phar-io/phive/releases/download/0.15.3/phive-0.15.3.phar.asc", "file": "%target-dir%/phive.asc" }, "phar-download": { - "phar": "https://github.com/phar-io/phive/releases/download/0.15.2/phive-0.15.2.phar", + "phar": "https://github.com/phar-io/phive/releases/download/0.15.3/phive-0.15.3.phar", "bin": "%target-dir%/phive" }, "sh": { From 7459e760830ca3ac8901588abc56efb6714bf28b Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 7 Oct 2024 10:51:48 +0100 Subject: [PATCH 150/206] Bump actions/upload-artifact --- .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 6ce79bb2..4b99dc76 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,13 +43,13 @@ jobs: - if: matrix.deps == 'low' run: make update-min test-min - - uses: actions/upload-artifact@v1 + - uses: actions/upload-artifact@v4 if: matrix.php == '8.1' && matrix.deps == 'high' with: name: toolbox.phar path: build/toolbox.phar - - uses: actions/upload-artifact@v1 + - uses: actions/upload-artifact@v4 if: matrix.php == '8.1' && matrix.deps == 'high' with: name: devkit.phar From 1ffe39703ecb5227ca28f52e57ebf53136ce0efd Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 7 Oct 2024 10:55:03 +0100 Subject: [PATCH 151/206] Bump actions/download-artifact --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b99dc76..ad2b4f83 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -75,7 +75,7 @@ jobs: coverage: none extensions: bz2, zip - - uses: actions/download-artifact@v1 + - uses: actions/download-artifact@v4 with: name: toolbox.phar path: build/ @@ -90,11 +90,11 @@ jobs: needs: tests if: github.event_name == 'release' steps: - - uses: actions/download-artifact@v1 + - uses: actions/download-artifact@v4 with: name: toolbox.phar path: . - - uses: actions/download-artifact@v1 + - uses: actions/download-artifact@v4 with: name: devkit.phar path: . From 81eb0cbbf6f9b39d21dcbe2de75341863e1d92b6 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 6 Nov 2024 21:53:20 +0000 Subject: [PATCH 152/206] Update deptrac signature --- resources/architecture.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/architecture.json b/resources/architecture.json index 5c76a033..cd36ba9d 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -22,7 +22,7 @@ "phive-install": { "alias": "deptrac", "bin": "%target-dir%/deptrac", - "sig": "47436587D82C4A39" + "sig": "D4F06E96D1BD037B" } }, "test": "deptrac list", From 66755c353724ce75896ebf3729622f91f350d35a Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 3 Dec 2024 15:45:08 +0000 Subject: [PATCH 153/206] Update infection (0.27 -> 0.29) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5bd61d89..6758f168 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "require-dev": { "phpunit/phpunit": "^10.4", "zalas/phpunit-globals": "^3.2", - "infection/infection": "^0.27" + "infection/infection": "^0.29" }, "autoload": { "psr-4": { From 2c86730fa9e3fd321250bc0c0f86bf261657a062 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 3 Dec 2024 15:47:46 +0000 Subject: [PATCH 154/206] Remove the phpunit schema location from phpunix.xml.dist It does not seem to be accessible from github actions anymore, and fails the build as infection tries to validate the schema. --- phpunit.xml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 6c596f44..902339f3 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - + From 5e9a72b6470d494b7a0a884bb0033e6d28099921 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 3 Dec 2024 15:51:28 +0000 Subject: [PATCH 155/206] Reference the local phpunit schema location --- phpunit.xml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 902339f3..f7d4e1c6 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - + From 2f6f9969a322cc0c3705a7d6ade99d23df344a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Tue, 3 Dec 2024 14:18:32 +0100 Subject: [PATCH 156/206] feat: PHP 8.4 --- .github/workflows/build.yml | 4 +- README.md | 160 ++++++++++++++++++------------------ bin/devkit.php | 5 +- composer.json | 2 +- 4 files changed, 86 insertions(+), 85 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad2b4f83..6ba256a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: name: Build and test strategy: matrix: - php: [8.1, 8.2, 8.3] + php: [8.1, 8.2, 8.3, 8.4] deps: [high] include: - php: 8.1 @@ -61,7 +61,7 @@ jobs: needs: tests strategy: matrix: - php: [8.1, 8.2, 8.3] + php: [8.1, 8.2, 8.3, 8.4] steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index 250e79b5..9f3b7cea 100644 --- a/README.md +++ b/README.md @@ -16,86 +16,86 @@ It has been extracted as a separate project to make maintenance easier and enabl | Name | Description | PHP 8.1 | PHP 8.2 | PHP 8.3 | | :--- | :---------- | :------ | :------ | :------ | -| behat | [Helps to test business expectations](http://behat.org/) | ✅ | ✅ | ✅ | -| box | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ❌ | ✅ | ✅ | -| box-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ❌ | ✅ | -| 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/) | ✅ | ✅ | ✅ | -| composer-bin-plugin | [Composer plugin to install bin vendors in isolated locations](https://github.com/bamarni/composer-bin-plugin) | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | -| composer-unused | [Show unused packages by scanning your code](https://github.com/icanhazstring/composer-unused) | ✅ | ✅ | ✅ | -| dephpend | [Detect flaws in your architecture](https://dephpend.com/) | ✅ | ✅ | ✅ | -| deprecation-detector | [Finds usages of deprecated code](https://github.com/sensiolabs-de/deprecation-detector) | ✅ | ✅ | ✅ | -| deptrac | [Enforces dependency rules between software layers](https://github.com/qossmic/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) | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | -| 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-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-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) | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | -| phpbench | [PHP Benchmarking framework](https://github.com/phpbench/phpbench) | ✅ | ✅ | ✅ | -| phpca | [Finds usage of non-built-in extensions](https://github.com/wapmorgan/PhpCodeAnalyzer) | ✅ | ✅ | ✅ | -| 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) | ❌ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | -| phpdd | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector) | ✅ | ✅ | ✅ | -| phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ✅ | ✅ | ✅ | -| phpinsights | [Analyses code quality, style, architecture and complexity](https://phpinsights.com/) | ✅ | ✅ | ✅ | -| phplint | [Lints php files in parallel](https://github.com/overtrue/phplint) | ✅ | ✅ | ✅ | -| phploc | [A tool for quickly measuring the size of a PHP project](https://github.com/sebastianbergmann/phploc) | ✅ | ✅ | ✅ | -| 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/) | ✅ | ❌ | ❌ | -| 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) | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | -| phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | ✅ | -| phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | -| phpunit | [The PHP testing framework](https://phpunit.de/) | ❌ | ✅ | ✅ | -| phpunit-10 | [The PHP testing framework (10.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | -| phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | -| phpunit-9 | [The PHP testing framework (9.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | -| pint | [Opinionated PHP code style fixer for Laravel](https://github.com/laravel/pint) | ✅ | ✅ | ✅ | -| psalm | [Finds errors in PHP applications](https://psalm.dev/) | ✅ | ✅ | ✅ | -| psalm-plugin-doctrine | [Stubs to let Psalm understand Doctrine better](https://github.com/weirdan/doctrine-psalm-plugin) | ✅ | ✅ | ✅ | -| psalm-plugin-phpunit | [Psalm plugin for PHPUnit](https://github.com/psalm/psalm-plugin-phpunit) | ✅ | ✅ | ✅ | -| psalm-plugin-symfony | [Psalm Plugin for Symfony](https://github.com/psalm/psalm-plugin-symfony) | ✅ | ✅ | ✅ | -| psecio-parse | [Scans code for potential security-related issues](https://github.com/psecio/parse) | ✅ | ✅ | ✅ | -| rector | [Tool for instant code upgrades and refactoring](https://github.com/rectorphp/rector) | ✅ | ✅ | ✅ | -| roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ✅ | ✅ | -| simple-phpunit | [Provides utilities to report legacy tests and usage of deprecated code](https://symfony.com/doc/current/components/phpunit_bridge.html) | ✅ | ✅ | ✅ | -| twig-cs-fixer | [Automatically corrects twig files following the official coding standard rules](https://github.com/VincentLanglet/Twig-CS-Fixer) | ✅ | ✅ | ✅ | -| twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | ✅ | -| twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | ✅ | -| twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | ✅ | -| yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ❌ | ✅ | ✅ | +| behat | [Helps to test business expectations](http://behat.org/) | ✅ | ✅ | ✅ | ✅ | +| box | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ❌ | ✅ | ✅ | ✅ | +| box-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ❌ | ✅ | ✅ | +| 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/) | ✅ | ✅ | ✅ | ✅ | +| composer-bin-plugin | [Composer plugin to install bin vendors in isolated locations](https://github.com/bamarni/composer-bin-plugin) | ✅ | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | ✅ | +| composer-unused | [Show unused packages by scanning your code](https://github.com/icanhazstring/composer-unused) | ✅ | ✅ | ✅ | ✅ | +| dephpend | [Detect flaws in your architecture](https://dephpend.com/) | ✅ | ✅ | ✅ | ✅ | +| deprecation-detector | [Finds usages of deprecated code](https://github.com/sensiolabs-de/deprecation-detector) | ✅ | ✅ | ✅ | ✅ | +| deptrac | [Enforces dependency rules between software layers](https://github.com/qossmic/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) | ✅ | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | ✅ | +| 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-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-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) | ✅ | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | ✅ | +| phpbench | [PHP Benchmarking framework](https://github.com/phpbench/phpbench) | ✅ | ✅ | ✅ | ✅ | +| phpca | [Finds usage of non-built-in extensions](https://github.com/wapmorgan/PhpCodeAnalyzer) | ✅ | ✅ | ✅ | ✅ | +| 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) | ❌ | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | ✅ | +| phpdd | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector) | ✅ | ✅ | ✅ | ✅ | +| phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ✅ | ✅ | ✅ | ✅ | +| phpinsights | [Analyses code quality, style, architecture and complexity](https://phpinsights.com/) | ✅ | ✅ | ✅ | ✅ | +| phplint | [Lints php files in parallel](https://github.com/overtrue/phplint) | ✅ | ✅ | ✅ | ✅ | +| phploc | [A tool for quickly measuring the size of a PHP project](https://github.com/sebastianbergmann/phploc) | ✅ | ✅ | ✅ | ✅ | +| 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/) | ✅ | ❌ | ❌ | ✅ | +| 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) | ✅ | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | ✅ | +| phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | ✅ | ✅ | +| phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | ✅ | +| phpunit | [The PHP testing framework](https://phpunit.de/) | ❌ | ✅ | ✅ | ✅ | +| phpunit-10 | [The PHP testing framework (10.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | ✅ | +| phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | ✅ | +| phpunit-9 | [The PHP testing framework (9.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | ✅ | +| pint | [Opinionated PHP code style fixer for Laravel](https://github.com/laravel/pint) | ✅ | ✅ | ✅ | ✅ | +| psalm | [Finds errors in PHP applications](https://psalm.dev/) | ✅ | ✅ | ✅ | ✅ | +| psalm-plugin-doctrine | [Stubs to let Psalm understand Doctrine better](https://github.com/weirdan/doctrine-psalm-plugin) | ✅ | ✅ | ✅ | ✅ | +| psalm-plugin-phpunit | [Psalm plugin for PHPUnit](https://github.com/psalm/psalm-plugin-phpunit) | ✅ | ✅ | ✅ | ✅ | +| psalm-plugin-symfony | [Psalm Plugin for Symfony](https://github.com/psalm/psalm-plugin-symfony) | ✅ | ✅ | ✅ | ✅ | +| psecio-parse | [Scans code for potential security-related issues](https://github.com/psecio/parse) | ✅ | ✅ | ✅ | ✅ | +| rector | [Tool for instant code upgrades and refactoring](https://github.com/rectorphp/rector) | ✅ | ✅ | ✅ | ✅ | +| roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ✅ | ✅ | ✅ | +| simple-phpunit | [Provides utilities to report legacy tests and usage of deprecated code](https://symfony.com/doc/current/components/phpunit_bridge.html) | ✅ | ✅ | ✅ | ✅ | +| twig-cs-fixer | [Automatically corrects twig files following the official coding standard rules](https://github.com/VincentLanglet/Twig-CS-Fixer) | ✅ | ✅ | ✅ | ✅ | +| twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | ✅ | ✅ | +| twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | ✅ | ✅ | +| twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | ✅ | ✅ | +| yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ❌ | ✅ | ✅ | ✅ | ### Removed tools diff --git a/bin/devkit.php b/bin/devkit.php index 0bf7dfd2..ebce07f3 100755 --- a/bin/devkit.php +++ b/bin/devkit.php @@ -79,13 +79,14 @@ protected function execute(InputInterface $input, OutputInterface $output) return strcasecmp($left->name(), $right->name()); })->reduce('', function ($acc, Tool $tool) { - return $acc . sprintf('| %s | [%s](%s) | %s | %s | %s |', + return $acc . sprintf('| %s | [%s](%s) | %s | %s | %s | %s |', $tool->name(), $tool->summary(), $tool->website(), in_array('exclude-php:8.1', $tool->tags(), true) ? '❌' : '✅', in_array('exclude-php:8.2', $tool->tags(), true) ? '❌' : '✅', - in_array('exclude-php:8.3', $tool->tags(), true) ? '❌' : '✅' + in_array('exclude-php:8.3', $tool->tags(), true) ? '❌' : '✅', + in_array('exclude-php:8.4', $tool->tags(), true) ? '❌' : '✅', ) . PHP_EOL; }); diff --git a/composer.json b/composer.json index 6758f168..bcdfb10f 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Helps to discover and install tools", "type": "project", "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "symfony/console": "^5.4.31 || ^6.3", "psr/container": "^2.0" }, From d3d0d67676811969e84087621cb49b6ecd0aab97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 6 Dec 2024 11:32:58 +0100 Subject: [PATCH 157/206] WIP check GH rate limits before test --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ba256a8..f3a1a63d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,7 +79,8 @@ jobs: with: name: toolbox.phar path: build/ - + - name: Check GitHub API rate limits + run: curl -I https://api.github.com - run: make test-integration env: GITHUB_AUTH_TOKEN: ${{ secrets.ACCESS_TOKEN }} From 95b6329a8abb0ffca05ff93fa0d54d66fd9e93a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 6 Dec 2024 11:45:44 +0100 Subject: [PATCH 158/206] WIP try to remove the auth token --- .github/workflows/build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3a1a63d..df67779c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,11 +79,7 @@ jobs: with: name: toolbox.phar path: build/ - - name: Check GitHub API rate limits - run: curl -I https://api.github.com - run: make test-integration - env: - GITHUB_AUTH_TOKEN: ${{ secrets.ACCESS_TOKEN }} publish-phars: runs-on: ubuntu-latest From 4a6d2bcd2667d578a1d4757d81d99e48224c2e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 6 Dec 2024 11:48:30 +0100 Subject: [PATCH 159/206] WIP try to rename the token --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df67779c..a820e21c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,6 +80,8 @@ jobs: name: toolbox.phar path: build/ - run: make test-integration + env: + GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} publish-phars: runs-on: ubuntu-latest From d9a46df38f6e3b3afa9da3be5d021f726c13e45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 6 Dec 2024 11:53:19 +0100 Subject: [PATCH 160/206] fix: exclude Roave BCC in 8.4 --- resources/compatibility.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/compatibility.json b/resources/compatibility.json index 4ad290a4..419a6ca7 100644 --- a/resources/compatibility.json +++ b/resources/compatibility.json @@ -28,7 +28,7 @@ } }, "test": "roave-backward-compatibility-check --version", - "tags": ["compatibility"] + "tags": ["compatibility", "exclude-php:8.4"] } ] } From 20af1d8066a729330793f5e6d6ed98542e338abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 6 Dec 2024 12:00:26 +0100 Subject: [PATCH 161/206] WIP try to pass --- resources/architecture.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/architecture.json b/resources/architecture.json index cd36ba9d..7cfc132d 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -54,7 +54,7 @@ } }, "test": "php-coupling-detector list", - "tags": ["exclude-php:8.1", "exclude-php:8.2", "exclude-php:8.3", "architecture"] + "tags": ["exclude-php:8.1", "exclude-php:8.2", "exclude-php:8.3", "exclude-php:8.4", "architecture"] }, { "name": "phparkitect", From 062fae065f9f56a73fddc82a144037fa070b0d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 6 Dec 2024 12:09:48 +0100 Subject: [PATCH 162/206] WIP try to pass --- resources/checkstyle.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/checkstyle.json b/resources/checkstyle.json index 0854552f..9d03a46b 100644 --- a/resources/checkstyle.json +++ b/resources/checkstyle.json @@ -40,7 +40,7 @@ } }, "test": "php-cs-fixer list", - "tags": ["featured", "checkstyle"] + "tags": ["featured", "checkstyle", "exclude-php:8.4"] }, { "name": "phpcbf", From cf05fd7ca8916b952a571ad3d1215360677664c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 6 Dec 2024 12:17:51 +0100 Subject: [PATCH 163/206] WIP try to pass --- resources/test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/test.json b/resources/test.json index 0ab5b519..914817d9 100644 --- a/resources/test.json +++ b/resources/test.json @@ -110,7 +110,7 @@ } }, "test": "phpspec --version", - "tags": ["exclude-php:8.3", "exclude-php:8.2", "featured", "test"] + "tags": ["exclude-php:8.4", "exclude-php:8.3", "exclude-php:8.2", "featured", "test"] }, { "name": "phpunit", From 63bfb754ece722dafc801adcc28ac9c88037fbe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 6 Dec 2024 14:38:16 +0100 Subject: [PATCH 164/206] WIP try to pass --- resources/architecture.json | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/resources/architecture.json b/resources/architecture.json index 7cfc132d..8ac93159 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -42,20 +42,6 @@ "test": "pdepend --version", "tags": ["featured", "architecture"] }, - { - "name": "php-coupling-detector", - "summary": "Detects code coupling issues", - "website": "https://akeneo.github.io/php-coupling-detector/", - "command": { - "composer-bin-plugin": { - "package": "akeneo/php-coupling-detector", - "namespace": "tools", - "links": {"%target-dir%/php-coupling-detector": "php-coupling-detector"} - } - }, - "test": "php-coupling-detector list", - "tags": ["exclude-php:8.1", "exclude-php:8.2", "exclude-php:8.3", "exclude-php:8.4", "architecture"] - }, { "name": "phparkitect", "summary": "Helps to put architectural constraints in a PHP code base", From 3d1b2955b384d97ac491fe9ec036743fbca19739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 6 Dec 2024 14:45:09 +0100 Subject: [PATCH 165/206] WIP try to pass --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9f3b7cea..3035aaef 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,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-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-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) | ✅ | ✅ | ✅ | ✅ | @@ -65,7 +64,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) | ✅ | ✅ | ✅ | ✅ | @@ -89,7 +88,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | psalm-plugin-symfony | [Psalm Plugin for Symfony](https://github.com/psalm/psalm-plugin-symfony) | ✅ | ✅ | ✅ | ✅ | | psecio-parse | [Scans code for potential security-related issues](https://github.com/psecio/parse) | ✅ | ✅ | ✅ | ✅ | | rector | [Tool for instant code upgrades and refactoring](https://github.com/rectorphp/rector) | ✅ | ✅ | ✅ | ✅ | -| roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ✅ | ✅ | ✅ | +| roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ✅ | ✅ | ❌ | | simple-phpunit | [Provides utilities to report legacy tests and usage of deprecated code](https://symfony.com/doc/current/components/phpunit_bridge.html) | ✅ | ✅ | ✅ | ✅ | | twig-cs-fixer | [Automatically corrects twig files following the official coding standard rules](https://github.com/VincentLanglet/Twig-CS-Fixer) | ✅ | ✅ | ✅ | ✅ | | twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | ✅ | ✅ | From 8d22e2f3986c412ffbf108d3796d4b0eb5ff08ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 6 Dec 2024 14:51:14 +0100 Subject: [PATCH 166/206] WIP try to pass --- README.md | 4 ++-- bin/devkit.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3035aaef..3eaaa9fa 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ It has been extracted as a separate project to make maintenance easier and enabl ## Available tools -| Name | Description | PHP 8.1 | PHP 8.2 | PHP 8.3 | -| :--- | :---------- | :------ | :------ | :------ | +| Name | Description | PHP 8.1 | PHP 8.2 | PHP 8.3 | PHP 8.4 | +| :--- | :---------- | :------ | :------ | :------ | :------ | | behat | [Helps to test business expectations](http://behat.org/) | ✅ | ✅ | ✅ | ✅ | | box | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ❌ | ✅ | ✅ | ✅ | | box-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ❌ | ✅ | ✅ | diff --git a/bin/devkit.php b/bin/devkit.php index ebce07f3..33523547 100755 --- a/bin/devkit.php +++ b/bin/devkit.php @@ -73,8 +73,8 @@ protected function execute(InputInterface $input, OutputInterface $output) $readmePath = $input->getOption('readme'); $tools = $this->loadTools($jsonPath); - $toolsList = '| Name | Description | PHP 8.1 | PHP 8.2 | PHP 8.3 |' . PHP_EOL; - $toolsList .= '| :--- | :---------- | :------ | :------ | :------ |' . PHP_EOL; + $toolsList = '| Name | Description | PHP 8.1 | PHP 8.2 | PHP 8.3 | PHP 8.4 |' . PHP_EOL; + $toolsList .= '| :--- | :---------- | :------ | :------ | :------ | :------ |' . PHP_EOL; $toolsList .= $tools->sort(function (Tool $left, Tool $right) { return strcasecmp($left->name(), $right->name()); })->reduce('', function ($acc, Tool $tool) { From 337e4466b1f303dc0a5bde093ac7a4f51a82fcb8 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 11 Dec 2024 12:11:23 +0000 Subject: [PATCH 167/206] Add php-coupling-detector to the list of removed tools --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3eaaa9fa..01daeab5 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | 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/) | | php-formatter | [Custom coding standards fixer](https://github.com/mmoreram/php-formatter) | | phpcf | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpCodeFixer/) | | phpda | [Generates dependency graphs](https://mamuz.github.io/PhpDependencyAnalysis/) | From 968b4c032a84564cf92b38091f8b9de53641a799 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 26 Dec 2024 20:11:56 +0000 Subject: [PATCH 168/206] Disable infection on PHP 8.1 --- README.md | 2 +- resources/test.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 01daeab5..9cdc5aad 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,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/qossmic/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) | ✅ | ✅ | ✅ | ✅ | -| infection | [AST based PHP Mutation Testing Framework](https://infection.github.io/) | ✅ | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | ✅ | | parallel-lint | [Checks PHP file syntax](https://github.com/php-parallel-lint/PHP-Parallel-Lint) | ✅ | ✅ | ✅ | ✅ | diff --git a/resources/test.json b/resources/test.json index 914817d9..af37417b 100644 --- a/resources/test.json +++ b/resources/test.json @@ -39,7 +39,7 @@ } }, "test": "infection --version", - "tags": ["featured", "test"] + "tags": ["featured", "test", "exclude-php:8.1"] }, { "name": "paratest", From 05e9fa19c851cf00f92e3f322f640c41d79dfebe Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 31 Dec 2024 15:08:59 +0000 Subject: [PATCH 169/206] Enable PHPSpec on PHP 8.2 and 8.3 --- README.md | 2 +- resources/test.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9cdc5aad..dd53cdd4 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,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) | ✅ | ✅ | ✅ | ✅ | diff --git a/resources/test.json b/resources/test.json index af37417b..80d2a283 100644 --- a/resources/test.json +++ b/resources/test.json @@ -110,7 +110,7 @@ } }, "test": "phpspec --version", - "tags": ["exclude-php:8.4", "exclude-php:8.3", "exclude-php:8.2", "featured", "test"] + "tags": ["exclude-php:8.4", "featured", "test"] }, { "name": "phpunit", From c60feb174231405e4fc984e413d28385fc3cae8c Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Mon, 13 Jan 2025 13:13:53 +0100 Subject: [PATCH 170/206] feat: add tool cyclonedx-php-composer Signed-off-by: Jan Kowalleck --- README.md | 1 + resources/composer.json | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/README.md b/README.md index dd53cdd4..c91ba4f4 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | 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) | ✅ | ✅ | ✅ | ✅ | | composer-unused | [Show unused packages by scanning your code](https://github.com/icanhazstring/composer-unused) | ✅ | ✅ | ✅ | ✅ | +| cyclonedx-php-composer | [Composer plugin to create Software-Bill-of-Materials (SBOM) in CycloneDX format](https://github.com/CycloneDX/cyclonedx-php-composer) | ✅ | ✅ | ✅ | ✅ | | dephpend | [Detect flaws in your architecture](https://dephpend.com/) | ✅ | ✅ | ✅ | ✅ | | deprecation-detector | [Finds usages of deprecated code](https://github.com/sensiolabs-de/deprecation-detector) | ✅ | ✅ | ✅ | ✅ | | deptrac | [Enforces dependency rules between software layers](https://github.com/qossmic/deptrac) | ✅ | ✅ | ✅ | ✅ | diff --git a/resources/composer.json b/resources/composer.json index 46a0ceca..24b1923a 100644 --- a/resources/composer.json +++ b/resources/composer.json @@ -56,6 +56,21 @@ }, "test": "composer-require-checker-3 -V", "tags": ["composer"] + }, + { + "name": "cyclonedx-php-composer", + "summary": "Composer plugin to create Software-Bill-of-Materials (SBOM) in CycloneDX format", + "website": "https://github.com/CycloneDX/cyclonedx-php-composer", + "command": { + "sh": { + "command": "composer global config --no-plugins allow-plugins.cyclonedx/cyclonedx-php-composer true" + }, + "composer-global-install": { + "package": "cyclonedx/cyclonedx-php-composer" + } + }, + "test": "composer global show cyclonedx/cyclonedx-php-composer", + "tags": ["composer"] } ] } From 36e5e8f9c59609099872efaaf5c0b991b749f8c3 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 10 Feb 2025 09:57:58 +0000 Subject: [PATCH 171/206] Allow PHPUnit 12 to be installed * disable PHPUnit 12 on PHP 8.2 * make PHPUnit 11 available as phpunit-11 --- README.md | 3 ++- resources/test.json | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c91ba4f4..83e1bc40 100644 --- a/README.md +++ b/README.md @@ -78,8 +78,9 @@ It has been extracted as a separate project to make maintenance easier and enabl | phpstan-strict-rules | [Extra strict and opinionated rules for PHPStan](https://github.com/phpstan/phpstan-strict-rules) | ✅ | ✅ | ✅ | ✅ | | phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | ✅ | ✅ | | phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | ✅ | -| phpunit | [The PHP testing framework](https://phpunit.de/) | ❌ | ✅ | ✅ | ✅ | +| phpunit | [The PHP testing framework](https://phpunit.de/) | ❌ | ❌ | ✅ | ✅ | | phpunit-10 | [The PHP testing framework (10.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | ✅ | +| phpunit-11 | [The PHP testing framework (11.x version)](https://phpunit.de/) | ❌ | ✅ | ✅ | ✅ | | phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | ✅ | | phpunit-9 | [The PHP testing framework (9.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | ✅ | | pint | [Opinionated PHP code style fixer for Laravel](https://github.com/laravel/pint) | ✅ | ✅ | ✅ | ✅ | diff --git a/resources/test.json b/resources/test.json index 80d2a283..ffdb1c72 100644 --- a/resources/test.json +++ b/resources/test.json @@ -124,7 +124,21 @@ } }, "test": "phpunit --version", - "tags": ["featured", "test", "exclude-php:8.1"] + "tags": ["featured", "test", "exclude-php:8.1", "exclude-php:8.2"] + }, + { + "name": "phpunit-11", + "summary": "The PHP testing framework (11.x version)", + "website": "https://phpunit.de/", + "command": { + "phive-install": { + "alias": "phpunit@^11.0", + "bin": "%target-dir%/phpunit-11", + "sig": "4AA394086372C20A" + } + }, + "test": "phpunit-11 --version", + "tags": ["test", "exclude-php:8.1"] }, { "name": "phpunit-10", @@ -137,7 +151,7 @@ "sig": "4AA394086372C20A" } }, - "test": "phpunit-9 --version", + "test": "phpunit-10 --version", "tags": ["test"] }, { From 92ca4084ac2a4483b9d363605bf5c77da3decf21 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 13 Feb 2025 10:03:44 +0000 Subject: [PATCH 172/206] Update the signature for phpDocumentor --- resources/documentation.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/documentation.json b/resources/documentation.json index b77c1ee5..5fc2b870 100644 --- a/resources/documentation.json +++ b/resources/documentation.json @@ -8,7 +8,7 @@ "phive-install": { "alias": "phpDocumentor", "bin": "%target-dir%/phpDocumentor", - "sig": "8AC0BAA79732DD42" + "sig": "6DA3ACC4991FFAE5" } }, "test": "phpDocumentor --help", From caf496985b63a014368965bd9b56aa31a7ee9b4e Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 24 Feb 2025 09:41:35 +0000 Subject: [PATCH 173/206] Install the latest version of deptrac with composer global install phar seems to be abandoned. --- resources/architecture.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/resources/architecture.json b/resources/architecture.json index 8ac93159..a54288e7 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -17,12 +17,10 @@ { "name": "deptrac", "summary": "Enforces dependency rules between software layers", - "website": "https://github.com/qossmic/deptrac", + "website": "https://github.com/deptrac/deptrac", "command": { - "phive-install": { - "alias": "deptrac", - "bin": "%target-dir%/deptrac", - "sig": "D4F06E96D1BD037B" + "composer-global-install": { + "package": "deptrac/deptrac" } }, "test": "deptrac list", From 51db7bce99040c3af892c28ad6c28b0df6e681d6 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 24 Feb 2025 09:44:06 +0000 Subject: [PATCH 174/206] Install deptract with composer instead of the phar --- Makefile | 3 +-- composer.json | 3 ++- deptrac.yaml | 44 ++++++++++++++++++++++---------------------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index bbcd8ff8..fff6583f 100644 --- a/Makefile +++ b/Makefile @@ -133,8 +133,7 @@ tools/php-cs-fixer: curl -Ls https://cs.symfony.com/download/php-cs-fixer-v3.phar -o tools/php-cs-fixer && chmod +x tools/php-cs-fixer tools/deptrac: - curl -Ls https://github.com/qossmic/deptrac/releases/download/1.0.2/deptrac.phar -o tools/deptrac && chmod +x tools/deptrac - curl -Ls https://github.com/qossmic/deptrac/releases/download/1.0.2/deptrac.phar.asc -o tools/deptrac.asc + ln -sf ../vendor/bin/deptrac tools/deptrac tools/box: curl -Ls https://github.com/humbug/box/releases/download/4.2.0/box.phar -o tools/box && chmod +x tools/box diff --git a/composer.json b/composer.json index bcdfb10f..98a45a1f 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,8 @@ "require-dev": { "phpunit/phpunit": "^10.4", "zalas/phpunit-globals": "^3.2", - "infection/infection": "^0.29" + "infection/infection": "^0.29", + "deptrac/deptrac": "^3.0" }, "autoload": { "psr-4": { diff --git a/deptrac.yaml b/deptrac.yaml index 99dfe48c..d7543f8c 100644 --- a/deptrac.yaml +++ b/deptrac.yaml @@ -5,47 +5,47 @@ parameters: layers: - name: Cli collectors: - - type: className - regex: ^Zalas\\Toolbox\\Cli\\.* + - type: classLike + value: ^Zalas\\Toolbox\\Cli\\.* - name: Json collectors: - - type: className - regex: ^Zalas\\Toolbox\\Json\\.* + - type: classLike + value: ^Zalas\\Toolbox\\Json\\.* - name: Runner collectors: - - type: className - regex: ^Zalas\\Toolbox\\Runner\\.* + - type: classLike + value: ^Zalas\\Toolbox\\Runner\\.* - name: Tool collectors: - - type: className - regex: ^Zalas\\Toolbox\\Tool\\.* + - type: classLike + value: ^Zalas\\Toolbox\\Tool\\.* - name: UseCase collectors: - - type: className - regex: ^Zalas\\Toolbox\\UseCase\\.* + - type: classLike + value: ^Zalas\\Toolbox\\UseCase\\.* - name: Psr Container collectors: - - type: className - regex: ^Psr\\Container\\.* + - type: classLike + value: ^Psr\\Container\\.* - name: Symfony Console collectors: - - type: className - regex: ^Symfony\\Component\\Console\\.* + - type: classLike + value: ^Symfony\\Component\\Console\\.* - name: Other Vendors collectors: - type: bool must: # must be outside of global namespace - - type: className - regex: '[\\]+' + - type: classLike + value: '[\\]+' must_not: # must not be one of the known vendors - - type: className - regex: ^Zalas\\Toolbox\\(Cli|Json|Runner|Tool|UseCase)\\.* - - type: className - regex: ^Psr\\Container\\.* - - type: className - regex: ^Symfony\\Component\\Console\\.* + - type: classLike + value: ^Zalas\\Toolbox\\(Cli|Json|Runner|Tool|UseCase)\\.* + - type: classLike + value: ^Psr\\Container\\.* + - type: classLike + value: ^Symfony\\Component\\Console\\.* ruleset: Cli: - Tool From d734c4e8beaf7a0caa9ba541ebcbb357160937a6 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 24 Feb 2025 14:20:38 +0000 Subject: [PATCH 175/206] Update readme tools --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 83e1bc40..ccc071b8 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ It has been extracted as a separate project to make maintenance easier and enabl | cyclonedx-php-composer | [Composer plugin to create Software-Bill-of-Materials (SBOM) in CycloneDX format](https://github.com/CycloneDX/cyclonedx-php-composer) | ✅ | ✅ | ✅ | ✅ | | dephpend | [Detect flaws in your architecture](https://dephpend.com/) | ✅ | ✅ | ✅ | ✅ | | deprecation-detector | [Finds usages of deprecated code](https://github.com/sensiolabs-de/deprecation-detector) | ✅ | ✅ | ✅ | ✅ | -| deptrac | [Enforces dependency rules between software layers](https://github.com/qossmic/deptrac) | ✅ | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | ✅ | | infection | [AST based PHP Mutation Testing Framework](https://infection.github.io/) | ❌ | ✅ | ✅ | ✅ | From b999ca9fb0865a54f40b1bd41c8adb32ba5b626c Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 24 Feb 2025 14:37:10 +0000 Subject: [PATCH 176/206] Drop PHP 8.1 support --- .github/workflows/build.yml | 10 +- .github/workflows/publish-website.yml | 2 +- .github/workflows/update-phars.yml | 2 +- Makefile | 4 +- README.md | 168 +++++++++++++------------- bin/devkit.php | 7 +- composer.json | 2 +- resources/composer.json | 2 +- resources/linting.json | 2 +- resources/pre-installation.json | 2 +- resources/test.json | 8 +- 11 files changed, 104 insertions(+), 105 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a820e21c..be7baee1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,10 +20,10 @@ jobs: name: Build and test strategy: matrix: - php: [8.1, 8.2, 8.3, 8.4] + php: [8.2, 8.3, 8.4] deps: [high] include: - - php: 8.1 + - php: 8.2 deps: low steps: @@ -44,13 +44,13 @@ jobs: run: make update-min test-min - uses: actions/upload-artifact@v4 - if: matrix.php == '8.1' && matrix.deps == 'high' + if: matrix.php == '8.2' && matrix.deps == 'high' with: name: toolbox.phar path: build/toolbox.phar - uses: actions/upload-artifact@v4 - if: matrix.php == '8.1' && matrix.deps == 'high' + if: matrix.php == '8.2' && matrix.deps == 'high' with: name: devkit.phar path: build/devkit.phar @@ -61,7 +61,7 @@ jobs: needs: tests strategy: matrix: - php: [8.1, 8.2, 8.3, 8.4] + php: [8.2, 8.3, 8.4] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/publish-website.yml b/.github/workflows/publish-website.yml index 72cd3c11..309ac156 100644 --- a/.github/workflows/publish-website.yml +++ b/.github/workflows/publish-website.yml @@ -18,7 +18,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: "8.1" + php-version: "8.2" ini-values: "phar.readonly=0" - name: Build the website diff --git a/.github/workflows/update-phars.yml b/.github/workflows/update-phars.yml index 6e02a885..38db0c04 100644 --- a/.github/workflows/update-phars.yml +++ b/.github/workflows/update-phars.yml @@ -13,7 +13,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: "8.1" + php-version: "8.2" ini-values: "phar.readonly=0" - name: Configure git diff --git a/Makefile b/Makefile index fff6583f..06f222b5 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ package: tools/box sed -e 's/Application('"'"'dev/Application('"'"'$(TOOLBOX_VERSION)/g' bin/toolbox.php > build/phar/bin/toolbox.php cd build/phar && \ - composer config platform.php 8.1.0 && \ + composer config platform.php 8.2.0 && \ composer update --no-dev -o -a tools/box compile @@ -79,7 +79,7 @@ package-devkit: tools/box sed -e 's/\(Application(.*\)'"'"'dev/\1'"'"'$(TOOLBOX_VERSION)/g' bin/devkit.php > build/devkit-phar/bin/devkit.php cd build/devkit-phar && \ - composer config platform.php 8.1.0 && \ + composer config platform.php 8.2.0 && \ composer update --no-dev -o -a tools/box compile -c box-devkit.json.dist diff --git a/README.md b/README.md index ccc071b8..6f470c9f 100644 --- a/README.md +++ b/README.md @@ -14,89 +14,89 @@ It has been extracted as a separate project to make maintenance easier and enabl ## Available tools -| Name | Description | PHP 8.1 | PHP 8.2 | PHP 8.3 | PHP 8.4 | -| :--- | :---------- | :------ | :------ | :------ | :------ | -| behat | [Helps to test business expectations](http://behat.org/) | ✅ | ✅ | ✅ | ✅ | -| box | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ❌ | ✅ | ✅ | ✅ | -| box-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ❌ | ✅ | ✅ | -| 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/) | ✅ | ✅ | ✅ | ✅ | -| composer-bin-plugin | [Composer plugin to install bin vendors in isolated locations](https://github.com/bamarni/composer-bin-plugin) | ✅ | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | ✅ | -| composer-unused | [Show unused packages by scanning your code](https://github.com/icanhazstring/composer-unused) | ✅ | ✅ | ✅ | ✅ | -| cyclonedx-php-composer | [Composer plugin to create Software-Bill-of-Materials (SBOM) in CycloneDX format](https://github.com/CycloneDX/cyclonedx-php-composer) | ✅ | ✅ | ✅ | ✅ | -| dephpend | [Detect flaws in your architecture](https://dephpend.com/) | ✅ | ✅ | ✅ | ✅ | -| deprecation-detector | [Finds usages of deprecated code](https://github.com/sensiolabs-de/deprecation-detector) | ✅ | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | ✅ | -| 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/) | ✅ | ✅ | ✅ | ❌ | -| 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) | ✅ | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | ✅ | -| phpbench | [PHP Benchmarking framework](https://github.com/phpbench/phpbench) | ✅ | ✅ | ✅ | ✅ | -| phpca | [Finds usage of non-built-in extensions](https://github.com/wapmorgan/PhpCodeAnalyzer) | ✅ | ✅ | ✅ | ✅ | -| 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) | ❌ | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | ✅ | -| phpdd | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector) | ✅ | ✅ | ✅ | ✅ | -| phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ✅ | ✅ | ✅ | ✅ | -| phpinsights | [Analyses code quality, style, architecture and complexity](https://phpinsights.com/) | ✅ | ✅ | ✅ | ✅ | -| phplint | [Lints php files in parallel](https://github.com/overtrue/phplint) | ✅ | ✅ | ✅ | ✅ | -| phploc | [A tool for quickly measuring the size of a PHP project](https://github.com/sebastianbergmann/phploc) | ✅ | ✅ | ✅ | ✅ | -| 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/) | ✅ | ✅ | ✅ | ❌ | -| 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) | ✅ | ✅ | ✅ | ✅ | -| 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) | ✅ | ✅ | ✅ | ✅ | -| phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | ✅ | ✅ | -| phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | ✅ | -| phpunit | [The PHP testing framework](https://phpunit.de/) | ❌ | ❌ | ✅ | ✅ | -| phpunit-10 | [The PHP testing framework (10.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | ✅ | -| phpunit-11 | [The PHP testing framework (11.x version)](https://phpunit.de/) | ❌ | ✅ | ✅ | ✅ | -| phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | ✅ | -| phpunit-9 | [The PHP testing framework (9.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | ✅ | -| pint | [Opinionated PHP code style fixer for Laravel](https://github.com/laravel/pint) | ✅ | ✅ | ✅ | ✅ | -| psalm | [Finds errors in PHP applications](https://psalm.dev/) | ✅ | ✅ | ✅ | ✅ | -| psalm-plugin-doctrine | [Stubs to let Psalm understand Doctrine better](https://github.com/weirdan/doctrine-psalm-plugin) | ✅ | ✅ | ✅ | ✅ | -| psalm-plugin-phpunit | [Psalm plugin for PHPUnit](https://github.com/psalm/psalm-plugin-phpunit) | ✅ | ✅ | ✅ | ✅ | -| psalm-plugin-symfony | [Psalm Plugin for Symfony](https://github.com/psalm/psalm-plugin-symfony) | ✅ | ✅ | ✅ | ✅ | -| psecio-parse | [Scans code for potential security-related issues](https://github.com/psecio/parse) | ✅ | ✅ | ✅ | ✅ | -| rector | [Tool for instant code upgrades and refactoring](https://github.com/rectorphp/rector) | ✅ | ✅ | ✅ | ✅ | -| roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ✅ | ✅ | ❌ | -| simple-phpunit | [Provides utilities to report legacy tests and usage of deprecated code](https://symfony.com/doc/current/components/phpunit_bridge.html) | ✅ | ✅ | ✅ | ✅ | -| twig-cs-fixer | [Automatically corrects twig files following the official coding standard rules](https://github.com/VincentLanglet/Twig-CS-Fixer) | ✅ | ✅ | ✅ | ✅ | -| twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | ✅ | ✅ | -| twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | ✅ | ✅ | -| twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | ✅ | ✅ | -| yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ❌ | ✅ | ✅ | ✅ | +| Name | Description | PHP 8.2 | PHP 8.3 | PHP 8.4 | +| :--- | :---------- | :------ | :------ | :------ | +| behat | [Helps to test business expectations](http://behat.org/) | ✅ | ✅ | ✅ | +| box | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ✅ | ✅ | ✅ | +| box-3 | [Fast, zero config application bundler with PHARs](https://github.com/humbug/box) | ❌ | ✅ | ✅ | +| 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/) | ✅ | ✅ | ✅ | +| composer-bin-plugin | [Composer plugin to install bin vendors in isolated locations](https://github.com/bamarni/composer-bin-plugin) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| composer-unused | [Show unused packages by scanning your code](https://github.com/icanhazstring/composer-unused) | ✅ | ✅ | ✅ | +| cyclonedx-php-composer | [Composer plugin to create Software-Bill-of-Materials (SBOM) in CycloneDX format](https://github.com/CycloneDX/cyclonedx-php-composer) | ✅ | ✅ | ✅ | +| dephpend | [Detect flaws in your architecture](https://dephpend.com/) | ✅ | ✅ | ✅ | +| deprecation-detector | [Finds usages of deprecated code](https://github.com/sensiolabs-de/deprecation-detector) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| 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/) | ✅ | ✅ | ❌ | +| 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) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| phpbench | [PHP Benchmarking framework](https://github.com/phpbench/phpbench) | ✅ | ✅ | ✅ | +| phpca | [Finds usage of non-built-in extensions](https://github.com/wapmorgan/PhpCodeAnalyzer) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| phpdd | [Finds usage of deprecated features](http://wapmorgan.github.io/PhpDeprecationDetector) | ✅ | ✅ | ✅ | +| phpDocumentor | [Documentation generator](https://www.phpdoc.org/) | ✅ | ✅ | ✅ | +| phpinsights | [Analyses code quality, style, architecture and complexity](https://phpinsights.com/) | ✅ | ✅ | ✅ | +| phplint | [Lints php files in parallel](https://github.com/overtrue/phplint) | ✅ | ✅ | ✅ | +| phploc | [A tool for quickly measuring the size of a PHP project](https://github.com/sebastianbergmann/phploc) | ✅ | ✅ | ✅ | +| 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/) | ✅ | ✅ | ❌ | +| 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) | ✅ | ✅ | ✅ | +| 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) | ✅ | ✅ | ✅ | +| phpstan-symfony | [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony) | ✅ | ✅ | ✅ | +| phpstan-webmozart-assert | [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert) | ✅ | ✅ | ✅ | +| phpunit | [The PHP testing framework](https://phpunit.de/) | ❌ | ✅ | ✅ | +| phpunit-10 | [The PHP testing framework (10.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | +| phpunit-11 | [The PHP testing framework (11.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | +| phpunit-8 | [The PHP testing framework (8.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | +| phpunit-9 | [The PHP testing framework (9.x version)](https://phpunit.de/) | ✅ | ✅ | ✅ | +| pint | [Opinionated PHP code style fixer for Laravel](https://github.com/laravel/pint) | ✅ | ✅ | ✅ | +| psalm | [Finds errors in PHP applications](https://psalm.dev/) | ✅ | ✅ | ✅ | +| psalm-plugin-doctrine | [Stubs to let Psalm understand Doctrine better](https://github.com/weirdan/doctrine-psalm-plugin) | ✅ | ✅ | ✅ | +| psalm-plugin-phpunit | [Psalm plugin for PHPUnit](https://github.com/psalm/psalm-plugin-phpunit) | ✅ | ✅ | ✅ | +| psalm-plugin-symfony | [Psalm Plugin for Symfony](https://github.com/psalm/psalm-plugin-symfony) | ✅ | ✅ | ✅ | +| psecio-parse | [Scans code for potential security-related issues](https://github.com/psecio/parse) | ✅ | ✅ | ✅ | +| rector | [Tool for instant code upgrades and refactoring](https://github.com/rectorphp/rector) | ✅ | ✅ | ✅ | +| roave-backward-compatibility-check | [Tool to compare two revisions of a class API to check for BC breaks](https://github.com/Roave/BackwardCompatibilityCheck) | ✅ | ✅ | ❌ | +| simple-phpunit | [Provides utilities to report legacy tests and usage of deprecated code](https://symfony.com/doc/current/components/phpunit_bridge.html) | ✅ | ✅ | ✅ | +| twig-cs-fixer | [Automatically corrects twig files following the official coding standard rules](https://github.com/VincentLanglet/Twig-CS-Fixer) | ✅ | ✅ | ✅ | +| twig-lint | [Standalone cli twig 1.X linter](https://github.com/asm89/twig-lint) | ✅ | ✅ | ✅ | +| twig-linter | [Standalone cli twig 3.X linter](https://github.com/sserbin/twig-linter) | ✅ | ✅ | ✅ | +| twigcs | [The missing checkstyle for twig!](https://github.com/friendsoftwig/twigcs) | ✅ | ✅ | ✅ | +| yaml-lint | [Compact command line utility for checking YAML file syntax](https://github.com/j13k/yaml-lint) | ✅ | ✅ | ✅ | ### Removed tools @@ -244,7 +244,7 @@ Tools can be tagged in order to enable grouping and filtering them. The tags below have a special meaning: * `pre-installation` - these tools will be installed before any other tools. -* `exclude-php:8.1`, `exclude-php:8.2` etc - used to exclude installation on the specified php version. +* `exclude-php:8.2`, `exclude-php:8.3` etc - used to exclude installation on the specified php version. ## Contributing diff --git a/bin/devkit.php b/bin/devkit.php index 33523547..47363c4e 100755 --- a/bin/devkit.php +++ b/bin/devkit.php @@ -73,17 +73,16 @@ protected function execute(InputInterface $input, OutputInterface $output) $readmePath = $input->getOption('readme'); $tools = $this->loadTools($jsonPath); - $toolsList = '| Name | Description | PHP 8.1 | PHP 8.2 | PHP 8.3 | PHP 8.4 |' . PHP_EOL; - $toolsList .= '| :--- | :---------- | :------ | :------ | :------ | :------ |' . PHP_EOL; + $toolsList = '| Name | Description | PHP 8.2 | PHP 8.3 | PHP 8.4 |' . PHP_EOL; + $toolsList .= '| :--- | :---------- | :------ | :------ | :------ |' . PHP_EOL; $toolsList .= $tools->sort(function (Tool $left, Tool $right) { return strcasecmp($left->name(), $right->name()); })->reduce('', function ($acc, Tool $tool) { - return $acc . sprintf('| %s | [%s](%s) | %s | %s | %s | %s |', + return $acc . sprintf('| %s | [%s](%s) | %s | %s | %s |', $tool->name(), $tool->summary(), $tool->website(), - in_array('exclude-php:8.1', $tool->tags(), true) ? '❌' : '✅', in_array('exclude-php:8.2', $tool->tags(), true) ? '❌' : '✅', in_array('exclude-php:8.3', $tool->tags(), true) ? '❌' : '✅', in_array('exclude-php:8.4', $tool->tags(), true) ? '❌' : '✅', diff --git a/composer.json b/composer.json index 98a45a1f..bb2808b8 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Helps to discover and install tools", "type": "project", "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", + "php": "~8.2.0 || ~8.3.0 || ~8.4.0", "symfony/console": "^5.4.31 || ^6.3", "psr/container": "^2.0" }, diff --git a/resources/composer.json b/resources/composer.json index 24b1923a..0b41c8aa 100644 --- a/resources/composer.json +++ b/resources/composer.json @@ -41,7 +41,7 @@ } }, "test": "composer-require-checker -V", - "tags": ["composer", "exclude-php:8.1"] + "tags": ["composer"] }, { "name": "composer-require-checker-3", diff --git a/resources/linting.json b/resources/linting.json index b5f7465b..9a87b64d 100644 --- a/resources/linting.json +++ b/resources/linting.json @@ -52,7 +52,7 @@ } }, "test": "yaml-lint --version", - "tags": ["linting", "exclude-php:8.1"] + "tags": ["linting"] }, { "name": "twig-linter", diff --git a/resources/pre-installation.json b/resources/pre-installation.json index 23520650..dc785a16 100644 --- a/resources/pre-installation.json +++ b/resources/pre-installation.json @@ -59,7 +59,7 @@ } }, "test": "box list", - "tags": ["exclude-php:8.1", "pre-installation"] + "tags": ["pre-installation"] }, { "name": "box-3", diff --git a/resources/test.json b/resources/test.json index ffdb1c72..9ee36f04 100644 --- a/resources/test.json +++ b/resources/test.json @@ -39,7 +39,7 @@ } }, "test": "infection --version", - "tags": ["featured", "test", "exclude-php:8.1"] + "tags": ["featured", "test"] }, { "name": "paratest", @@ -84,7 +84,7 @@ } }, "test": "phpcov -v", - "tags": ["test", "exclude-php:8.1"] + "tags": ["test"] }, { "name": "php-fuzzer", @@ -124,7 +124,7 @@ } }, "test": "phpunit --version", - "tags": ["featured", "test", "exclude-php:8.1", "exclude-php:8.2"] + "tags": ["featured", "test", "exclude-php:8.2"] }, { "name": "phpunit-11", @@ -138,7 +138,7 @@ } }, "test": "phpunit-11 --version", - "tags": ["test", "exclude-php:8.1"] + "tags": ["test"] }, { "name": "phpunit-10", From e1ac4641700a272f922cd55e45b49561ab2e1141 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 24 Feb 2025 10:05:18 +0000 Subject: [PATCH 177/206] Update the required minimum Symfony version --- composer.json | 2 +- src/Cli/Application.php | 2 +- src/Cli/Command/InstallCommand.php | 2 +- src/Cli/Command/ListCommand.php | 2 +- src/Cli/Command/TestCommand.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index bb2808b8..9374722b 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "type": "project", "require": { "php": "~8.2.0 || ~8.3.0 || ~8.4.0", - "symfony/console": "^5.4.31 || ^6.3", + "symfony/console": "^6.4.18 || ^7.2", "psr/container": "^2.0" }, "require-dev": { diff --git a/src/Cli/Application.php b/src/Cli/Application.php index 8fd96087..7f254328 100644 --- a/src/Cli/Application.php +++ b/src/Cli/Application.php @@ -27,7 +27,7 @@ public function __construct(string $version, ServiceContainer $serviceContainer) $this->setCommandLoader($this->createCommandLoader($serviceContainer)); } - public function doRun(InputInterface $input, OutputInterface $output) + public function doRun(InputInterface $input, OutputInterface $output): int { $this->serviceContainer->set(InputInterface::class, $input); $this->serviceContainer->set(OutputInterface::class, $output); diff --git a/src/Cli/Command/InstallCommand.php b/src/Cli/Command/InstallCommand.php index 18630365..f6c53fc9 100644 --- a/src/Cli/Command/InstallCommand.php +++ b/src/Cli/Command/InstallCommand.php @@ -37,7 +37,7 @@ protected function configure() $this->addOption('tag', 't', InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, 'Tool tags to filter by', $this->defaultTag()); } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { return $this->runner->run(\call_user_func($this->useCase, new Filter($input->getOption('exclude-tag'), $input->getOption('tag')))); } diff --git a/src/Cli/Command/ListCommand.php b/src/Cli/Command/ListCommand.php index 9ee4f9ab..7d3ea273 100644 --- a/src/Cli/Command/ListCommand.php +++ b/src/Cli/Command/ListCommand.php @@ -34,7 +34,7 @@ protected function configure() $this->addOption('tag', 't', InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, 'Tool tags to filter by', $this->defaultTag()); } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $tools = \call_user_func($this->listTools, new Filter($input->getOption('exclude-tag'), $input->getOption('tag'))); diff --git a/src/Cli/Command/TestCommand.php b/src/Cli/Command/TestCommand.php index 5192b834..1443a65a 100644 --- a/src/Cli/Command/TestCommand.php +++ b/src/Cli/Command/TestCommand.php @@ -37,7 +37,7 @@ protected function configure() $this->addOption('tag', 't', InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, 'Tool tags to filter by', $this->defaultTag()); } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { return $this->runner->run(\call_user_func($this->useCase, new Filter($input->getOption('exclude-tag'), $input->getOption('tag')))); } From a8489482e13c1f980e36faee6dff0dbbe1cfac8f Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 24 Feb 2025 15:08:47 +0000 Subject: [PATCH 178/206] Update PHPUnit (10.4 -> 11.5.9) --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 9374722b..c0673cf3 100644 --- a/composer.json +++ b/composer.json @@ -8,8 +8,8 @@ "psr/container": "^2.0" }, "require-dev": { - "phpunit/phpunit": "^10.4", - "zalas/phpunit-globals": "^3.2", + "phpunit/phpunit": "^11.5.9", + "zalas/phpunit-globals": "^3.5", "infection/infection": "^0.29", "deptrac/deptrac": "^3.0" }, From c3a5bb74287bbe12e4a3c4d6eb4c3991c42cb9c2 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 24 Feb 2025 15:10:39 +0000 Subject: [PATCH 179/206] Update devkit to be compatible with latest Symfony --- bin/devkit.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/devkit.php b/bin/devkit.php index 47363c4e..fac9276b 100755 --- a/bin/devkit.php +++ b/bin/devkit.php @@ -67,7 +67,7 @@ protected function configure() $this->addOption('readme', null, InputOption::VALUE_REQUIRED, 'Path to the readme file', __DIR__ . '/../README.md'); } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $jsonPath = $input->getOption('tools'); $readmePath = $input->getOption('readme'); @@ -112,7 +112,7 @@ protected function configure() $this->addOption('tools', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Path(s) to the list of tools. Can also be set with TOOLBOX_JSON environment variable.', $this->toolsJsonDefault()); } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { foreach ($input->getOption('tools') as $jsonPath) { $result = $this->updatePhars($jsonPath, $output); @@ -199,7 +199,7 @@ protected function configure() $this->addOption('tools', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Path(s) to the list of tools. Can also be set with TOOLBOX_JSON environment variable.', $this->toolsJsonDefault()); } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $tools = $this->loadTools($input->getOption('tools'), new Filter(['pre-installation'], [])); From 66cfaf8ac5ed88793b4e7658905caa2a4cd11ed1 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 24 Feb 2025 17:31:26 +0000 Subject: [PATCH 180/206] Switch scrutinizr to PHP 8.4 --- .scrutinizer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 832cd37f..c011f442 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -3,7 +3,7 @@ inherit: true build: environment: php: - version: 8.2 + version: 8.4 variables: XDEBUG_MODE: coverage tests: From 9a52aced4dd0b7e4af95dea0ecbe0fafcb42b5f8 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 24 Feb 2025 17:33:44 +0000 Subject: [PATCH 181/206] Revert "Switch scrutinizr to PHP 8.4" This reverts commit 66cfaf8ac5ed88793b4e7658905caa2a4cd11ed1. --- .scrutinizer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index c011f442..832cd37f 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -3,7 +3,7 @@ inherit: true build: environment: php: - version: 8.4 + version: 8.2 variables: XDEBUG_MODE: coverage tests: From 0c98c78a8d0f99f241de6b148aeca2e1a105cee5 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 24 Feb 2025 17:43:56 +0000 Subject: [PATCH 182/206] Allow PHPUnit 12 --- composer.json | 4 ++-- tests/Cli/ServiceContainer/RunnerFactoryTest.php | 5 +---- tests/Cli/ServiceContainerTest.php | 5 ++--- tests/Json/Factory/BoxBuildCommandFactoryTest.php | 5 ++--- tests/Json/Factory/ComposerBinPluginCommandFactoryTest.php | 5 ++--- tests/Json/Factory/ComposerInstallCommandFactoryTest.php | 7 +++---- tests/Json/Factory/FileDownloadCommandFactoryTest.php | 5 ++--- tests/Json/Factory/PharDownloadCommandFactoryTest.php | 5 ++--- tests/Json/Factory/PhiveInstallCommandFactoryTest.php | 5 ++--- tests/Json/Factory/ToolFactoryTest.php | 5 ++--- 10 files changed, 20 insertions(+), 31 deletions(-) diff --git a/composer.json b/composer.json index c0673cf3..04fbb107 100644 --- a/composer.json +++ b/composer.json @@ -8,8 +8,8 @@ "psr/container": "^2.0" }, "require-dev": { - "phpunit/phpunit": "^11.5.9", - "zalas/phpunit-globals": "^3.5", + "phpunit/phpunit": "^11.5.9 || ^12.0", + "zalas/phpunit-globals": "^4.0", "infection/infection": "^0.29", "deptrac/deptrac": "^3.0" }, diff --git a/tests/Cli/ServiceContainer/RunnerFactoryTest.php b/tests/Cli/ServiceContainer/RunnerFactoryTest.php index 1d2ea6e7..af3c75ef 100644 --- a/tests/Cli/ServiceContainer/RunnerFactoryTest.php +++ b/tests/Cli/ServiceContainer/RunnerFactoryTest.php @@ -2,7 +2,6 @@ namespace Zalas\Toolbox\Tests\Cli\ServiceContainer; -use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Container\ContainerExceptionInterface; @@ -43,7 +42,7 @@ class RunnerFactoryTest extends TestCase protected function setUp(): void { $this->input = $this->givenInput([]); - $this->output = $this->createStub(OutputInterface::class); + $this->output = $this->createMock(OutputInterface::class); $this->container = new class([ InputInterface::class => &$this->input, OutputInterface::class => &$this->output, ]) implements ContainerInterface { @@ -90,7 +89,6 @@ public function test_it_creates_the_parametrised_runner_if_target_dir_option_is_ $this->assertInstanceOf(ParametrisedRunner::class, $runner); } - #[DoesNotPerformAssertions] public function test_the_parametrised_runner_includes_the_target_dir_parameter() { $this->givenInput(['--target-dir' => '/usr/local/bin', '--dry-run' => true]); @@ -116,7 +114,6 @@ public function test_it_throws_an_exception_if_target_dir_does_not_exist() $this->runnerFactory->createRunner(); } - #[DoesNotPerformAssertions] public function test_it_uses_the_real_path_as_target_dir() { $this->givenInput(['--target-dir' => __DIR__.'/../../../bin', '--dry-run' => true]); diff --git a/tests/Cli/ServiceContainerTest.php b/tests/Cli/ServiceContainerTest.php index 7bda293f..56260c52 100644 --- a/tests/Cli/ServiceContainerTest.php +++ b/tests/Cli/ServiceContainerTest.php @@ -2,6 +2,7 @@ namespace Zalas\Toolbox\Tests\Cli; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerInterface; @@ -39,9 +40,7 @@ public function test_it_returns_false_if_service_is_not_registered() $this->assertFalse($this->container->has('foo')); } - /** - * @dataProvider provideApplicationServices - */ + #[DataProvider('provideApplicationServices')] public function test_it_creates_application_services(string $serviceId, string $expectedType) { $this->assertTrue($this->container->has($serviceId)); diff --git a/tests/Json/Factory/BoxBuildCommandFactoryTest.php b/tests/Json/Factory/BoxBuildCommandFactoryTest.php index df1170be..5f1f9c96 100644 --- a/tests/Json/Factory/BoxBuildCommandFactoryTest.php +++ b/tests/Json/Factory/BoxBuildCommandFactoryTest.php @@ -2,6 +2,7 @@ namespace Zalas\Toolbox\Tests\Json\Factory; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Zalas\Toolbox\Json\Factory\BoxBuildCommandFactory; use Zalas\Toolbox\Tool\Command\BoxBuildCommand; @@ -40,9 +41,7 @@ public function test_the_version_is_not_required() $this->assertInstanceOf(BoxBuildCommand::class, $command); } - /** - * @dataProvider provideRequiredProperties - */ + #[DataProvider('provideRequiredProperties')] public function test_it_complains_if_any_of_required_properties_is_missing(string $property) { $this->expectException(\InvalidArgumentException::class); diff --git a/tests/Json/Factory/ComposerBinPluginCommandFactoryTest.php b/tests/Json/Factory/ComposerBinPluginCommandFactoryTest.php index b214af01..fdee673a 100644 --- a/tests/Json/Factory/ComposerBinPluginCommandFactoryTest.php +++ b/tests/Json/Factory/ComposerBinPluginCommandFactoryTest.php @@ -2,6 +2,7 @@ namespace Zalas\Toolbox\Tests\Json\Factory; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Zalas\Toolbox\Json\Factory\ComposerBinPluginCommandFactory; use Zalas\Toolbox\Tool\Collection; @@ -40,9 +41,7 @@ public function test_it_creates_a_command_with_links_in_tools() ); } - /** - * @dataProvider provideRequiredProperties - */ + #[DataProvider('provideRequiredProperties')] public function test_it_complains_if_any_of_required_properties_is_missing(string $property) { $this->expectException(\InvalidArgumentException::class); diff --git a/tests/Json/Factory/ComposerInstallCommandFactoryTest.php b/tests/Json/Factory/ComposerInstallCommandFactoryTest.php index c3fd5959..40470d62 100644 --- a/tests/Json/Factory/ComposerInstallCommandFactoryTest.php +++ b/tests/Json/Factory/ComposerInstallCommandFactoryTest.php @@ -2,6 +2,7 @@ namespace Zalas\Toolbox\Tests\Json\Factory; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Zalas\Toolbox\Json\Factory\ComposerInstallCommandFactory; use Zalas\Toolbox\Tool\Command\ComposerInstallCommand; @@ -24,9 +25,7 @@ public function test_it_creates_a_command() $this->assertMatchesRegularExpression('#git checkout '.self::VERSION.'#', (string) $command); } - /** - * @dataProvider provideRequiredProperties - */ + #[DataProvider('provideRequiredProperties')] public function test_it_complains_if_a_required_property_is_missing(string $property) { $this->expectException(\InvalidArgumentException::class); @@ -41,7 +40,7 @@ public function test_it_complains_if_a_required_property_is_missing(string $prop ComposerInstallCommandFactory::import($properties); } - public static function provideRequiredProperties() + public static function provideRequiredProperties(): \Generator { yield ['repository']; yield ['target-dir']; diff --git a/tests/Json/Factory/FileDownloadCommandFactoryTest.php b/tests/Json/Factory/FileDownloadCommandFactoryTest.php index f17b0aa3..6aa492c0 100644 --- a/tests/Json/Factory/FileDownloadCommandFactoryTest.php +++ b/tests/Json/Factory/FileDownloadCommandFactoryTest.php @@ -2,6 +2,7 @@ namespace Zalas\Toolbox\Tests\Json\Factory; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Zalas\Toolbox\Json\Factory\FileDownloadCommandFactory; use Zalas\Toolbox\Tool\Command\FileDownloadCommand; @@ -21,9 +22,7 @@ public function test_it_creates_a_command() $this->assertInstanceOf(FileDownloadCommand::class, $command); } - /** - * @dataProvider provideRequiredProperties - */ + #[DataProvider('provideRequiredProperties')] public function test_it_complains_if_any_of_required_properties_is_missing(string $property) { $this->expectException(\InvalidArgumentException::class); diff --git a/tests/Json/Factory/PharDownloadCommandFactoryTest.php b/tests/Json/Factory/PharDownloadCommandFactoryTest.php index 1664278d..6b74a461 100644 --- a/tests/Json/Factory/PharDownloadCommandFactoryTest.php +++ b/tests/Json/Factory/PharDownloadCommandFactoryTest.php @@ -2,6 +2,7 @@ namespace Zalas\Toolbox\Tests\Json\Factory; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Zalas\Toolbox\Json\Factory\PharDownloadCommandFactory; use Zalas\Toolbox\Tool\Command\PharDownloadCommand; @@ -21,9 +22,7 @@ public function test_it_creates_a_command() $this->assertInstanceOf(PharDownloadCommand::class, $command); } - /** - * @dataProvider provideRequiredProperties - */ + #[DataProvider('provideRequiredProperties')] public function test_it_complains_if_any_of_required_properties_is_missing(string $property) { $this->expectException(\InvalidArgumentException::class); diff --git a/tests/Json/Factory/PhiveInstallCommandFactoryTest.php b/tests/Json/Factory/PhiveInstallCommandFactoryTest.php index b8d406a0..5f48da00 100644 --- a/tests/Json/Factory/PhiveInstallCommandFactoryTest.php +++ b/tests/Json/Factory/PhiveInstallCommandFactoryTest.php @@ -2,6 +2,7 @@ namespace Zalas\Toolbox\Tests\Json\Factory; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Zalas\Toolbox\Json\Factory\PhiveInstallCommandFactory; use Zalas\Toolbox\Tool\Command\PhiveInstallCommand; @@ -24,9 +25,7 @@ public function test_it_creates_a_command() $this->assertStringNotContainsString('unsigned', (string)$command); } - /** - * @dataProvider provideRequiredProperties - */ + #[DataProvider('provideRequiredProperties')] public function test_it_complains_if_any_of_required_properties_is_missing(string $property) { $this->expectException(\InvalidArgumentException::class); diff --git a/tests/Json/Factory/ToolFactoryTest.php b/tests/Json/Factory/ToolFactoryTest.php index bbf0b9b2..b437579a 100644 --- a/tests/Json/Factory/ToolFactoryTest.php +++ b/tests/Json/Factory/ToolFactoryTest.php @@ -2,6 +2,7 @@ namespace Zalas\Toolbox\Tests\Json\Factory; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Zalas\Toolbox\Json\Factory\ToolFactory; use Zalas\Toolbox\Tool\Command; @@ -195,9 +196,7 @@ public function test_it_complains_if_the_command_is_empty() ToolFactory::import($this->definition(['command' => []])); } - /** - * @dataProvider provideRequiredProperties - */ + #[DataProvider('provideRequiredProperties')] public function test_it_complains_if_any_of_required_properties_is_missing(string $property) { $this->expectException(\InvalidArgumentException::class); From b22a3e993afb50c5197365a8d23dab8b0fc5838f Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 24 Feb 2025 21:38:06 +0000 Subject: [PATCH 183/206] Define property types --- bin/devkit.php | 15 +++------- src/Cli/Application.php | 5 +++- src/Cli/Command/InstallCommand.php | 6 ++-- src/Cli/Command/ListCommand.php | 4 +-- src/Cli/Command/TestCommand.php | 6 ++-- src/Cli/Runner/DryRunner.php | 2 +- src/Cli/ServiceContainer.php | 28 +++++++++++++++-- src/Cli/ServiceContainer/LazyRunner.php | 14 +++++++-- src/Cli/ServiceContainer/RunnerFactory.php | 20 +++++++++++-- src/Json/Factory/Assert.php | 2 +- src/Json/JsonTools.php | 4 +-- src/Runner/ParametrisedRunner.php | 8 ++--- src/Tool/Collection.php | 5 +--- src/Tool/Command/BoxBuildCommand.php | 10 +++---- src/Tool/Command/ComposerBinPluginCommand.php | 6 ++-- .../Command/ComposerBinPluginLinkCommand.php | 6 ++-- .../Command/ComposerGlobalInstallCommand.php | 2 +- .../ComposerGlobalMultiInstallCommand.php | 2 +- src/Tool/Command/ComposerInstallCommand.php | 6 ++-- src/Tool/Command/FileDownloadCommand.php | 4 +-- src/Tool/Command/MultiStepCommand.php | 4 +-- .../OptimisedComposerBinPluginCommand.php | 2 +- src/Tool/Command/PharDownloadCommand.php | 4 +-- src/Tool/Command/PhiveInstallCommand.php | 6 ++-- src/Tool/Command/ShCommand.php | 2 +- src/Tool/Command/TestCommand.php | 4 +-- src/Tool/Filter.php | 4 +-- src/Tool/Tool.php | 12 ++++---- src/Tool/Tools.php | 3 +- src/UseCase/InstallTools.php | 6 ++-- src/UseCase/ListTools.php | 9 +----- src/UseCase/TestTools.php | 2 +- tests/Cli/ApplicationTest.php | 15 ++-------- tests/Cli/Command/InstallCommandTest.php | 12 ++------ tests/Cli/Command/ListCommandTest.php | 5 +--- tests/Cli/Command/TestCommandTest.php | 12 ++------ tests/Cli/Command/ToolboxCommandTestCase.php | 7 ++--- tests/Cli/Runner/DryRunnerTest.php | 12 ++------ tests/Cli/ServiceContainer/LazyRunnerTest.php | 12 ++------ .../ServiceContainer/RunnerFactoryTest.php | 30 +++++-------------- tests/Cli/ServiceContainerTest.php | 7 ++--- tests/Runner/ParametrisedRunnerTest.php | 12 ++------ tests/Tool/CollectionTest.php | 7 +++-- .../Command/ComposerBinPluginCommandTest.php | 5 +--- .../ComposerBinPluginLinkCommandTest.php | 5 +--- .../ComposerGlobalInstallCommandTest.php | 5 +--- .../Tool/Command/FileDownloadCommandTest.php | 5 +--- .../Tool/Command/PharDownloadCommandTest.php | 2 +- .../Tool/Command/PhiveInstallCommandTest.php | 2 +- tests/UseCase/InstallToolsTest.php | 12 ++------ 50 files changed, 168 insertions(+), 212 deletions(-) diff --git a/bin/devkit.php b/bin/devkit.php index fac9276b..8201017e 100755 --- a/bin/devkit.php +++ b/bin/devkit.php @@ -42,9 +42,6 @@ private function toolsJsonDefault(): array ]; } - /** - * @return Collection|Tool[] - */ private function loadTools($jsonPath, ?Filter $filter = null): Collection { return (new JsonTools(function () use ($jsonPath) { @@ -59,7 +56,7 @@ private function loadTools($jsonPath, ?Filter $filter = null): Collection { use Tools; - protected function configure() + protected function configure(): void { $this->setName('update:readme'); $this->setDescription('Updates README.md with latest list of available tools'); @@ -105,7 +102,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int { use Tools; - protected function configure() + protected function configure(): void { $this->setName('update:phars'); $this->setDescription('Attempts to update phar links to latest versions'); @@ -125,7 +122,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } - private function updatePhars(string $jsonPath, OutputInterface $output) + private function updatePhars(string $jsonPath, OutputInterface $output): int { $phars = $this->findLatestPhars($jsonPath); @@ -192,7 +189,7 @@ function (string $phar) { { use Tools; - protected function configure() + protected function configure(): void { $this->setName('generate:html'); $this->setDescription('Generates an html list of available tools'); @@ -241,10 +238,6 @@ private function toolToHtml(): \Closure }; } - /** - * @param Collection|string[] $toolsHtml - * @return string - */ private function renderPage(Collection $toolsHtml): string { $template = <<<'TEMPLATE' diff --git a/src/Cli/Application.php b/src/Cli/Application.php index 7f254328..8078230e 100644 --- a/src/Cli/Application.php +++ b/src/Cli/Application.php @@ -16,7 +16,7 @@ final class Application extends CliApplication { - private $serviceContainer; + private ServiceContainer $serviceContainer; public function __construct(string $version, ServiceContainer $serviceContainer) { @@ -27,6 +27,9 @@ public function __construct(string $version, ServiceContainer $serviceContainer) $this->setCommandLoader($this->createCommandLoader($serviceContainer)); } + /** + * @throws \Throwable + */ public function doRun(InputInterface $input, OutputInterface $output): int { $this->serviceContainer->set(InputInterface::class, $input); diff --git a/src/Cli/Command/InstallCommand.php b/src/Cli/Command/InstallCommand.php index f6c53fc9..6c5ab9e7 100644 --- a/src/Cli/Command/InstallCommand.php +++ b/src/Cli/Command/InstallCommand.php @@ -17,8 +17,8 @@ final class InstallCommand extends Command public const NAME = 'install'; - private $useCase; - private $runner; + private InstallTools $useCase; + private Runner $runner; public function __construct(InstallTools $useCase, Runner $runner) { @@ -28,7 +28,7 @@ public function __construct(InstallTools $useCase, Runner $runner) $this->runner = $runner; } - protected function configure() + protected function configure(): void { $this->setDescription('Installs tools'); $this->addOption('dry-run', null, InputOption::VALUE_NONE, 'Output the command without executing it'); diff --git a/src/Cli/Command/ListCommand.php b/src/Cli/Command/ListCommand.php index 7d3ea273..d29a35aa 100644 --- a/src/Cli/Command/ListCommand.php +++ b/src/Cli/Command/ListCommand.php @@ -18,7 +18,7 @@ final class ListCommand extends Command public const NAME = 'list-tools'; - private $listTools; + private ListTools $listTools; public function __construct(ListTools $listTools) { @@ -27,7 +27,7 @@ public function __construct(ListTools $listTools) $this->listTools = $listTools; } - protected function configure() + protected function configure(): void { $this->setDescription('Lists available tools'); $this->addOption('exclude-tag', 'e', InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, 'Tool tags to exclude', $this->defaultExcludeTag()); diff --git a/src/Cli/Command/TestCommand.php b/src/Cli/Command/TestCommand.php index 1443a65a..71169915 100644 --- a/src/Cli/Command/TestCommand.php +++ b/src/Cli/Command/TestCommand.php @@ -17,8 +17,8 @@ final class TestCommand extends Command public const NAME = 'test'; - private $useCase; - private $runner; + private TestTools $useCase; + private Runner $runner; public function __construct(TestTools $useCase, Runner $runner) { @@ -28,7 +28,7 @@ public function __construct(TestTools $useCase, Runner $runner) $this->runner = $runner; } - protected function configure() + protected function configure(): void { $this->setDescription('Runs basic tests to verify tools are installed'); $this->addOption('dry-run', null, InputOption::VALUE_NONE, 'Output the command without executing it'); diff --git a/src/Cli/Runner/DryRunner.php b/src/Cli/Runner/DryRunner.php index 244ca609..109fb508 100644 --- a/src/Cli/Runner/DryRunner.php +++ b/src/Cli/Runner/DryRunner.php @@ -8,7 +8,7 @@ final class DryRunner implements Runner { - private $output; + private OutputInterface $output; public function __construct(OutputInterface $output) { diff --git a/src/Cli/ServiceContainer.php b/src/Cli/ServiceContainer.php index 11996ec7..655005fd 100644 --- a/src/Cli/ServiceContainer.php +++ b/src/Cli/ServiceContainer.php @@ -22,7 +22,7 @@ class ServiceContainer implements ContainerInterface { - private $services = [ + private array $services = [ InstallCommand::class => 'createInstallCommand', ListCommand::class => 'createListCommand', TestCommand::class => 'createTestCommand', @@ -33,7 +33,7 @@ class ServiceContainer implements ContainerInterface Tools::class => 'createTools', ]; - private $runtimeServices = [ + private array $runtimeServices = [ InputInterface::class => null, OutputInterface::class => null, ]; @@ -73,16 +73,28 @@ public function has(string $id): bool return isset($this->services[$id]) || isset($this->runtimeServices[$id]); } + /** + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ private function createInstallCommand(): InstallCommand { return new InstallCommand($this->get(InstallTools::class), $this->get(Runner::class)); } + /** + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ private function createListCommand(): ListCommand { return new ListCommand($this->get(ListTools::class)); } + /** + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ private function createTestCommand(): TestCommand { return new TestCommand($this->get(TestTools::class), $this->get(Runner::class)); @@ -93,16 +105,28 @@ private function createRunner(): Runner return new LazyRunner(new RunnerFactory($this)); } + /** + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ private function createInstallToolsUseCase(): InstallTools { return new InstallTools($this->get(Tools::class)); } + /** + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ private function createListToolsUseCase(): ListTools { return new ListTools($this->get(Tools::class)); } + /** + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ private function createTestToolsUseCase(): TestTools { return new TestTools($this->get(Tools::class)); diff --git a/src/Cli/ServiceContainer/LazyRunner.php b/src/Cli/ServiceContainer/LazyRunner.php index b2ce407a..8f49a285 100644 --- a/src/Cli/ServiceContainer/LazyRunner.php +++ b/src/Cli/ServiceContainer/LazyRunner.php @@ -2,25 +2,35 @@ namespace Zalas\Toolbox\Cli\ServiceContainer; +use Psr\Container\ContainerExceptionInterface; +use Psr\Container\NotFoundExceptionInterface; use Zalas\Toolbox\Runner\Runner; use Zalas\Toolbox\Tool\Command; final class LazyRunner implements Runner { - private $runner; + private ?Runner $runner = null; - private $factory; + private RunnerFactory $factory; public function __construct(RunnerFactory $factory) { $this->factory = $factory; } + /** + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ public function run(Command $command): int { return $this->runner()->run($command); } + /** + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ private function runner(): Runner { if (null === $this->runner) { diff --git a/src/Cli/ServiceContainer/RunnerFactory.php b/src/Cli/ServiceContainer/RunnerFactory.php index 225c2151..8056c420 100644 --- a/src/Cli/ServiceContainer/RunnerFactory.php +++ b/src/Cli/ServiceContainer/RunnerFactory.php @@ -4,6 +4,7 @@ use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerInterface; +use Psr\Container\NotFoundExceptionInterface; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Zalas\Toolbox\Cli\Runner\DryRunner; @@ -13,13 +14,17 @@ class RunnerFactory { - private $container; + private ContainerInterface $container; public function __construct(ContainerInterface $container) { $this->container = $container; } + /** + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ public function createRunner(): Runner { $runner = $this->createRealRunner(); @@ -32,9 +37,10 @@ public function createRunner(): Runner } /** - * @return DryRunner|PassthruRunner + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface */ - private function createRealRunner() + private function createRealRunner(): DryRunner|PassthruRunner { if ($this->container->get(InputInterface::class)->getOption('dry-run')) { return new DryRunner($this->container->get(OutputInterface::class)); @@ -43,6 +49,10 @@ private function createRealRunner() return new PassthruRunner(); } + /** + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ private function parameters(): array { if ($targetDir = $this->targetDir()) { @@ -52,6 +62,10 @@ private function parameters(): array return []; } + /** + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ private function targetDir(): ?string { if (!$this->container->get(InputInterface::class)->hasOption('target-dir')) { diff --git a/src/Json/Factory/Assert.php b/src/Json/Factory/Assert.php index 1ff0a1e6..105becfe 100644 --- a/src/Json/Factory/Assert.php +++ b/src/Json/Factory/Assert.php @@ -4,7 +4,7 @@ final class Assert { - public static function requireFields(array $fields, array $data, string $type) + public static function requireFields(array $fields, array $data, string $type): void { $missingFields = \array_filter($fields, function (string $field) use ($data) { return !isset($data[$field]); diff --git a/src/Json/JsonTools.php b/src/Json/JsonTools.php index c33f51fa..ad5ff1a4 100644 --- a/src/Json/JsonTools.php +++ b/src/Json/JsonTools.php @@ -7,7 +7,6 @@ use Zalas\Toolbox\Json\Factory\ToolFactory; use Zalas\Toolbox\Tool\Collection; use Zalas\Toolbox\Tool\Filter; -use Zalas\Toolbox\Tool\Tool; use Zalas\Toolbox\Tool\Tools; final class JsonTools implements Tools @@ -23,7 +22,8 @@ public function __construct(callable $resourceLocator) } /** - * @return Collection|Tool[] + * @param Filter $filter + * @return Collection */ public function all(Filter $filter): Collection { diff --git a/src/Runner/ParametrisedRunner.php b/src/Runner/ParametrisedRunner.php index 1f6ec049..b73a8f43 100644 --- a/src/Runner/ParametrisedRunner.php +++ b/src/Runner/ParametrisedRunner.php @@ -6,8 +6,8 @@ final class ParametrisedRunner implements Runner { - private $decoratedRunner; - private $parameters; + private Runner $decoratedRunner; + private array $parameters; public function __construct(Runner $decoratedRunner, array $parameters) { @@ -18,8 +18,8 @@ public function __construct(Runner $decoratedRunner, array $parameters) public function run(Command $command): int { return $this->decoratedRunner->run(new class($command, $this->parameters) implements Command { - private $command; - private $parameters; + private Command $command; + private array $parameters; public function __construct(Command $command, array $parameters) { diff --git a/src/Tool/Collection.php b/src/Tool/Collection.php index 0405da25..54939457 100644 --- a/src/Tool/Collection.php +++ b/src/Tool/Collection.php @@ -8,10 +8,7 @@ class Collection implements IteratorAggregate, Countable { - /** - * @var array - */ - private $elements; + private array $elements; private function __construct(array $elements) { diff --git a/src/Tool/Command/BoxBuildCommand.php b/src/Tool/Command/BoxBuildCommand.php index d2e0e8ce..547a4179 100644 --- a/src/Tool/Command/BoxBuildCommand.php +++ b/src/Tool/Command/BoxBuildCommand.php @@ -6,11 +6,11 @@ final class BoxBuildCommand implements Command { - private $repository; - private $phar; - private $bin; - private $workDir; - private $version; + private string $repository; + private string $phar; + private string $bin; + private string $workDir; + private ?string $version; public function __construct(string $repository, string $phar, string $bin, string $workDir, ?string $version = null) { diff --git a/src/Tool/Command/ComposerBinPluginCommand.php b/src/Tool/Command/ComposerBinPluginCommand.php index de66ceaa..0a2986c4 100644 --- a/src/Tool/Command/ComposerBinPluginCommand.php +++ b/src/Tool/Command/ComposerBinPluginCommand.php @@ -7,11 +7,11 @@ final class ComposerBinPluginCommand implements Command { - private $package; + private string $package; - private $namespace; + private string $namespace; - private $links; + private Collection $links; public function __construct(string $package, string $namespace, Collection $links) { diff --git a/src/Tool/Command/ComposerBinPluginLinkCommand.php b/src/Tool/Command/ComposerBinPluginLinkCommand.php index cb2cd99e..4587f526 100644 --- a/src/Tool/Command/ComposerBinPluginLinkCommand.php +++ b/src/Tool/Command/ComposerBinPluginLinkCommand.php @@ -6,9 +6,9 @@ final class ComposerBinPluginLinkCommand implements Command { - private $source; - private $target; - private $namespace; + private string $source; + private string $target; + private string $namespace; public function __construct(string $source, string $target, string $namespace) { diff --git a/src/Tool/Command/ComposerGlobalInstallCommand.php b/src/Tool/Command/ComposerGlobalInstallCommand.php index 1fef35c4..70f3bd7d 100644 --- a/src/Tool/Command/ComposerGlobalInstallCommand.php +++ b/src/Tool/Command/ComposerGlobalInstallCommand.php @@ -6,7 +6,7 @@ final class ComposerGlobalInstallCommand implements Command { - private $package; + private string $package; public function __construct(string $package) { diff --git a/src/Tool/Command/ComposerGlobalMultiInstallCommand.php b/src/Tool/Command/ComposerGlobalMultiInstallCommand.php index 1a2b1e70..7ee962f2 100644 --- a/src/Tool/Command/ComposerGlobalMultiInstallCommand.php +++ b/src/Tool/Command/ComposerGlobalMultiInstallCommand.php @@ -8,7 +8,7 @@ final class ComposerGlobalMultiInstallCommand implements Command { - private $commands; + private Collection $commands; public function __construct(Collection $commands) { diff --git a/src/Tool/Command/ComposerInstallCommand.php b/src/Tool/Command/ComposerInstallCommand.php index 519c04c7..74f0840c 100644 --- a/src/Tool/Command/ComposerInstallCommand.php +++ b/src/Tool/Command/ComposerInstallCommand.php @@ -6,9 +6,9 @@ final class ComposerInstallCommand implements Command { - private $repository; - private $targetDir; - private $version; + private string $repository; + private string $targetDir; + private ?string $version; public function __construct(string $repository, string $targetDir, ?string $version = null) { diff --git a/src/Tool/Command/FileDownloadCommand.php b/src/Tool/Command/FileDownloadCommand.php index 9b910f43..610b380b 100644 --- a/src/Tool/Command/FileDownloadCommand.php +++ b/src/Tool/Command/FileDownloadCommand.php @@ -6,8 +6,8 @@ final class FileDownloadCommand implements Command { - private $url; - private $file; + private string $url; + private string $file; public function __construct(string $url, string $file) { diff --git a/src/Tool/Command/MultiStepCommand.php b/src/Tool/Command/MultiStepCommand.php index 57631716..1ef8ddca 100644 --- a/src/Tool/Command/MultiStepCommand.php +++ b/src/Tool/Command/MultiStepCommand.php @@ -8,8 +8,8 @@ final class MultiStepCommand implements Command { - private $commands; - private $glue; + private Collection $commands; + private mixed $glue; public function __construct(Collection $commands, $glue = ' && ') { diff --git a/src/Tool/Command/OptimisedComposerBinPluginCommand.php b/src/Tool/Command/OptimisedComposerBinPluginCommand.php index e7d0c62a..78d23dc5 100644 --- a/src/Tool/Command/OptimisedComposerBinPluginCommand.php +++ b/src/Tool/Command/OptimisedComposerBinPluginCommand.php @@ -8,7 +8,7 @@ final class OptimisedComposerBinPluginCommand implements Command { - private $commands; + private Collection $commands; public function __construct(Collection $commands) { diff --git a/src/Tool/Command/PharDownloadCommand.php b/src/Tool/Command/PharDownloadCommand.php index 80375416..92a35323 100644 --- a/src/Tool/Command/PharDownloadCommand.php +++ b/src/Tool/Command/PharDownloadCommand.php @@ -6,8 +6,8 @@ final class PharDownloadCommand implements Command { - private $phar; - private $bin; + private string $phar; + private string $bin; public function __construct(string $phar, string $bin) { diff --git a/src/Tool/Command/PhiveInstallCommand.php b/src/Tool/Command/PhiveInstallCommand.php index 790cad0f..e0dbf448 100644 --- a/src/Tool/Command/PhiveInstallCommand.php +++ b/src/Tool/Command/PhiveInstallCommand.php @@ -6,9 +6,9 @@ final class PhiveInstallCommand implements Command { - private $alias; - private $bin; - private $sig; + private string $alias; + private string $bin; + private ?string $sig; public function __construct(string $alias, string $bin, ?string $sig = null) { diff --git a/src/Tool/Command/ShCommand.php b/src/Tool/Command/ShCommand.php index f2b058e5..0e8acc5d 100644 --- a/src/Tool/Command/ShCommand.php +++ b/src/Tool/Command/ShCommand.php @@ -6,7 +6,7 @@ final class ShCommand implements Command { - private $command; + private string $command; public function __construct(string $command) { diff --git a/src/Tool/Command/TestCommand.php b/src/Tool/Command/TestCommand.php index 2c539b9d..2b591cf5 100644 --- a/src/Tool/Command/TestCommand.php +++ b/src/Tool/Command/TestCommand.php @@ -6,8 +6,8 @@ final class TestCommand implements Command { - private $command; - private $name; + private string $command; + private string $name; public function __construct(string $command, string $name) { diff --git a/src/Tool/Filter.php b/src/Tool/Filter.php index afcbcb67..84341616 100644 --- a/src/Tool/Filter.php +++ b/src/Tool/Filter.php @@ -7,12 +7,12 @@ class Filter /** * @var string[] */ - private $excludedTags; + private array $excludedTags; /** * @var string[] */ - private $tags; + private array $tags; /** * @param string[] $excludedTags diff --git a/src/Tool/Tool.php b/src/Tool/Tool.php index d7033b3e..b1b019ae 100644 --- a/src/Tool/Tool.php +++ b/src/Tool/Tool.php @@ -4,12 +4,12 @@ class Tool { - private $name; - private $summary; - private $website; - private $command; - private $testCommand; - private $tags; + private string $name; + private string $summary; + private string $website; + private Command $command; + private Command $testCommand; + private array $tags; public function __construct(string $name, string $summary, string $website, array $tags, Command $command, Command $testCommand) { diff --git a/src/Tool/Tools.php b/src/Tool/Tools.php index 99b5d15f..eb38e49f 100644 --- a/src/Tool/Tools.php +++ b/src/Tool/Tools.php @@ -7,7 +7,8 @@ interface Tools { /** - * @return Collection|Tool[] + * @param Filter $filter + * @return Collection * @throws RuntimeException in case tools cannot be loaded */ public function all(Filter $filter): Collection; diff --git a/src/UseCase/InstallTools.php b/src/UseCase/InstallTools.php index 5b49fe64..4fdf7071 100644 --- a/src/UseCase/InstallTools.php +++ b/src/UseCase/InstallTools.php @@ -24,7 +24,7 @@ class InstallTools { public const PRE_INSTALLATION_TAG = 'pre-installation'; - private $tools; + private Tools $tools; public function __construct(Tools $tools) { @@ -60,7 +60,7 @@ private function commandFilter(Collection $commands): Closure }; } - private function installationCommands(Collection $tools) + private function installationCommands(Collection $tools): Collection { return $tools->filter(function (Tool $tool) { return \in_array(self::PRE_INSTALLATION_TAG, $tool->tags()); @@ -69,7 +69,7 @@ private function installationCommands(Collection $tools) }); } - private function toolCommands(Collection $tools) + private function toolCommands(Collection $tools): Collection { return $tools->filter(function (Tool $tool) { return !\in_array(self::PRE_INSTALLATION_TAG, $tool->tags()); diff --git a/src/UseCase/ListTools.php b/src/UseCase/ListTools.php index 04f1ab93..7f761c52 100644 --- a/src/UseCase/ListTools.php +++ b/src/UseCase/ListTools.php @@ -4,24 +4,17 @@ use Zalas\Toolbox\Tool\Collection; use Zalas\Toolbox\Tool\Filter; -use Zalas\Toolbox\Tool\Tool; use Zalas\Toolbox\Tool\Tools; class ListTools { - /** - * @var Tools - */ - private $tools; + private Tools $tools; public function __construct(Tools $tools) { $this->tools = $tools; } - /** - * @return Collection|Tool[] - */ public function __invoke(Filter $filter): Collection { return $this->tools->all($filter); diff --git a/src/UseCase/TestTools.php b/src/UseCase/TestTools.php index 4c255bbe..64681137 100644 --- a/src/UseCase/TestTools.php +++ b/src/UseCase/TestTools.php @@ -10,7 +10,7 @@ class TestTools { - private $tools; + private Tools $tools; public function __construct(Tools $tools) { diff --git a/tests/Cli/ApplicationTest.php b/tests/Cli/ApplicationTest.php index 7963c001..a880c033 100644 --- a/tests/Cli/ApplicationTest.php +++ b/tests/Cli/ApplicationTest.php @@ -2,7 +2,6 @@ namespace Zalas\Toolbox\Tests\Cli; -use PHPUnit\Framework\MockObject\Stub; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Application as CliApplication; use Symfony\Component\Console\Input\ArrayInput; @@ -18,20 +17,12 @@ class ApplicationTest extends TestCase { private const VERSION = 'test'; - /** - * @var Application - */ - private $app; - - /** - * @var ServiceContainer|Stub - */ - private $container; + private Application $app; protected function setUp(): void { - $this->container = $this->createStub(ServiceContainer::class); - $this->app = new Application(self::VERSION, $this->container); + $container = $this->createStub(ServiceContainer::class); + $this->app = new Application(self::VERSION, $container); } public function test_it_is_a_cli_application() diff --git a/tests/Cli/Command/InstallCommandTest.php b/tests/Cli/Command/InstallCommandTest.php index 227fa937..2081e852 100644 --- a/tests/Cli/Command/InstallCommandTest.php +++ b/tests/Cli/Command/InstallCommandTest.php @@ -15,15 +15,9 @@ class InstallCommandTest extends ToolboxCommandTestCase { protected const CLI_COMMAND_NAME = InstallCommand::NAME; - /** - * @var Runner|Stub - */ - private $runner; - - /** - * @var InstallTools|Stub - */ - private $useCase; + private Runner|Stub $runner; + + private InstallTools|Stub $useCase; protected function setUp(): void { diff --git a/tests/Cli/Command/ListCommandTest.php b/tests/Cli/Command/ListCommandTest.php index 1d7142de..8195b76c 100644 --- a/tests/Cli/Command/ListCommandTest.php +++ b/tests/Cli/Command/ListCommandTest.php @@ -16,10 +16,7 @@ class ListCommandTest extends ToolboxCommandTestCase { protected const CLI_COMMAND_NAME = ListCommand::NAME; - /** - * @var ListTools|Stub - */ - private $useCase; + private ListTools|Stub $useCase; protected function setUp(): void { diff --git a/tests/Cli/Command/TestCommandTest.php b/tests/Cli/Command/TestCommandTest.php index d2198692..1f8b5a2b 100644 --- a/tests/Cli/Command/TestCommandTest.php +++ b/tests/Cli/Command/TestCommandTest.php @@ -15,15 +15,9 @@ class TestCommandTest extends ToolboxCommandTestCase { protected const CLI_COMMAND_NAME = TestCommand::NAME; - /** - * @var Runner|Stub - */ - private $runner; - - /** - * @var TestTools|Stub - */ - private $useCase; + private Runner|Stub $runner; + + private TestTools|Stub $useCase; protected function setUp(): void { diff --git a/tests/Cli/Command/ToolboxCommandTestCase.php b/tests/Cli/Command/ToolboxCommandTestCase.php index b186549c..0b1b24cf 100644 --- a/tests/Cli/Command/ToolboxCommandTestCase.php +++ b/tests/Cli/Command/ToolboxCommandTestCase.php @@ -12,10 +12,7 @@ abstract class ToolboxCommandTestCase extends TestCase { protected const CLI_COMMAND_NAME = ''; - /** - * @var Application - */ - protected $app; + protected Application $app; protected function setUp(): void { @@ -48,7 +45,7 @@ protected function cliCommand(): Command private function createServiceContainer(): ServiceContainer { return new class($this->getContainerTestDoubles()) extends ServiceContainer { - private $services; + private array $services; public function __construct(array $services) { diff --git a/tests/Cli/Runner/DryRunnerTest.php b/tests/Cli/Runner/DryRunnerTest.php index 032ea609..719a8730 100644 --- a/tests/Cli/Runner/DryRunnerTest.php +++ b/tests/Cli/Runner/DryRunnerTest.php @@ -11,15 +11,9 @@ class DryRunnerTest extends TestCase { - /** - * @var DryRunner - */ - private $runner; - - /** - * @var OutputInterface|MockObject - */ - private $out; + private DryRunner $runner; + + private OutputInterface|MockObject $out; protected function setUp(): void { diff --git a/tests/Cli/ServiceContainer/LazyRunnerTest.php b/tests/Cli/ServiceContainer/LazyRunnerTest.php index 4144b012..de7dd73a 100644 --- a/tests/Cli/ServiceContainer/LazyRunnerTest.php +++ b/tests/Cli/ServiceContainer/LazyRunnerTest.php @@ -11,15 +11,9 @@ class LazyRunnerTest extends TestCase { - /** - * @var LazyRunner - */ - private $lazyRunner; - - /** - * @var RunnerFactory|MockObject - */ - private $factory; + private LazyRunner $lazyRunner; + + private RunnerFactory|MockObject $factory; protected function setUp(): void { diff --git a/tests/Cli/ServiceContainer/RunnerFactoryTest.php b/tests/Cli/ServiceContainer/RunnerFactoryTest.php index af3c75ef..27e75d6c 100644 --- a/tests/Cli/ServiceContainer/RunnerFactoryTest.php +++ b/tests/Cli/ServiceContainer/RunnerFactoryTest.php @@ -19,34 +19,20 @@ class RunnerFactoryTest extends TestCase { - /** - * @var ContainerInterface - */ - private $container; - - /** - * @var RunnerFactory - */ - private $runnerFactory; - - /** - * @var InputInterface - */ - private $input; - - /** - * @var OutputInterface|MockObject - */ - private $output; + private RunnerFactory $runnerFactory; + + private InputInterface $input; + + private OutputInterface|MockObject $output; protected function setUp(): void { $this->input = $this->givenInput([]); $this->output = $this->createMock(OutputInterface::class); - $this->container = new class([ InputInterface::class => &$this->input, OutputInterface::class => &$this->output, ]) implements ContainerInterface { + $container = new class([ InputInterface::class => &$this->input, OutputInterface::class => &$this->output, ]) implements ContainerInterface { - public function __construct(private array $services) + public function __construct(private readonly array $services) { } @@ -61,7 +47,7 @@ public function has(string $id): bool } }; - $this->runnerFactory = new RunnerFactory($this->container); + $this->runnerFactory = new RunnerFactory($container); } public function test_it_creates_the_passthru_runner_by_default() diff --git a/tests/Cli/ServiceContainerTest.php b/tests/Cli/ServiceContainerTest.php index 56260c52..0667fd23 100644 --- a/tests/Cli/ServiceContainerTest.php +++ b/tests/Cli/ServiceContainerTest.php @@ -18,10 +18,7 @@ class ServiceContainerTest extends TestCase { - /** - * @var ServiceContainer - */ - private $container; + private ServiceContainer $container; protected function setUp(): void { @@ -47,7 +44,7 @@ public function test_it_creates_application_services(string $serviceId, string $ $this->assertInstanceOf($expectedType, $this->container->get($serviceId)); } - public static function provideApplicationServices() + public static function provideApplicationServices(): \Generator { yield [InstallCommand::class, InstallCommand::class]; yield [ListCommand::class, ListCommand::class]; diff --git a/tests/Runner/ParametrisedRunnerTest.php b/tests/Runner/ParametrisedRunnerTest.php index c3934540..17a11464 100644 --- a/tests/Runner/ParametrisedRunnerTest.php +++ b/tests/Runner/ParametrisedRunnerTest.php @@ -11,15 +11,9 @@ class ParametrisedRunnerTest extends TestCase { - /** - * @var ParametrisedRunner - */ - private $runner; - - /** - * @var Runner|Stub - */ - private $decoratedRunner; + private ParametrisedRunner $runner; + + private Runner|Stub $decoratedRunner; protected function setUp(): void { diff --git a/tests/Tool/CollectionTest.php b/tests/Tool/CollectionTest.php index c524b4aa..48b24d3e 100644 --- a/tests/Tool/CollectionTest.php +++ b/tests/Tool/CollectionTest.php @@ -1,8 +1,9 @@ assertIterates(['ab', 'c', 'aa', 'aaa'], $c, 'The original collection is not modified'); } - private function assertIterates(array $elements, Collection $c) + private function assertIterates(array $elements, Collection $c, string $message = ''): void { - $this->assertSame($elements, \iterator_to_array($c)); + $this->assertSame($elements, \iterator_to_array($c), $message); } } diff --git a/tests/Tool/Command/ComposerBinPluginCommandTest.php b/tests/Tool/Command/ComposerBinPluginCommandTest.php index 4566939e..39d90946 100644 --- a/tests/Tool/Command/ComposerBinPluginCommandTest.php +++ b/tests/Tool/Command/ComposerBinPluginCommandTest.php @@ -13,10 +13,7 @@ class ComposerBinPluginCommandTest extends TestCase private const PACKAGE = 'phpstan/phpstan'; private const NAMESPACE = 'tools'; - /** - * @var ComposerBinPluginCommand - */ - private $command; + private ComposerBinPluginCommand $command; protected function setUp(): void { diff --git a/tests/Tool/Command/ComposerBinPluginLinkCommandTest.php b/tests/Tool/Command/ComposerBinPluginLinkCommandTest.php index d360d5c4..9ded7fc8 100644 --- a/tests/Tool/Command/ComposerBinPluginLinkCommandTest.php +++ b/tests/Tool/Command/ComposerBinPluginLinkCommandTest.php @@ -12,10 +12,7 @@ final class ComposerBinPluginLinkCommandTest extends TestCase private const TARGET = '/tools/churn'; private const NAMESPACE = 'tools'; - /** - * @var ComposerBinPluginLinkCommand - */ - private $command; + private ComposerBinPluginLinkCommand $command; protected function setUp(): void { diff --git a/tests/Tool/Command/ComposerGlobalInstallCommandTest.php b/tests/Tool/Command/ComposerGlobalInstallCommandTest.php index 748d17ee..33d5ace7 100644 --- a/tests/Tool/Command/ComposerGlobalInstallCommandTest.php +++ b/tests/Tool/Command/ComposerGlobalInstallCommandTest.php @@ -10,10 +10,7 @@ class ComposerGlobalInstallCommandTest extends TestCase { private const PACKAGE = 'phan/phan'; - /** - * @var ComposerGlobalInstallCommand - */ - private $command; + private ComposerGlobalInstallCommand $command; protected function setUp(): void { diff --git a/tests/Tool/Command/FileDownloadCommandTest.php b/tests/Tool/Command/FileDownloadCommandTest.php index a155f7d5..25a29421 100644 --- a/tests/Tool/Command/FileDownloadCommandTest.php +++ b/tests/Tool/Command/FileDownloadCommandTest.php @@ -11,10 +11,7 @@ class FileDownloadCommandTest extends TestCase private const URL = 'https://example.com/file'; private const FILE = '/usr/local/bin/file.txt'; - /** - * @var FileDownloadCommand - */ - private $command; + private FileDownloadCommand $command; protected function setUp(): void { diff --git a/tests/Tool/Command/PharDownloadCommandTest.php b/tests/Tool/Command/PharDownloadCommandTest.php index f7c0451c..ca4cd005 100644 --- a/tests/Tool/Command/PharDownloadCommandTest.php +++ b/tests/Tool/Command/PharDownloadCommandTest.php @@ -11,7 +11,7 @@ class PharDownloadCommandTest extends TestCase private const PHAR = 'https://example.com/foo.phar'; private const BIN = '/usr/local/bin/foo'; - private $command; + private PharDownloadCommand $command; protected function setUp(): void { diff --git a/tests/Tool/Command/PhiveInstallCommandTest.php b/tests/Tool/Command/PhiveInstallCommandTest.php index 79431528..7683f104 100644 --- a/tests/Tool/Command/PhiveInstallCommandTest.php +++ b/tests/Tool/Command/PhiveInstallCommandTest.php @@ -12,7 +12,7 @@ class PhiveInstallCommandTest extends TestCase private const BIN = '/usr/local/bin/foo'; private const SIG = '0000000000000000'; - private $command; + private PhiveInstallCommand $command; protected function setUp(): void { diff --git a/tests/UseCase/InstallToolsTest.php b/tests/UseCase/InstallToolsTest.php index 2cad1d2a..5fe8c580 100644 --- a/tests/UseCase/InstallToolsTest.php +++ b/tests/UseCase/InstallToolsTest.php @@ -23,15 +23,9 @@ class InstallToolsTest extends TestCase { - /** - * @var InstallTools - */ - private $useCase; - - /** - * @var Tools|Stub - */ - private $tools; + private InstallTools $useCase; + + private Tools|Stub $tools; protected function setUp(): void { From 1fb1ed2c7e941a023b2b457a7d4fc8ca77974d4f Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 13 Mar 2025 10:15:34 +0000 Subject: [PATCH 184/206] Update the key for composer-unused --- resources/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/composer.json b/resources/composer.json index 0b41c8aa..93fe87cd 100644 --- a/resources/composer.json +++ b/resources/composer.json @@ -23,7 +23,7 @@ "phive-install": { "alias": "composer-unused", "bin": "%target-dir%/composer-unused", - "sig": "B1B5F6D21AB070E1" + "sig": "3135AA4CB4F1AB0B" } }, "test": "composer-unused -V", From 6663022ecd87615152188984e37322e37a14e9cf Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 13 Mar 2025 10:22:41 +0000 Subject: [PATCH 185/206] 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 6f470c9f..39269db1 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 93fe87cd..6bf0cb70 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 186/206] 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 39269db1..d4edff94 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 5dcf3c54..a8c3172b 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 187/206] 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 39269db1..2a175023 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 9a87b64d..d0b31133 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 188/206] 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 7ca81027..d8a9349a 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 e19e5c17..07bc7bdf 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 189/206] 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 6bf0cb70..bee3b319 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 190/206] Add kahlan --- README.md | 1 + resources/test.json | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index d8a9349a..23ba30f2 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 9ee36f04..cb328d63 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 191/206] 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 23ba30f2..2d1a7aac 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 419a6ca7..ce254662 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 192/206] 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 dc785a16..8fedc89f 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 193/206] 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 2d1a7aac..2ca92e6c 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 194/206] 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 2ca92e6c..1cb0c7ac 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 cb328d63..bc2be891 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 195/206] 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 9d03a46b..0acf5a61 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 196/206] 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 1cb0c7ac..483cd9c4 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 0acf5a61..0c92d62b 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 197/206] 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 198/206] 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 199/206] 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 200/206] 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 201/206] 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 202/206] 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 203/206] 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 204/206] 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 205/206] 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 206/206] 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" } },