From 028e22cb4b8713949fe1286a4953bbe34cf82a4c Mon Sep 17 00:00:00 2001 From: jrfnl Date: Thu, 22 Aug 2024 04:38:30 +0200 Subject: [PATCH 1/2] GH Actions: show deprecations when linting While rare, there are some deprecations which PHP can show when a file is being linted. By default these are ignored by PHP-Parallel-Lint. Apparently though, there is an option to show them (wasn't documented until recently), so let's turn that option on. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7f644b1..70eee98 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run" ], "lint": [ - "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --exclude vendor --exclude .git" + "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --show-deprecated --exclude vendor --exclude .git" ], "test": [ "@php ./vendor/phpunit/phpunit/phpunit --no-coverage" From 14f87982b35782d3a425dc1aadd8453ff7185da1 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Thu, 22 Aug 2024 04:42:00 +0200 Subject: [PATCH 2/2] GH Actions: also lint against _next_ PHP version The PHP lint job currently checks all PHP files for parse/compile errors against a limited set of PHP versions, including the high/low versions. It did not run the linter against the _next_ (upcoming) PHP version yet. This has now been added with the `'nightly'` alias, which means that the version will automatically roll through to the next PHP version when a new PHP branchs gets cut, without us needing to manually maintain this. Also note that the build against `nightly` is allowed to fail. --- .github/workflows/phplint.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/phplint.yml b/.github/workflows/phplint.yml index d147941..17b374a 100644 --- a/.github/workflows/phplint.yml +++ b/.github/workflows/phplint.yml @@ -19,7 +19,9 @@ jobs: strategy: matrix: - php: ['5.4', '5.6', '7.2', 'latest'] + php: ['5.4', '5.6', '7.2', 'latest', 'nightly'] + + continue-on-error: ${{ matrix.php == 'nightly' }} name: "PHP Lint: PHP ${{ matrix.php }}"