From a67343478f747f866676793a4e5c57b92274b007 Mon Sep 17 00:00:00 2001 From: Dennis Fridrich Date: Sat, 9 Dec 2023 10:55:25 +0100 Subject: [PATCH 1/7] Add Symfony 7 and PHP 8.2 support --- .github/workflows/main.yml | 7 ++++++- README.md | 3 +++ composer.json | 12 ++++++------ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bb2d3eb..58e1294 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest ] - php-versions: [ '8.1' ] + php-versions: [ '8.1', '8.2' ] composer-dependencies: [ '', '--prefer-lowest' ] symfony-version: [ '' ] extra-label: [ '' ] @@ -23,6 +23,11 @@ jobs: operating-system: windows-latest coverage: xdebug + - php-versions: '8.2' + operating-system: ubuntu-latest + symfony-version: '7.0.*' + extra-label: 'SF 7.0' + steps: # see https://github.com/actions/checkout/issues/226#issue-606867805 - name: Prepare git diff --git a/README.md b/README.md index f3f71cb..e0cfe1a 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,9 @@ Bugs and feature request are tracked on [GitHub](https://github.com/mhujer/consi # Changelog +## 2.0.1 (2023-12-09) +- add Symfony 7 and PHP 8.2 support (dfridrich) + ## 2.0.0 (2022-09-20) - require PHP 8.1 - add support for native enums to make migration easier diff --git a/composer.json b/composer.json index 4214eaa..4cb1fab 100644 --- a/composer.json +++ b/composer.json @@ -20,12 +20,12 @@ "require": { "php": "~8.1", "consistence-community/consistence": "~2.1", - "symfony/config": "^5.4||^6.0", - "symfony/dependency-injection": "^5.4||^6.0", - "symfony/form": "^5.4||^6.0", - "symfony/http-kernel": "^5.4||^6.0", - "symfony/translation": "^5.4||^6.0", - "symfony/yaml": "^5.4||^6.0", + "symfony/config": "^5.4||^6.0||^7.0", + "symfony/dependency-injection": "^5.4||^6.0||^7.0", + "symfony/form": "^5.4||^6.0||^7.0", + "symfony/http-kernel": "^5.4||^6.0||^7.0", + "symfony/translation": "^5.4||^6.0||^7.0", + "symfony/yaml": "^5.4||^6.0||^7.0", "twig/twig": "^1.41.0 || ^2.12.1 || ^3.0" }, "require-dev": { From 50d526ea429b694233146d12c69bd93f7484c5c8 Mon Sep 17 00:00:00 2001 From: Dennis Fridrich Date: Sat, 9 Dec 2023 12:05:25 +0100 Subject: [PATCH 2/7] Vypnuti `checkGenericClassInNonGenericObjectType` v PHPStanu --- phpstan.neon | 1 + 1 file changed, 1 insertion(+) diff --git a/phpstan.neon b/phpstan.neon index 059b170..5dc5e7c 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,3 +1,4 @@ parameters: checkMissingIterableValueType: false ignoreErrors: + checkGenericClassInNonGenericObjectType: false From 1529a08a084f98512930ab8202751cacf636d11b Mon Sep 17 00:00:00 2001 From: Dennis Fridrich Date: Sat, 9 Dec 2023 12:08:18 +0100 Subject: [PATCH 3/7] Add PHP 8.3 vs SF 7.0 check --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 58e1294..8c73e50 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-latest ] - php-versions: [ '8.1', '8.2' ] + php-versions: [ '8.1', '8.2', '8.3' ] composer-dependencies: [ '', '--prefer-lowest' ] symfony-version: [ '' ] extra-label: [ '' ] @@ -23,7 +23,7 @@ jobs: operating-system: windows-latest coverage: xdebug - - php-versions: '8.2' + - php-versions: ['8.2', '8.3'] operating-system: ubuntu-latest symfony-version: '7.0.*' extra-label: 'SF 7.0' From fa3ad3b26c2e66209775ee93531b696f6056f4d4 Mon Sep 17 00:00:00 2001 From: Dennis Fridrich Date: Sat, 9 Dec 2023 12:23:33 +0100 Subject: [PATCH 4/7] Fix pipeline --- .github/workflows/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8c73e50..59f8d91 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,12 @@ jobs: operating-system: windows-latest coverage: xdebug - - php-versions: ['8.2', '8.3'] + - php-versions: '8.2' + operating-system: ubuntu-latest + symfony-version: '7.0.*' + extra-label: 'SF 7.0' + + - php-versions: '8.3' operating-system: ubuntu-latest symfony-version: '7.0.*' extra-label: 'SF 7.0' From 7ba6a99ea71fa3a58a04109e033243d6dc06baaa Mon Sep 17 00:00:00 2001 From: Dennis Fridrich Date: Sat, 9 Dec 2023 12:48:56 +0100 Subject: [PATCH 5/7] Remove useless SF vs PHP definitions --- .github/workflows/main.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 59f8d91..705b6a4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,17 +22,6 @@ jobs: - php-versions: '8.1' operating-system: windows-latest coverage: xdebug - - - php-versions: '8.2' - operating-system: ubuntu-latest - symfony-version: '7.0.*' - extra-label: 'SF 7.0' - - - php-versions: '8.3' - operating-system: ubuntu-latest - symfony-version: '7.0.*' - extra-label: 'SF 7.0' - steps: # see https://github.com/actions/checkout/issues/226#issue-606867805 - name: Prepare git From e4d712b520deef4523a479c07d4431f2d4e69879 Mon Sep 17 00:00:00 2001 From: Dennis Fridrich Date: Sat, 9 Dec 2023 13:13:02 +0100 Subject: [PATCH 6/7] Migrate PHPUnit to 10 and matthiasnoback/symfony-dependency-injection-test to 5 --- .github/workflows/main.yml | 11 ++++++++ composer.json | 4 +-- phpunit.xml.dist | 53 ++++++++++++++------------------------ 3 files changed, 32 insertions(+), 36 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 705b6a4..59f8d91 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,6 +22,17 @@ jobs: - php-versions: '8.1' operating-system: windows-latest coverage: xdebug + + - php-versions: '8.2' + operating-system: ubuntu-latest + symfony-version: '7.0.*' + extra-label: 'SF 7.0' + + - php-versions: '8.3' + operating-system: ubuntu-latest + symfony-version: '7.0.*' + extra-label: 'SF 7.0' + steps: # see https://github.com/actions/checkout/issues/226#issue-606867805 - name: Prepare git diff --git a/composer.json b/composer.json index 4cb1fab..b9bc2bf 100644 --- a/composer.json +++ b/composer.json @@ -30,11 +30,11 @@ }, "require-dev": { "consistence-community/coding-standard": "3.11.2", - "matthiasnoback/symfony-dependency-injection-test": "4.3.0", + "matthiasnoback/symfony-dependency-injection-test": "^5.0", "phpstan/extension-installer": "1.1.0", "phpstan/phpstan-phpunit": "1.1.1", "phpstan/phpstan": "1.8.5", - "phpunit/phpunit": "9.5.24" + "phpunit/phpunit": "^10.0" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 27d8ddb..6944d6a 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,36 +1,21 @@ + - - - - - tests - - - - - - src - - - - - - - + + + + tests + + + + + + + + + + + + src + + From 7ea5b7ddf4c4afb22f04ad840b80d21d941c21e6 Mon Sep 17 00:00:00 2001 From: Dennis Fridrich Date: Sat, 9 Dec 2023 13:26:57 +0100 Subject: [PATCH 7/7] Fix PHPUnit version to 10.5+ --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b9bc2bf..5c66856 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "phpstan/extension-installer": "1.1.0", "phpstan/phpstan-phpunit": "1.1.1", "phpstan/phpstan": "1.8.5", - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^10.5" }, "autoload": { "psr-4": {