From f853a283005e79933e9b4bb617f2d0d0bc6a8eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Planchat?= Date: Wed, 11 Mar 2026 18:19:24 +0100 Subject: [PATCH 1/2] =?UTF-8?q?chore(deps):=20PHPStan=20^2.1,=20Rector=20^?= =?UTF-8?q?2.3=20et=20mise=20=C3=A0=20jour=20des=20composer.lock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PHPStan: ^2.2 → ^2.1 (dernière version stable) - Rector: ^2.0/^0.15 → ^2.3 - Mise à jour composer.lock dans tous les composants où possible Composants non mis à jour (conflits de dépendances): - configurator-contracts: packaging-contracts v0.3.0 sur Packagist - tools/packaging, tools/fast-map: infection/phpunit-extension - plugins avec infection: conflit nikic/php-parser - framework/src/Authorization, ai/cloud-runtime-symfony: package privé - phpspec-extension, runtime/batch: phpspec PHP 8.4 - flow/sql-flow, flow/csv-flow, flow/json-flow: phpunit-extension - runtime/cloud-runtime: action-contracts dev-next - runtime/runtime-distribution: ext-zip Made-with: Cursor --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 1f84b76..415f0f3 100644 --- a/composer.json +++ b/composer.json @@ -32,8 +32,8 @@ "phpunit/phpunit": "^10.0", "phpunit/php-invoker": "*", "friendsofphp/php-cs-fixer": "^3.38", - "phpstan/phpstan": "^2.2", - "rector/rector": "^2.0", + "phpstan/phpstan": "^2.1", + "rector/rector": "^2.3", "php-etl/phpspec-extension": "*" }, "autoload": { From 2c1b2738dd6eaccd0ce8261391942e7efb3afebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Planchat?= Date: Wed, 11 Mar 2026 19:12:17 +0100 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20unifier=20les=20workflows=20qualit?= =?UTF-8?q?=C3=A9=20(PHP-CS-Fixer,=20PHPStan,=20Rector,=20PHPUnit,=20Infec?= =?UTF-8?q?tion,=20PHPSpec)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Workflow racine: découverte des paquets, matrix PHP-CS-Fixer et PHPStan (PHP 8.4, level 8) - Workflow unifié par paquet: un seul fichier quality.yaml remplaçant les workflows multiples - Suppression des workflows phpstan-5/6/7/8, rector, phpunit, infection, phpspec séparés - Conservation de package-split.yaml (runtime-distribution) et gh-pages.yml (documentation) Made-with: Cursor --- .github/workflows/infection.yaml | 34 ---------- .github/workflows/phpspec.yaml | 18 ----- .github/workflows/phpstan-5.yaml | 23 ------- .github/workflows/phpstan-6.yaml | 23 ------- .github/workflows/phpstan-7.yaml | 23 ------- .github/workflows/phpstan-8.yaml | 23 ------- .github/workflows/phpunit.yaml | 30 --------- .github/workflows/quality.yaml | 109 +++++++++++++++++++++---------- .github/workflows/rector.yaml | 30 --------- 9 files changed, 75 insertions(+), 238 deletions(-) delete mode 100644 .github/workflows/infection.yaml delete mode 100644 .github/workflows/phpspec.yaml delete mode 100644 .github/workflows/phpstan-5.yaml delete mode 100644 .github/workflows/phpstan-6.yaml delete mode 100644 .github/workflows/phpstan-7.yaml delete mode 100644 .github/workflows/phpstan-8.yaml delete mode 100644 .github/workflows/phpunit.yaml delete mode 100644 .github/workflows/rector.yaml diff --git a/.github/workflows/infection.yaml b/.github/workflows/infection.yaml deleted file mode 100644 index f105e20..0000000 --- a/.github/workflows/infection.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: Mutations -on: push -jobs: - infection: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: shivammathur/setup-php@v2 - with: - php-version: '8.2' - tools: composer:v2 - coverage: pcov - - uses: actions/cache@v3 - with: - path: '**/vendor' - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - uses: php-actions/composer@v6 - with: - args: --prefer-dist --ignore-platform-reqs - php_version: '8.2' - - - name: Infection - run: | - wget -q https://github.com/infection/infection/releases/download/0.26.18/infection.phar - wget -q https://github.com/infection/infection/releases/download/0.26.18/infection.phar.asc - chmod +x infection.phar - ./infection.phar - - - name: Store infection log - uses: actions/upload-artifact@v2 - with: - path: infection.log diff --git a/.github/workflows/phpspec.yaml b/.github/workflows/phpspec.yaml deleted file mode 100644 index 140e427..0000000 --- a/.github/workflows/phpspec.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: PhpSpec (dependencies conflict) -on: push -jobs: - phpspec: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: shivammathur/setup-php@v2 - with: - php-version: '8.2' - tools: composer:v2 - coverage: pcov - - uses: php-actions/composer@v6 - with: - args: --prefer-dist - php_version: '8.2' - - name: PHP Spec - run: bin/phpspec run spec diff --git a/.github/workflows/phpstan-5.yaml b/.github/workflows/phpstan-5.yaml deleted file mode 100644 index 784ffc4..0000000 --- a/.github/workflows/phpstan-5.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: PHPStan level 5 -on: push -jobs: - phpstan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: '**/vendor' - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - uses: php-actions/composer@v6 - with: - args: --prefer-dist - php_version: '8.2' - - name: PHPStan - uses: php-actions/phpstan@v3 - with: - path: src/ - level: 8 - php_version: '8.2' diff --git a/.github/workflows/phpstan-6.yaml b/.github/workflows/phpstan-6.yaml deleted file mode 100644 index ec2a86f..0000000 --- a/.github/workflows/phpstan-6.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: PHPStan level 6 -on: push -jobs: - phpstan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: '**/vendor' - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - uses: php-actions/composer@v6 - with: - args: --prefer-dist - php_version: '8.2' - - name: PHPStan - uses: php-actions/phpstan@v3 - with: - path: src/ - level: 8 - php_version: '8.2' diff --git a/.github/workflows/phpstan-7.yaml b/.github/workflows/phpstan-7.yaml deleted file mode 100644 index 6ca1033..0000000 --- a/.github/workflows/phpstan-7.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: PHPStan level 7 -on: push -jobs: - phpstan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: '**/vendor' - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - uses: php-actions/composer@v6 - with: - args: --prefer-dist - php_version: '8.2' - - name: PHPStan - uses: php-actions/phpstan@v3 - with: - path: src/ - level: 8 - php_version: '8.2' diff --git a/.github/workflows/phpstan-8.yaml b/.github/workflows/phpstan-8.yaml deleted file mode 100644 index 8d7aec6..0000000 --- a/.github/workflows/phpstan-8.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: PHPStan level 8 -on: push -jobs: - phpstan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: '**/vendor' - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - uses: php-actions/composer@v6 - with: - args: --prefer-dist - php_version: '8.2' - - name: PHPStan - uses: php-actions/phpstan@v3 - with: - path: src/ - level: 8 - php_version: '8.2' diff --git a/.github/workflows/phpunit.yaml b/.github/workflows/phpunit.yaml deleted file mode 100644 index cc4fc19..0000000 --- a/.github/workflows/phpunit.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: PHPUnit -on: push -jobs: - phpunit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: shivammathur/setup-php@v2 - with: - php-version: '8.2' - tools: composer:v2 - coverage: pcov - - uses: actions/cache@v3 - with: - path: '**/vendor' - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - uses: php-actions/composer@v6 - with: - args: --prefer-dist - php_version: '8.2' - - - name: Run tests & generate Coverage - run: bin/phpunit --coverage-html var/coverage - - - name: Store coverage files - uses: actions/upload-artifact@v3 - with: - path: var/coverage diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index 26a3bf8..56fde70 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -1,37 +1,78 @@ -name: Quality (PHPStan lvl 3) -on: push +name: Quality + +on: + push: + branches: [main, master, next] + pull_request: + branches: [main, master, next] + +env: + PHP_VERSION: '8.4' + jobs: - cs-fixer: + quality: + name: PHP-CS-Fixer, PHPStan, Rector, PHPUnit, Infection, PHPSpec runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: shivammathur/setup-php@v2 - with: - php-version: '8.2' - coverage: none - - name: Cs-Fixer - run: | - wget -q https://cs.symfony.com/download/php-cs-fixer-v3.phar -O php-cs-fixer - chmod a+x php-cs-fixer - PHP_CS_FIXER_IGNORE_ENV=true ./php-cs-fixer fix src --dry-run - - phpstan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: '**/vendor' - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - uses: php-actions/composer@v6 - with: - args: --prefer-dist - php_version: '8.2' - - name: PHPStan - uses: php-actions/phpstan@v3 - with: - path: src/ - level: 8 - php_version: '8.2' + - uses: actions/checkout@v4 + + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ env.PHP_VERSION }} + tools: composer:v2 + coverage: pcov + + - uses: actions/cache@v4 + with: + path: vendor + key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock', 'composer.json') }} + restore-keys: | + ${{ runner.os }}-composer- + + - name: Install dependencies + run: composer install --no-interaction --prefer-dist + + - name: PHP-CS-Fixer + run: | + if [ -f vendor/bin/php-cs-fixer ] && [ -d src ]; then + vendor/bin/php-cs-fixer fix src --dry-run + fi + + - name: PHPStan + run: | + if [ ! -d src ]; then exit 0; fi + if [ -f vendor/bin/phpstan ]; then + vendor/bin/phpstan analyse src --level=8 --no-progress + elif [ -f vendor/phpstan/phpstan/phpstan ]; then + php vendor/phpstan/phpstan/phpstan analyse src --level=8 --no-progress + fi + + - name: Rector + run: | + if [ -f bin/rector ]; then + bin/rector process --dry-run + elif [ -f vendor/bin/rector ]; then + vendor/bin/rector process --dry-run + fi + + - name: PHPUnit + run: | + if [ -f phpunit.xml ] || [ -f phpunit.xml.dist ]; then + if [ -f infection.json ] || [ -f infection.json.dist ]; then + vendor/bin/phpunit --coverage-html var/coverage --coverage-text + else + vendor/bin/phpunit + fi + fi + + - name: Infection + run: | + if [ -f infection.json ] || [ -f infection.json.dist ]; then + vendor/bin/infection run --no-progress --min-msi=0 --min-covered-msi=0 + fi + + - name: PHPSpec + run: | + if [ -f bin/phpspec ] && [ -d spec ]; then + bin/phpspec run spec + fi diff --git a/.github/workflows/rector.yaml b/.github/workflows/rector.yaml deleted file mode 100644 index 3c80808..0000000 --- a/.github/workflows/rector.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# github action that checks code with Rector -name: Rector - -on: pull_request - -jobs: - rector: - # Don't run on forks. - if: github.repository == 'php-etl/fast-map' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - uses: shivammathur/setup-php@v2 - with: - php-version: '8.2' - coverage: none - - - uses: "ramsey/composer-install@v2" - - - run: bin/rector --ansi - - - - # commit only to core contributors who have repository access - if: github.event.pull_request.head.repo.full_name == github.repository - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: '[rector] Rector fixes' - commit_author: 'GitHub Action ' - commit_user_email: 'action@github.com'