From f435e0d2ba882ac3edb84a9334f8f430e00d86a4 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Mon, 5 Feb 2024 08:55:21 -0300 Subject: [PATCH] Update actions workflows. --- .github/workflows/static.yml | 50 +++++++++++------------------------- psalm.xml | 1 + psalm80.xml | 19 ++++++++++++++ rector.php | 9 +++++++ 4 files changed, 44 insertions(+), 35 deletions(-) create mode 100644 psalm80.xml diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 78374887d..2ffade527 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -26,38 +26,18 @@ concurrency: cancel-in-progress: true jobs: - mutation: - name: PHP ${{ matrix.php }}-${{ matrix.os }} - - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: - - ubuntu-latest - - php: - - 8.1 - - 8.2 - - 8.3 - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: ${{ env.extensions }} - tools: composer:v2, cs2pr - coverage: none - - - name: Update composer - run: composer self-update - - - name: Install dependencies with composer - run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader - - - name: Static analysis - run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle | cs2pr --graceful-warnings --colorize + psalm: + uses: yiisoft/actions/.github/workflows/psalm.yml@master + with: + os: >- + ['ubuntu-latest'] + php: >- + ['8.1', '8.2', '8.3'] + psalm80: + uses: yiisoft/actions/.github/workflows/psalm.yml@master + with: + psalm-config: psalm80.xml + os: >- + ['ubuntu-latest'] + php: >- + ['8.0'] diff --git a/psalm.xml b/psalm.xml index 19d34d11d..6099f9572 100644 --- a/psalm.xml +++ b/psalm.xml @@ -16,5 +16,6 @@ + diff --git a/psalm80.xml b/psalm80.xml new file mode 100644 index 000000000..e3419e92e --- /dev/null +++ b/psalm80.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/rector.php b/rector.php index 63713ce90..987918939 100644 --- a/rector.php +++ b/rector.php @@ -4,6 +4,9 @@ use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; use Rector\Config\RectorConfig; +use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector; +use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector; +use Rector\Php81\Rector\Property\ReadOnlyPropertyRector; use Rector\Set\ValueObject\LevelSetList; return static function (RectorConfig $rectorConfig): void { @@ -19,4 +22,10 @@ $rectorConfig->sets([ LevelSetList::UP_TO_PHP_80, ]); + + $rectorConfig->skip([ + ClosureToArrowFunctionRector::class, + JsonThrowOnErrorRector::class, + ReadOnlyPropertyRector::class, + ]); };