From 68752bceb7ffb87dd3edf5796d1ab04f4bd2e654 Mon Sep 17 00:00:00 2001 From: Nicolas Joubert Date: Thu, 21 Aug 2025 14:29:50 +0200 Subject: [PATCH 1/4] #18 Update rector configuration with minimal version PHP 8.1 --- rector.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/rector.php b/rector.php index cb382c4..9f9d327 100644 --- a/rector.php +++ b/rector.php @@ -3,30 +3,25 @@ declare(strict_types=1); use Rector\Config\RectorConfig; -use Rector\Doctrine\Set\DoctrineSetList; use Rector\Set\ValueObject\LevelSetList; use Rector\Symfony\Set\SymfonySetList; 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 - ) + ->withComposerBased(doctrine: true) + ->withPreparedSets(deadCode: true, codeQuality: true, doctrineCodeQuality: true, symfonyCodeQuality: true) + ->withAttributesSets(symfony: true, doctrine: 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, - DoctrineSetList::DOCTRINE_CODE_QUALITY, ]) ; From ba7627257f3cd25477471c7cc0bb6d1d3b2f3bff Mon Sep 17 00:00:00 2001 From: Nicolas Joubert Date: Thu, 21 Aug 2025 14:33:40 +0200 Subject: [PATCH 2/4] #18 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 3f9e19a0f2ebb2809aa018bae3800a68770e8be7 Mon Sep 17 00:00:00 2001 From: Nicolas Joubert Date: Thu, 21 Aug 2025 14:36:21 +0200 Subject: [PATCH 3/4] #18 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 f98c3ba..33dd796 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 2bb278ae8cd2ef35334089229babcb7d32c99586 Mon Sep 17 00:00:00 2001 From: Nicolas Joubert Date: Thu, 21 Aug 2025 14:51:41 +0200 Subject: [PATCH 4/4] #18 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