From b4bae0a9cfa6f6e3280d8800bd3a8c2db247d59a Mon Sep 17 00:00:00 2001 From: Nicolas Joubert Date: Thu, 21 Aug 2025 14:30:14 +0200 Subject: [PATCH 1/4] #12 Update rector configuration with minimal version PHP 8.1 --- rector.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/rector.php b/rector.php index 72a2408..b19c112 100644 --- a/rector.php +++ b/rector.php @@ -8,23 +8,19 @@ use Rector\ValueObject\PhpVersion; return RectorConfig::configure() - ->withPhpVersion(PhpVersion::PHP_82) + ->withPhpVersion(PhpVersion::PHP_84) ->withPaths([ __DIR__.'/src', __DIR__.'/tests', ]) - ->withPhpSets(php82: true) + ->withPhpSets(php81: true) // here we can define, what prepared sets of rules will be applied - ->withPreparedSets( - deadCode: true, - codeQuality: true - ) + ->withPreparedSets(deadCode: true, codeQuality: true, symfonyCodeQuality: true) + ->withAttributesSets(symfony: true) ->withSets([ - LevelSetList::UP_TO_PHP_82, + LevelSetList::UP_TO_PHP_81, SymfonySetList::SYMFONY_64, - SymfonySetList::SYMFONY_71, SymfonySetList::SYMFONY_CODE_QUALITY, SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION, - SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES, ]) ; From 2a02fea6256fb265f425e9f7aef6ee2edf82fafa Mon Sep 17 00:00:00 2001 From: Nicolas Joubert Date: Thu, 21 Aug 2025 14:33:47 +0200 Subject: [PATCH 2/4] #12 Update github workflows with PHP 8.1 to 8.4 for Symfony ^6.4 and PHP 8.2 to 8.4 for Symfony ^7.3 --- .github/workflows/quality.yml | 23 ++++++++++++++++++++--- .github/workflows/test.yml | 24 ++++++++++++++++++++---- 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 9f1580f..51412f4 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -19,7 +19,7 @@ jobs: - name: Install PHP with extensions uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.4' coverage: none tools: composer:v2 - name: Install Composer dependencies (locked) @@ -36,7 +36,7 @@ jobs: - name: Install PHP with extensions uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.4' coverage: none tools: composer:v2 - name: Install Composer dependencies (locked) @@ -53,10 +53,27 @@ jobs: - name: Install PHP with extensions uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.4' coverage: none tools: composer:v2 - name: Install Composer dependencies (locked) uses: ramsey/composer-install@v3 - name: Rector run: vendor/bin/rector --no-progress-bar --dry-run + + twig-cs-fixer: + name: Twig-CS-Fixer + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Install PHP with extensions + uses: shivammathur/setup-php@v2 + with: + php-version: '8.4' + coverage: none + tools: composer:v2 + - name: Install Composer dependencies (locked) + uses: ramsey/composer-install@v3 + - name: Twig-CS-Fixer + run: vendor/bin/twig-cs-fixer lint --report=github diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2d7e7a4..0e07db0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,11 +22,17 @@ jobs: php-version: - '8.2' - '8.3' + - '8.4' dependencies: [highest] allowed-to-fail: [false] symfony-require: [''] variant: [normal] include: + - php-version: '8.1' + dependencies: highest + allowed-to-fail: false + symfony-require: 6.4.* + variant: symfony/symfony:"6.4.*" - php-version: '8.2' dependencies: highest allowed-to-fail: false @@ -35,8 +41,8 @@ jobs: - php-version: '8.2' dependencies: highest allowed-to-fail: false - symfony-require: 7.1.* - variant: symfony/symfony:"7.1.*" + symfony-require: 7.3.* + variant: symfony/symfony:"7.3.*" - php-version: '8.3' dependencies: highest allowed-to-fail: false @@ -45,8 +51,18 @@ jobs: - php-version: '8.3' dependencies: highest allowed-to-fail: false - symfony-require: 7.1.* - variant: symfony/symfony:"7.1.*" + symfony-require: 7.3.* + variant: symfony/symfony:"7.3.*" + - php-version: '8.4' + dependencies: highest + allowed-to-fail: false + symfony-require: 6.4.* + variant: symfony/symfony:"6.4.*" + - php-version: '8.4' + dependencies: highest + allowed-to-fail: false + symfony-require: 7.3.* + variant: symfony/symfony:"7.3.*" steps: - name: Checkout From 6012f5f01d959719f3d72d14e392ec3f4a8bdf57 Mon Sep 17 00:00:00 2001 From: Nicolas Joubert Date: Thu, 21 Aug 2025 14:36:37 +0200 Subject: [PATCH 3/4] #12 Update docker configuration with PHP 8.4 --- .docker/php/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/php/Dockerfile b/.docker/php/Dockerfile index c812151..3811433 100644 --- a/.docker/php/Dockerfile +++ b/.docker/php/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2-fpm-alpine +FROM php:8.4-fpm-alpine ARG UID ARG GID From 25044b79f53bc156abe4b90c41484c9e74198a7a Mon Sep 17 00:00:00 2001 From: Nicolas Joubert Date: Thu, 21 Aug 2025 14:51:49 +0200 Subject: [PATCH 4/4] #12 Remove twig-cs-fixer from github quality workflows --- .github/workflows/quality.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 51412f4..a07ce8b 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -60,20 +60,3 @@ jobs: uses: ramsey/composer-install@v3 - name: Rector run: vendor/bin/rector --no-progress-bar --dry-run - - twig-cs-fixer: - name: Twig-CS-Fixer - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Install PHP with extensions - uses: shivammathur/setup-php@v2 - with: - php-version: '8.4' - coverage: none - tools: composer:v2 - - name: Install Composer dependencies (locked) - uses: ramsey/composer-install@v3 - - name: Twig-CS-Fixer - run: vendor/bin/twig-cs-fixer lint --report=github