Skip to content

Commit 4fc41fb

Browse files
authoredOct 18, 2024
Allow Symfony 7 (#1669)
1 parent ecbcd89 commit 4fc41fb

File tree

6 files changed

+35
-30
lines changed

6 files changed

+35
-30
lines changed
 

‎.github/workflows/test.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ jobs:
6464
allowed-to-fail: false
6565
symfony-require: 6.4.*
6666
variant: symfony/symfony:"6.4.*"
67+
- php-version: '8.3'
68+
dependencies: highest
69+
allowed-to-fail: false
70+
symfony-require: 7.0.*
71+
variant: symfony/symfony:"7.0.*"
6772

6873
steps:
6974
- name: Checkout

‎composer.json

+24-24
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,33 @@
2727
"sonata-project/doctrine-extensions": "^1.13 || ^2.0",
2828
"sonata-project/form-extensions": "^1.4 || ^2.0",
2929
"sonata-project/twig-extensions": "^1.3 || ^2.0",
30-
"symfony/config": "^5.4 || ^6.2",
31-
"symfony/console": "^5.4 || ^6.2",
32-
"symfony/dependency-injection": "^5.4 || ^6.2",
33-
"symfony/event-dispatcher": "^5.4 || ^6.2",
34-
"symfony/form": "^5.4 || ^6.2",
35-
"symfony/framework-bundle": "^5.4 || ^6.2",
36-
"symfony/http-foundation": "^5.4 || ^6.2",
37-
"symfony/http-kernel": "^5.4 || ^6.2",
38-
"symfony/options-resolver": "^5.4 || ^6.2",
39-
"symfony/routing": "^5.4 || ^6.2",
30+
"symfony/config": "^5.4 || ^6.2 || ^7.0",
31+
"symfony/console": "^5.4 || ^6.2 || ^7.0",
32+
"symfony/dependency-injection": "^5.4 || ^6.2 || ^7.0",
33+
"symfony/event-dispatcher": "^5.4 || ^6.2 || ^7.0",
34+
"symfony/form": "^5.4 || ^6.2 || ^7.0",
35+
"symfony/framework-bundle": "^5.4 || ^6.2 || ^7.0",
36+
"symfony/http-foundation": "^5.4 || ^6.2 || ^7.0",
37+
"symfony/http-kernel": "^5.4 || ^6.2 || ^7.0",
38+
"symfony/options-resolver": "^5.4 || ^6.2 || ^7.0",
39+
"symfony/routing": "^5.4 || ^6.2 || ^7.0",
4040
"symfony/security-acl": "^3.0",
41-
"symfony/security-core": "^5.4 || ^6.2",
42-
"symfony/security-csrf": "^5.4 || ^6.2",
43-
"symfony/translation": "^5.4 || ^6.2",
41+
"symfony/security-core": "^5.4 || ^6.2 || ^7.0",
42+
"symfony/security-csrf": "^5.4 || ^6.2 || ^7.0",
43+
"symfony/translation": "^5.4 || ^6.2 || ^7.0",
4444
"symfony/translation-contracts": "^2.5 || ^3.0",
45-
"symfony/validator": "^5.4 || ^6.2",
45+
"symfony/validator": "^5.4 || ^6.2 || ^7.0",
4646
"twig/twig": "^3.0"
4747
},
4848
"require-dev": {
49-
"dama/doctrine-test-bundle": "^7.0",
49+
"dama/doctrine-test-bundle": "^8.0",
5050
"doctrine/doctrine-bundle": "^2.7",
5151
"doctrine/mongodb-odm": "^2.3",
5252
"doctrine/orm": "^2.14 || ^3.0",
5353
"egulias/email-validator": "^3.1 || ^4.0",
5454
"friendsofphp/php-cs-fixer": "^3.4",
55-
"matthiasnoback/symfony-config-test": "^4.2",
56-
"matthiasnoback/symfony-dependency-injection-test": "^4.0",
55+
"matthiasnoback/symfony-config-test": "^4.2 || ^5.0",
56+
"matthiasnoback/symfony-dependency-injection-test": "^4.0 || ^5.0",
5757
"phpstan/extension-installer": "^1.0",
5858
"phpstan/phpstan": "^1.0",
5959
"phpstan/phpstan-phpunit": "^1.0",
@@ -66,13 +66,13 @@
6666
"sonata-project/admin-bundle": "^4.20",
6767
"sonata-project/block-bundle": "^4.11 || ^5.0",
6868
"sonata-project/doctrine-orm-admin-bundle": "^4.0",
69-
"symfony/browser-kit": "^5.4 || ^6.2",
70-
"symfony/console": "^5.4 || ^6.2",
71-
"symfony/filesystem": "^5.4 || ^6.2",
72-
"symfony/intl": "^5.4 || ^6.2",
73-
"symfony/mailer": "^5.4 || ^6.2",
74-
"symfony/mime": "^5.4 || ^6.2",
75-
"symfony/phpunit-bridge": "^6.2",
69+
"symfony/browser-kit": "^5.4 || ^6.2 || ^7.0",
70+
"symfony/console": "^5.4 || ^6.2 || ^7.0",
71+
"symfony/filesystem": "^5.4 || ^6.2 || ^7.0",
72+
"symfony/intl": "^5.4 || ^6.2 || ^7.0",
73+
"symfony/mailer": "^5.4 || ^6.2 || ^7.0",
74+
"symfony/mime": "^5.4 || ^6.2 || ^7.0",
75+
"symfony/phpunit-bridge": "^6.2 || ^7.0",
7676
"vimeo/psalm": "^5.0"
7777
},
7878
"conflict": {

‎src/DependencyInjection/Configuration.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
final class Configuration implements ConfigurationInterface
2828
{
2929
/**
30-
* @psalm-suppress PossiblyNullReference, UndefinedInterfaceMethod
30+
* @psalm-suppress UndefinedInterfaceMethod
3131
*
3232
* @see https://github.com/psalm/psalm-plugin-symfony/issues/174
3333
*/
@@ -94,7 +94,7 @@ public function getConfigTreeBuilder(): TreeBuilder
9494
}
9595

9696
/**
97-
* @psalm-suppress PossiblyNullReference, UndefinedInterfaceMethod
97+
* @psalm-suppress UndefinedInterfaceMethod
9898
*
9999
* @see https://github.com/psalm/psalm-plugin-symfony/issues/174
100100
*/

‎src/Security/Authorization/Voter/UserAclVoter.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@ public function supportsAttribute($attribute): bool
3434
}
3535

