Skip to content

Commit 6a26e80

Browse files
committed
Add support for Symfony 8
1 parent 9f66234 commit 6a26e80

File tree

4 files changed

+23
-20
lines changed

4 files changed

+23
-20
lines changed

composer.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@
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": "^6.4 || ^7.3",
31-
"symfony/console": "^6.4 || ^7.3",
32-
"symfony/dependency-injection": "^6.4 || ^7.3",
33-
"symfony/event-dispatcher": "^6.4 || ^7.3",
34-
"symfony/form": "^6.4 || ^7.3",
35-
"symfony/framework-bundle": "^6.4 || ^7.3",
36-
"symfony/http-foundation": "^6.4 || ^7.3",
37-
"symfony/http-kernel": "^6.4 || ^7.3",
38-
"symfony/options-resolver": "^6.4 || ^7.3",
39-
"symfony/routing": "^6.4 || ^7.3",
30+
"symfony/config": "^6.4 || ^7.3 || ^8.0",
31+
"symfony/console": "^6.4 || ^7.3 || ^8.0",
32+
"symfony/dependency-injection": "^6.4 || ^7.3 || ^8.0",
33+
"symfony/event-dispatcher": "^6.4 || ^7.3 || ^8.0",
34+
"symfony/form": "^6.4 || ^7.3 || ^8.0",
35+
"symfony/framework-bundle": "^6.4 || ^7.3 || ^8.0",
36+
"symfony/http-foundation": "^6.4 || ^7.3 || ^8.0",
37+
"symfony/http-kernel": "^6.4 || ^7.3 || ^8.0",
38+
"symfony/options-resolver": "^6.4 || ^7.3 || ^8.0",
39+
"symfony/routing": "^6.4 || ^7.3 || ^8.0",
4040
"symfony/security-acl": "^3.0",
41-
"symfony/security-core": "^6.4 || ^7.3",
42-
"symfony/security-csrf": "^6.4 || ^7.3",
43-
"symfony/translation": "^6.4 || ^7.3",
41+
"symfony/security-core": "^6.4 || ^7.3 || ^8.0",
42+
"symfony/security-csrf": "^6.4 || ^7.3 || ^8.0",
43+
"symfony/translation": "^6.4 || ^7.3 || ^8.0",
4444
"symfony/translation-contracts": "^2.5 || ^3.0",
45-
"symfony/validator": "^6.4 || ^7.3",
45+
"symfony/validator": "^6.4 || ^7.3 || ^8.0",
4646
"twig/twig": "^3.0"
4747
},
4848
"require-dev": {
@@ -65,11 +65,11 @@
6565
"sonata-project/admin-bundle": "^4.39",
6666
"sonata-project/block-bundle": "^5.0",
6767
"sonata-project/doctrine-orm-admin-bundle": "^4.0",
68-
"symfony/browser-kit": "^6.4 || ^7.3",
69-
"symfony/filesystem": "^6.4 || ^7.3",
70-
"symfony/intl": "^6.4 || ^7.3",
71-
"symfony/mailer": "^6.4 || ^7.3",
72-
"symfony/mime": "^6.4 || ^7.3"
68+
"symfony/browser-kit": "^6.4 || ^7.3 || ^8.0",
69+
"symfony/filesystem": "^6.4 || ^7.3 || ^8.0",
70+
"symfony/intl": "^6.4 || ^7.3 || ^8.0",
71+
"symfony/mailer": "^6.4 || ^7.3 || ^8.0",
72+
"symfony/mime": "^6.4 || ^7.3 || ^8.0"
7373
},
7474
"conflict": {
7575
"sonata-project/admin-bundle": "<4.20",

src/Resources/config/routing/admin_resetting.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
return static function (RoutingConfigurator $routes) {
1818
foreach (debug_backtrace() as $trace) {
1919
if (isset($trace['object'], $trace['args'])
20+
/* @phpstan-ignore class.notFound */
2021
&& $trace['object'] instanceof XmlFileLoader
2122
&& $trace['args'][0] === __DIR__.'/admin_resetting.php'
2223
&& $trace['args'][3] === __DIR__.'/admin_resetting.xml'

src/Resources/config/routing/admin_security.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
return static function (RoutingConfigurator $routes) {
1818
foreach (debug_backtrace() as $trace) {
1919
if (isset($trace['object'], $trace['args'])
20+
/* @phpstan-ignore class.notFound */
2021
&& $trace['object'] instanceof XmlFileLoader
2122
&& $trace['args'][0] === __DIR__.'/admin_security.php'
2223
&& $trace['args'][3] === __DIR__.'/admin_security.xml'

src/Security/Authorization/Voter/UserAclVoter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Sonata\UserBundle\Model\UserInterface;
1717
use Symfony\Component\Security\Acl\Voter\AclVoter;
1818
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
19+
use Symfony\Component\Security\Core\Authorization\Voter\Vote;
1920

2021
final class UserAclVoter extends AclVoter
2122
{
@@ -38,7 +39,7 @@ public function supportsAttribute($attribute): bool
3839
*
3940
* @return self::ACCESS_ABSTAIN|self::ACCESS_DENIED
4041
*/
41-
public function vote(TokenInterface $token, mixed $subject, array $attributes): int
42+
public function vote(TokenInterface $token, mixed $subject, array $attributes, ?Vote $vote = null): int
4243
{
4344
if (!\is_object($subject) || !$this->supportsClass($subject::class)) {
4445
return self::ACCESS_ABSTAIN;

0 commit comments

Comments
 (0)