From 37b9d60c80677d148956e88c40409dd1e5d5e8d7 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/3] =?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 7edc731..fa4b03f 100644 --- a/composer.json +++ b/composer.json @@ -26,8 +26,8 @@ "phpunit/php-invoker": "*", "php-etl/phpunit-extension": "*", "friendsofphp/php-cs-fixer": "^3.38", - "phpstan/phpstan": "^2.2", - "rector/rector": "^2.0", + "phpstan/phpstan": "^2.1", + "rector/rector": "^2.3", "infection/infection": "^0.26", "php-etl/bucket": "*" }, From 2033de33c319bcfacb58e453f1a68a9c061f72b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Planchat?= Date: Wed, 11 Mar 2026 18:42:29 +0100 Subject: [PATCH 2/3] =?UTF-8?q?fix(deps):=20correction=20des=20d=C3=A9pend?= =?UTF-8?q?ances=20des=20composants?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - configurator-contracts: path repo packaging-contracts, minimum-stability dev - action-contracts: branch-alias dev-next - framework/Authorization: path repo Condition, condition * - infection: ^0.26 → ^0.28 (compatible php-parser 5) - phpspec: ^7.x → ^8.0 (compatible PHP 8.4) - runtime-distribution: phpspec ^8.0, platform ext-zip - flow/spreadsheet-flow: platform ext-zip - workflow-console-runtime, Console: branch-alias dev-next - runtime/cloud-runtime: php-etl/console * - plugins: path repos fast-map, fast-map-config, phpunit-extension - plugins/spreadsheet: pipeline-contracts 0.5.*, bucket-contracts 0.3.* - plugins/prestashop: path repo phpunit-extension, bucket-contracts 0.3.* - ai/cloud-runtime-symfony: php-etl/console * Composants bloqués par php-etl/metadata (externe, nikic/php-parser ^4.9): - plugins/shopify, sql, fast-map, sylius, akeneo - tools/fast-map, phpspec-extension, runtime-distribution Made-with: Cursor --- composer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index fa4b03f..2f92867 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,8 @@ { "name": "php-etl/fast-map-plugin", + "repositories": [ + {"type": "path", "url": "../../tools/fast-map-config"} + ], "description": "Adapters for the Fast Map mapping library", "type": "gyroscops-plugin", "license": "MIT", @@ -28,7 +31,7 @@ "friendsofphp/php-cs-fixer": "^3.38", "phpstan/phpstan": "^2.1", "rector/rector": "^2.3", - "infection/infection": "^0.26", + "infection/infection": "^0.28", "php-etl/bucket": "*" }, "autoload": { From c089abcbac26d85ac8135661e1db410ee8b2cbf9 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 3/3] =?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/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 | 31 --------- 8 files changed, 75 insertions(+), 221 deletions(-) delete mode 100644 .github/workflows/infection.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 8e031b2..0000000 --- a/.github/workflows/infection.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: Infection -on: push -jobs: - infection: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: shivammathur/setup-php@v2 - with: - php-version: '8.2' - tools: composer:v2 - coverage: pcov - - uses: actions/cache@v2 - with: - path: '**/vendor' - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - uses: php-actions/composer@v5 - with: - args: --prefer-dist --ignore-platform-reqs - php_version: '8.2' - - - name: Infection - run: | - wget -q https://github.com/infection/infection/releases/download/0.27.0/infection.phar - wget -q https://github.com/infection/infection/releases/download/0.27.0/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/phpstan-5.yaml b/.github/workflows/phpstan-5.yaml deleted file mode 100644 index e596b71..0000000 --- a/.github/workflows/phpstan-5.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: PHPStan level 5 -on: push -jobs: - phpstan5: - 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 97b8dd0..0000000 --- a/.github/workflows/phpstan-6.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: PHPStan level 6 -on: push -jobs: - phpstan6: - 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 93a03c5..0000000 --- a/.github/workflows/phpstan-7.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: PHPStan level 7 -on: push -jobs: - phpstan7: - 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 4fa22f1..0000000 --- a/.github/workflows/phpstan-8.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: PHPStan level 8 -on: push -jobs: - phpstan8: - 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 590720b..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 788f71b..0000000 --- a/.github/workflows/rector.yaml +++ /dev/null @@ -1,31 +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-plugin' - 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'