From 89bccf98f51790371ca7ee540576367956c59ab2 Mon Sep 17 00:00:00 2001 From: Jannik Zschiesche Date: Mon, 9 Mar 2026 13:26:36 +0100 Subject: [PATCH 1/4] Add support for Symfony 8 --- CHANGELOG.md | 6 ++++++ composer.json | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e603dc..63cec0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +2.3.2 +===== + +* (improvement) Add support for Symfony 8 + + 2.3.1 ===== diff --git a/composer.json b/composer.json index c12e3c0..eba7ce0 100644 --- a/composer.json +++ b/composer.json @@ -12,14 +12,14 @@ "homepage": "https://github.com/21TORR/bundle-helpers", "require": { "php": ">= 8.3", - "symfony/config": "^7.1", - "symfony/dependency-injection": "^7.1", - "symfony/http-kernel": "^7.1" + "symfony/config": "^7.4 || ^8.0", + "symfony/dependency-injection": "^7.4 || ^8.0", + "symfony/http-kernel": "^7.4 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8", + "bamarni/composer-bin-plugin": "^1.9.1", "roave/security-advisories": "dev-latest", - "symfony/phpunit-bridge": "^7.1" + "symfony/phpunit-bridge": "^8.0" }, "autoload": { "psr-4": { @@ -60,4 +60,4 @@ "vendor-bin/phpstan/vendor/bin/phpstan analyze -c phpstan.neon . --ansi -v" ] } -} \ No newline at end of file +} From b7f2e707530d60d97e6790631bbf868d38dba4ea Mon Sep 17 00:00:00 2001 From: Jannik Zschiesche Date: Mon, 9 Mar 2026 13:27:30 +0100 Subject: [PATCH 2/4] Require PHP 8.4 --- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 1 + composer.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9aecb50..90ebb4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - php: ['8.3'] + php: ['8.4', '8.5'] steps: - name: Checkout Code diff --git a/CHANGELOG.md b/CHANGELOG.md index 63cec0a..0e89803 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ===== * (improvement) Add support for Symfony 8 +* (improvement) Require PHP 8.4 2.3.1 diff --git a/composer.json b/composer.json index eba7ce0..1f122ba 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ ], "homepage": "https://github.com/21TORR/bundle-helpers", "require": { - "php": ">= 8.3", + "php": ">= 8.4", "symfony/config": "^7.4 || ^8.0", "symfony/dependency-injection": "^7.4 || ^8.0", "symfony/http-kernel": "^7.4 || ^8.0" From 116c3ae6e43bebececbee4ebfbcc4b31d5b68140 Mon Sep 17 00:00:00 2001 From: Jannik Zschiesche Date: Mon, 9 Mar 2026 13:35:48 +0100 Subject: [PATCH 3/4] Update phpunit --- composer.json | 6 +++--- phpunit.xml | 41 +++++++++++++++++++---------------------- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/composer.json b/composer.json index 1f122ba..8344d2c 100644 --- a/composer.json +++ b/composer.json @@ -18,8 +18,8 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.9.1", - "roave/security-advisories": "dev-latest", - "symfony/phpunit-bridge": "^8.0" + "phpunit/phpunit": "^13.0.5", + "roave/security-advisories": "dev-latest" }, "autoload": { "psr-4": { @@ -56,7 +56,7 @@ "vendor-bin/cs-fixer/vendor/bin/php-cs-fixer check --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --no-interaction --ansi" ], "test": [ - "simple-phpunit", + "phpunit", "vendor-bin/phpstan/vendor/bin/phpstan analyze -c phpstan.neon . --ansi -v" ] } diff --git a/phpunit.xml b/phpunit.xml index de0b74b..a501082 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,27 +1,24 @@ - - - - - - - - - + + + + + + + + + - - - tests - tests/fixtures - - - - - - + + + tests + tests/fixtures + + From 7c16fef8e2f7c9c4d7f4dc063a05967fa0fb68c4 Mon Sep 17 00:00:00 2001 From: Jannik Zschiesche Date: Mon, 9 Mar 2026 13:37:51 +0100 Subject: [PATCH 4/4] Bump Janus --- composer.json | 7 +++-- phpstan.neon | 50 ++++++++++++++++++++++++++++--- vendor-bin/c-norm/composer.json | 2 +- vendor-bin/cs-fixer/composer.json | 2 +- vendor-bin/janus/composer.json | 7 ++++- vendor-bin/phpstan/composer.json | 14 ++++----- 6 files changed, 65 insertions(+), 17 deletions(-) diff --git a/composer.json b/composer.json index 8344d2c..84b6002 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "symfony/http-kernel": "^7.4 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.9.1", + "bamarni/composer-bin-plugin": "^1.8.2", "phpunit/phpunit": "^13.0.5", "roave/security-advisories": "dev-latest" }, @@ -33,6 +33,7 @@ }, "config": { "allow-plugins": { + "21torr/janus": true, "bamarni/composer-bin-plugin": true }, "sort-packages": true @@ -49,11 +50,11 @@ "scripts": { "fix-lint": [ "@composer bin c-norm normalize \"$(pwd)/composer.json\" --indent-style tab --indent-size 1 --ansi", - "vendor-bin/cs-fixer/vendor/bin/php-cs-fixer fix --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --no-interaction --ansi" + "vendor-bin/cs-fixer/vendor/bin/php-cs-fixer fix --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --allow-unsupported-php-version=yes --no-interaction --ansi" ], "lint": [ "@composer bin c-norm normalize \"$(pwd)/composer.json\" --indent-style tab --indent-size 1 --dry-run --ansi", - "vendor-bin/cs-fixer/vendor/bin/php-cs-fixer check --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --no-interaction --ansi" + "vendor-bin/cs-fixer/vendor/bin/php-cs-fixer check --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --allow-unsupported-php-version=yes --no-interaction --ansi" ], "test": [ "phpunit", diff --git a/phpstan.neon b/phpstan.neon index ab523a4..8e99117 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,6 +1,48 @@ -includes: - - vendor-bin/janus/vendor/21torr/janus/phpstan/lib.neon +# This file was copied manually von Janus, as we need to exclude the custom rule parameters: - bootstrapFiles: - - vendor/bin/.phpunit/phpunit/vendor/autoload.php + level: 9 + + editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%' + + checkDynamicProperties: true + checkExplicitMixedMissingReturn: true + checkUninitializedProperties: true + inferPrivatePropertyTypeFromConstructor: true + polluteScopeWithLoopInitialAssignments: false + reportPossiblyNonexistentConstantArrayOffset: true + reportUnmatchedIgnoredErrors: false + treatPhpDocTypesAsCertain: false + + # Disable these settings here, as they currently crash in PHPStan v2 + #excludePaths: + # analyse: + # - %currentWorkingDirectory%/vendor + # analyseAndScan: + # - %currentWorkingDirectory%/node_modules (?) + # - %currentWorkingDirectory%/var (?) + # - %currentWorkingDirectory%/vendor-bin + + ignoreErrors: + - message: "#^Attribute class JetBrains\\\\PhpStorm\\\\.*? does not exist\\.$#" + - identifier: missingType.iterableValue + - + identifier: argument.type + path: %currentWorkingDirectory%/tests/* + - + identifier: staticMethod.alreadyNarrowedType + path: %currentWorkingDirectory%/tests/* + - + identifier: method.deprecated + path: %currentWorkingDirectory%/tests/* + # Using this will have a lot of false-positives, as entities are often used as form + # entries and there the fields need to be nullable. + - identifier: doctrine.columnType + + excludePaths: + analyse: + - vendor + analyseAndScan: + - node_modules (?) + - var (?) + - vendor-bin diff --git a/vendor-bin/c-norm/composer.json b/vendor-bin/c-norm/composer.json index 29d96fe..43031c1 100644 --- a/vendor-bin/c-norm/composer.json +++ b/vendor-bin/c-norm/composer.json @@ -1,6 +1,6 @@ { "require-dev": { - "ergebnis/composer-normalize": "^2.42", + "ergebnis/composer-normalize": "^2.47", "roave/security-advisories": "dev-latest" }, "config": { diff --git a/vendor-bin/cs-fixer/composer.json b/vendor-bin/cs-fixer/composer.json index ceadfce..42e20ab 100644 --- a/vendor-bin/cs-fixer/composer.json +++ b/vendor-bin/cs-fixer/composer.json @@ -1,6 +1,6 @@ { "require-dev": { - "21torr/php-cs-fixer": "^1.1.1", + "21torr/php-cs-fixer": "^1.1.5", "roave/security-advisories": "dev-latest" } } diff --git a/vendor-bin/janus/composer.json b/vendor-bin/janus/composer.json index e2fd1f9..34e91ab 100644 --- a/vendor-bin/janus/composer.json +++ b/vendor-bin/janus/composer.json @@ -1,5 +1,10 @@ { "require": { - "21torr/janus": "^1.4" + "21torr/janus": "^2.0" + }, + "config": { + "allow-plugins": { + "21torr/janus": true + } } } diff --git a/vendor-bin/phpstan/composer.json b/vendor-bin/phpstan/composer.json index cf165ff..4eb9387 100644 --- a/vendor-bin/phpstan/composer.json +++ b/vendor-bin/phpstan/composer.json @@ -3,14 +3,14 @@ "php": "^8.3" }, "require-dev": { - "phpstan/extension-installer": "^1.3.1", - "phpstan/phpstan": "^1.11", - "phpstan/phpstan-deprecation-rules": "^1.2", - "phpstan/phpstan-doctrine": "^1.4", - "phpstan/phpstan-phpunit": "^1.4", - "phpstan/phpstan-symfony": "^1.4", + "phpstan/extension-installer": "^1.4.2", + "phpstan/phpstan": "^2.1.11", + "phpstan/phpstan-deprecation-rules": "^2.0.1", + "phpstan/phpstan-doctrine": "^2.0.2", + "phpstan/phpstan-phpunit": "^2.0.6", + "phpstan/phpstan-symfony": "^2.0.4", "roave/security-advisories": "dev-latest", - "staabm/phpstan-todo-by": "^0.1.25" + "staabm/phpstan-todo-by": "^0.2" }, "config": { "sort-packages": true,