Skip to content

Commit 0a7d90e

Browse files
committed
Add support for symfony 8
1 parent 51fac9d commit 0a7d90e

7 files changed

Lines changed: 528 additions & 424 deletions

File tree

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ jobs:
1313
uses: "nucleos/actions/.github/workflows/continuous-integration.yml@main"
1414
with:
1515
PHP_EXTENSIONS: "mbstring, json, mongodb"
16+
SYMFONY_VERSIONS: "7.4,8.0"
1617
secrets:
1718
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"

composer.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,26 @@
4141
"nucleos/user-bundle": "^3.7 || ^4.0",
4242
"psr/container": "^1.0 || ^2.0",
4343
"psr/log": "^1.0 || ^2.0 || ^3.0",
44-
"sonata-project/admin-bundle": "^4.8.1",
44+
"sonata-project/admin-bundle": "^4.42.0",
4545
"sonata-project/doctrine-extensions": "^1.5.1 || ^2.0.0",
46-
"symfony/asset": "^6.4 || ^7.0",
47-
"symfony/config": "^6.4 || ^7.0",
48-
"symfony/dependency-injection": "^6.4 || ^7.0",
49-
"symfony/event-dispatcher": "^6.4 || ^7.0",
46+
"symfony/asset": "^7.4 || ^8.0",
47+
"symfony/config": "^7.4 || ^8.0",
48+
"symfony/dependency-injection": "^7.4 || ^8.0",
49+
"symfony/event-dispatcher": "^7.4 || ^8.0",
5050
"symfony/event-dispatcher-contracts": "^1.0 || ^2.0 || ^3.0",
51-
"symfony/form": "^6.4 || ^7.0",
52-
"symfony/framework-bundle": "^6.4 || ^7.0",
53-
"symfony/http-foundation": "^6.4 || ^7.0",
54-
"symfony/http-kernel": "^6.4 || ^7.0",
55-
"symfony/options-resolver": "^6.4 || ^7.0",
56-
"symfony/routing": "^6.4 || ^7.0",
57-
"symfony/security-core": "^6.4 || ^7.0",
58-
"symfony/security-csrf": "^6.4 || ^7.0",
59-
"symfony/security-http": "^6.4 || ^7.0",
60-
"symfony/translation": "^6.4 || ^7.0",
51+
"symfony/form": "^7.4 || ^8.0",
52+
"symfony/framework-bundle": "^7.4 || ^8.0",
53+
"symfony/http-foundation": "^7.4 || ^8.0",
54+
"symfony/http-kernel": "^7.4 || ^8.0",
55+
"symfony/options-resolver": "^7.4 || ^8.0",
56+
"symfony/routing": "^7.4 || ^8.0",
57+
"symfony/security-core": "^7.4 || ^8.0",
58+
"symfony/security-csrf": "^7.4 || ^8.0",
59+
"symfony/security-http": "^7.4 || ^8.0",
60+
"symfony/translation": "^7.4 || ^8.0",
6161
"symfony/translation-contracts": "^1.0 || ^2.0 || ^3.0",
62-
"symfony/twig-bridge": "^6.4 || ^7.0",
63-
"symfony/twig-bundle": "^6.4 || ^7.0",
62+
"symfony/twig-bridge": "^7.4 || ^8.0",
63+
"symfony/twig-bundle": "^7.4 || ^8.0",
6464
"twig/extra-bundle": "^3.0",
6565
"twig/twig": "^2.14 || ^3.1"
6666
},
@@ -72,16 +72,16 @@
7272
"knplabs/knp-menu-bundle": "^3.2",
7373
"sonata-project/doctrine-orm-admin-bundle": "^4.0",
7474
"sonata-project/form-extensions": "^1.20 || ^2.0",
75-
"symfony/browser-kit": "^6.4 || ^7.0",
76-
"symfony/doctrine-bridge": "^6.4 || ^7.0",
77-
"symfony/intl": "^6.4 || ^7.0",
75+
"symfony/browser-kit": "^7.4 || ^8.0",
76+
"symfony/doctrine-bridge": "^7.4 || ^8.0",
77+
"symfony/intl": "^7.4 || ^8.0",
7878
"symfony/stimulus-bundle": "^2.22",
79-
"symfony/yaml": "^6.4 || ^7.0"
79+
"symfony/yaml": "^7.4 || ^8.0"
8080
},
8181
"conflict": {
8282
"doctrine/doctrine-bundle": "<2.18",
8383
"doctrine/orm": "<2.18 || >=4",
84-
"symfony/doctrine-bridge": "<6.4 || >=8"
84+
"symfony/doctrine-bridge": "<7.4 || >=9"
8585
},
8686
"autoload": {
8787
"psr-4": {

src/Security/Authorization/Voter/UserAclVoter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Nucleos\UserBundle\Model\UserInterface;
1515
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1616
use Symfony\Component\Security\Core\Authorization\Voter\CacheableVoterInterface;
17+
use Symfony\Component\Security\Core\Authorization\Voter\Vote;
1718
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
1819

1920
final class UserAclVoter implements VoterInterface, CacheableVoterInterface
@@ -41,7 +42,7 @@ public function supportsAttribute(string $attribute): bool
4142
/**
4243
* @SuppressWarnings("PHPMD.CyclomaticComplexity")
4344
*/
44-
public function vote(TokenInterface $token, mixed $subject, array $attributes): int
45+
public function vote(TokenInterface $token, mixed $subject, array $attributes, ?Vote $vote = null): int
4546
{
4647
if (!$this->isValidSubject($subject)) {
4748
return self::ACCESS_ABSTAIN;

tests/App/AppKernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function getProjectDir(): string
8888

8989
protected function configureRoutes(RoutingConfigurator $routes): void
9090
{
91-
$routes->import('@SonataAdminBundle/Resources/config/routing/sonata_admin.xml')
91+
$routes->import('@SonataAdminBundle/Resources/config/routing/sonata_admin.php')
9292
->prefix('/admin')
9393
;
9494
$routes->import('.', 'sonata_admin')

tests/App/config/config.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929

3030
$containerConfigurator->extension('twig', ['strict_variables' => true]);
3131

32-
$containerConfigurator->extension('twig', ['exception_controller' => null]);
33-
3432
$containerConfigurator->extension('security', ['password_hashers' => [
3533
UserInterface::class => 'plaintext',
3634
]]);

vendor-bin/tools/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"phpstan/phpstan-strict-rules": "^2.0.0",
1414
"phpstan/phpstan-symfony": "^2.0.0",
1515
"phpunit/phpunit": "^12.0.0",
16-
"symfony/phpunit-bridge": "^7.0"
16+
"symfony/phpunit-bridge": "^8.0"
1717
},
1818
"config": {
1919
"allow-plugins": {
@@ -23,7 +23,7 @@
2323
},
2424
"extra": {
2525
"symfony": {
26-
"require": "6.4.*"
26+
"require": "7.4.*"
2727
}
2828
}
2929
}

0 commit comments

Comments
 (0)