From 4d3ef78749216142a0187ffb239dc60c00b0a6e3 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula <42547589+terabytesoftw@users.noreply.github.com> Date: Mon, 5 Feb 2024 09:15:47 -0300 Subject: [PATCH] Update actions workflows. (#295) --- .github/workflows/static.yml | 42 ++++++------------------------------ composer.json | 2 +- psalm.xml | 1 + rector.php | 9 ++++++++ 4 files changed, 18 insertions(+), 36 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 78374887d..fc9287984 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -26,38 +26,10 @@ 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'] diff --git a/composer.json b/composer.json index d8a09a28e..b2c7c8b28 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "rector/rector": "^0.19", "roave/infection-static-analysis-plugin": "^1.34", "spatie/phpunit-watcher": "^1.23", - "vimeo/psalm": "^5.8", + "vimeo/psalm": "^5.20", "yiisoft/aliases": "^2.0", "yiisoft/cache": "^3.0", "yiisoft/db-sqlite": "^1.1", 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/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, + ]); };