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 7e603dc..0e89803 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +2.3.2 +===== + +* (improvement) Add support for Symfony 8 +* (improvement) Require PHP 8.4 + + 2.3.1 ===== diff --git a/composer.json b/composer.json index c12e3c0..84b6002 100644 --- a/composer.json +++ b/composer.json @@ -11,15 +11,15 @@ ], "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" + "php": ">= 8.4", + "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", - "roave/security-advisories": "dev-latest", - "symfony/phpunit-bridge": "^7.1" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^13.0.5", + "roave/security-advisories": "dev-latest" }, "autoload": { "psr-4": { @@ -33,6 +33,7 @@ }, "config": { "allow-plugins": { + "21torr/janus": true, "bamarni/composer-bin-plugin": true }, "sort-packages": true @@ -49,15 +50,15 @@ "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": [ - "simple-phpunit", + "phpunit", "vendor-bin/phpstan/vendor/bin/phpstan analyze -c phpstan.neon . --ansi -v" ] } -} \ No newline at end of file +} 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/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 + + 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,