3636
/**
37-
* @param mixed $subject
3837
* @param mixed[] $attributes
3938
*
4039
* @return self::ACCESS_ABSTAIN|self::ACCESS_DENIED
4140
*/
42-
public function vote(TokenInterface $token, $subject, array $attributes): int
41+
public function vote(TokenInterface $token, mixed $subject, array $attributes): int
4342
{
4443
if (!\is_object($subject) || !$this->supportsClass($subject::class)) {
4544
return self::ACCESS_ABSTAIN;

‎tests/App/Entity/User.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
use Doctrine\DBAL\Types\Types;
1717
use Doctrine\ORM\Mapping as ORM;
18-
use Sonata\UserBundle\Entity\BaseUser;
18+
use Sonata\UserBundle\Entity\BaseUser3;
1919

2020
#[ORM\Entity]
2121
#[ORM\Table(name: 'user__user')]
22-
class User extends BaseUser
22+
class User extends BaseUser3
2323
{
2424
#[ORM\Id]
2525
#[ORM\Column(type: Types::INTEGER)]

‎tests/App/config/config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ doctrine:
5858
dbal:
5959
driver: pdo_sqlite
6060
path: '%app.base_dir%/sonata_user_test.db3'
61+
use_savepoints: true
6162
orm:
6263
entity_managers:
6364
default:

0 commit comments

Comments
 (0)