diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d6fb49810..d7e1088d0 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -64,6 +64,11 @@ jobs: allowed-to-fail: false symfony-require: 6.4.* variant: symfony/symfony:"6.4.*" + - php-version: '8.3' + 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 f516f69a1..d2271c8a9 100644 --- a/composer.json +++ b/composer.json @@ -27,33 +27,33 @@ "sonata-project/doctrine-extensions": "^1.13 || ^2.0", "sonata-project/form-extensions": "^1.4 || ^2.0", "sonata-project/twig-extensions": "^1.3 || ^2.0", - "symfony/config": "^5.4 || ^6.2", - "symfony/console": "^5.4 || ^6.2", - "symfony/dependency-injection": "^5.4 || ^6.2", - "symfony/event-dispatcher": "^5.4 || ^6.2", - "symfony/form": "^5.4 || ^6.2", - "symfony/framework-bundle": "^5.4 || ^6.2", - "symfony/http-foundation": "^5.4 || ^6.2", - "symfony/http-kernel": "^5.4 || ^6.2", - "symfony/options-resolver": "^5.4 || ^6.2", - "symfony/routing": "^5.4 || ^6.2", + "symfony/config": "^5.4 || ^6.2 || ^7.0", + "symfony/console": "^5.4 || ^6.2 || ^7.0", + "symfony/dependency-injection": "^5.4 || ^6.2 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.2 || ^7.0", + "symfony/form": "^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/http-kernel": "^5.4 || ^6.2 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.2 || ^7.0", + "symfony/routing": "^5.4 || ^6.2 || ^7.0", "symfony/security-acl": "^3.0", - "symfony/security-core": "^5.4 || ^6.2", - "symfony/security-csrf": "^5.4 || ^6.2", - "symfony/translation": "^5.4 || ^6.2", + "symfony/security-core": "^5.4 || ^6.2 || ^7.0", + "symfony/security-csrf": "^5.4 || ^6.2 || ^7.0", + "symfony/translation": "^5.4 || ^6.2 || ^7.0", "symfony/translation-contracts": "^2.5 || ^3.0", - "symfony/validator": "^5.4 || ^6.2", + "symfony/validator": "^5.4 || ^6.2 || ^7.0", "twig/twig": "^3.0" }, "require-dev": { - "dama/doctrine-test-bundle": "^7.0", + "dama/doctrine-test-bundle": "^8.0", "doctrine/doctrine-bundle": "^2.7", "doctrine/mongodb-odm": "^2.3", "doctrine/orm": "^2.14 || ^3.0", "egulias/email-validator": "^3.1 || ^4.0", "friendsofphp/php-cs-fixer": "^3.4", - "matthiasnoback/symfony-config-test": "^4.2", - "matthiasnoback/symfony-dependency-injection-test": "^4.0", + "matthiasnoback/symfony-config-test": "^4.2 || ^5.0", + "matthiasnoback/symfony-dependency-injection-test": "^4.0 || ^5.0", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^1.0", "phpstan/phpstan-phpunit": "^1.0", @@ -66,13 +66,13 @@ "sonata-project/admin-bundle": "^4.20", "sonata-project/block-bundle": "^4.11 || ^5.0", "sonata-project/doctrine-orm-admin-bundle": "^4.0", - "symfony/browser-kit": "^5.4 || ^6.2", - "symfony/console": "^5.4 || ^6.2", - "symfony/filesystem": "^5.4 || ^6.2", - "symfony/intl": "^5.4 || ^6.2", - "symfony/mailer": "^5.4 || ^6.2", - "symfony/mime": "^5.4 || ^6.2", - "symfony/phpunit-bridge": "^6.2", + "symfony/browser-kit": "^5.4 || ^6.2 || ^7.0", + "symfony/console": "^5.4 || ^6.2 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.2 || ^7.0", + "symfony/intl": "^5.4 || ^6.2 || ^7.0", + "symfony/mailer": "^5.4 || ^6.2 || ^7.0", + "symfony/mime": "^5.4 || ^6.2 || ^7.0", + "symfony/phpunit-bridge": "^6.2 || ^7.0", "vimeo/psalm": "^5.0" }, "conflict": { diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 5c53b4051..c6ddb7c40 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -27,7 +27,7 @@ final class Configuration implements ConfigurationInterface { /** - * @psalm-suppress PossiblyNullReference, UndefinedInterfaceMethod + * @psalm-suppress UndefinedInterfaceMethod * * @see https://github.com/psalm/psalm-plugin-symfony/issues/174 */ @@ -94,7 +94,7 @@ public function getConfigTreeBuilder(): TreeBuilder } /** - * @psalm-suppress PossiblyNullReference, UndefinedInterfaceMethod + * @psalm-suppress UndefinedInterfaceMethod * * @see https://github.com/psalm/psalm-plugin-symfony/issues/174 */ diff --git a/src/Security/Authorization/Voter/UserAclVoter.php b/src/Security/Authorization/Voter/UserAclVoter.php index 371da3db6..2954935a7 100644 --- a/src/Security/Authorization/Voter/UserAclVoter.php +++ b/src/Security/Authorization/Voter/UserAclVoter.php @@ -34,12 +34,11 @@ public function supportsAttribute($attribute): bool } /** - * @param mixed $subject * @param mixed[] $attributes * * @return self::ACCESS_ABSTAIN|self::ACCESS_DENIED */ - public function vote(TokenInterface $token, $subject, array $attributes): int + public function vote(TokenInterface $token, mixed $subject, array $attributes): int { if (!\is_object($subject) || !$this->supportsClass($subject::class)) { return self::ACCESS_ABSTAIN; diff --git a/tests/App/Entity/User.php b/tests/App/Entity/User.php index 5661c3582..76278c77b 100644 --- a/tests/App/Entity/User.php +++ b/tests/App/Entity/User.php @@ -15,11 +15,11 @@ use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; -use Sonata\UserBundle\Entity\BaseUser; +use Sonata\UserBundle\Entity\BaseUser3; #[ORM\Entity] #[ORM\Table(name: 'user__user')] -class User extends BaseUser +class User extends BaseUser3 { #[ORM\Id] #[ORM\Column(type: Types::INTEGER)] diff --git a/tests/App/config/config.yaml b/tests/App/config/config.yaml index 9071d4001..af793802c 100644 --- a/tests/App/config/config.yaml +++ b/tests/App/config/config.yaml @@ -58,6 +58,7 @@ doctrine: dbal: driver: pdo_sqlite path: '%app.base_dir%/sonata_user_test.db3' + use_savepoints: true orm: entity_managers: default: