diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6ce17a41..4fe4ae29 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -57,6 +57,11 @@ jobs: allowed-to-fail: false symfony-require: 6.3.* variant: symfony/symfony:"6.3.*" + - php-version: '8.2' + dependencies: highest + allowed-to-fail: false + symfony-require: 7.0.* + variant: symfony/symfony:"7.0.*" steps: - name: Checkout diff --git a/composer.json b/composer.json index 8e3075b1..0468710f 100644 --- a/composer.json +++ b/composer.json @@ -16,10 +16,10 @@ "doctrine/orm": "^2.14", "doctrine/persistence": "^3.0", "psr/clock": "^1.0", - "symfony/config": "^5.4 || ^6.2", - "symfony/dependency-injection": "^5.4 || ^6.2", - "symfony/http-kernel": "^5.4 || ^6.2", - "symfony/security-core": "^5.4 || ^6.2", + "symfony/config": "^5.4 || ^6.2 || ^7.0", + "symfony/dependency-injection": "^5.4 || ^6.2 || ^7.0", + "symfony/http-kernel": "^5.4 || ^6.2 || ^7.0", + "symfony/security-core": "^5.4 || ^6.2 || ^7.0", "twig/twig": "^3.0" }, "require-dev": { @@ -27,7 +27,7 @@ "doctrine/doctrine-fixtures-bundle": "^3.4", "friendsofphp/php-cs-fixer": "^3.4", "gedmo/doctrine-extensions": "^3.7", - "matthiasnoback/symfony-dependency-injection-test": "^4.2.1", + "matthiasnoback/symfony-dependency-injection-test": "^4.2.1 || ^5.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.0", "phpstan/phpstan-doctrine": "^1.3.12", @@ -38,15 +38,15 @@ "psalm/plugin-phpunit": "^0.18", "psalm/plugin-symfony": "^5.0", "rector/rector": "^0.18", - "symfony/browser-kit": "^5.4 || ^6.2", - "symfony/cache": "^5.4 || ^6.2", - "symfony/filesystem": "^5.4 || ^6.2", - "symfony/framework-bundle": "^5.4 || ^6.2", - "symfony/http-foundation": "^5.4 || ^6.2", + "symfony/browser-kit": "^5.4 || ^6.2 || ^7.0", + "symfony/cache": "^5.4 || ^6.2 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.2 || ^7.0", + "symfony/framework-bundle": "^5.4 || ^6.2 || ^7.0", + "symfony/http-foundation": "^5.4 || ^6.2 || ^7.0", "symfony/phpunit-bridge": "^6.2", - "symfony/security-bundle": "^5.4 || ^6.2", - "symfony/twig-bundle": "^5.4 || ^6.2", - "symfony/var-dumper": "^5.4 || ^6.2", + "symfony/security-bundle": "^5.4 || ^6.2 || ^7.0", + "symfony/twig-bundle": "^5.4 || ^6.2 || ^7.0", + "symfony/var-dumper": "^5.4 || ^6.2 || ^7.0", "vimeo/psalm": "^5.7", "weirdan/doctrine-psalm-plugin": "^2.8" }, diff --git a/src/Action/CompareAction.php b/src/Action/CompareAction.php index cd759731..80a0ad29 100644 --- a/src/Action/CompareAction.php +++ b/src/Action/CompareAction.php @@ -32,13 +32,11 @@ public function __construct( public function __invoke(Request $request, string $className, string $id, ?int $oldRev = null, ?int $newRev = null): Response { if (null === $oldRev) { - $oldRev = $request->query->get('oldRev'); - \assert(null !== $oldRev); + $oldRev = $request->query->getInt('oldRev'); } if (null === $newRev) { - $newRev = $request->query->get('newRev'); - \assert(null !== $newRev); + $newRev = $request->query->getInt('newRev'); } $diff = $this->auditReader->diff($className, $id, $oldRev, $newRev); diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 55225557..6bf2dc68 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -28,13 +28,11 @@ class Configuration implements ConfigurationInterface ]; /** - * @psalm-suppress PossiblyNullReference, UndefinedInterfaceMethod + * @psalm-suppress UndefinedInterfaceMethod * * @see https://github.com/psalm/psalm-plugin-symfony/issues/174 - * - * @return TreeBuilder */ - public function getConfigTreeBuilder() + public function getConfigTreeBuilder(): TreeBuilder { $builder = new TreeBuilder('simple_things_entity_audit'); $rootNode = $builder->getRootNode();