From 09b034050723ecce76d4dc382dc7162851d1cbf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20=C3=87al=C4=B1=C5=9Fkan?= <13554944+thecaliskan@users.noreply.github.com> Date: Mon, 10 Nov 2025 16:13:45 +0300 Subject: [PATCH 1/4] Update Symfony package requirements for version 8.0 --- composer.json | 76 +++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/composer.json b/composer.json index 605e82a5e74..8589a8d0f32 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "dev-main": "4.3.x-dev" }, "symfony": { - "require": "^6.4 || ^7.1" + "require": "^6.4 || ^7.1 || ^8.0" }, "pmu": { "projects": [ @@ -110,15 +110,15 @@ "psr/cache": "^1.0 || ^2.0 || ^3.0", "psr/container": "^1.0 || ^2.0", "symfony/deprecation-contracts": "^3.1", - "symfony/http-foundation": "^6.4 || ^7.0", - "symfony/http-kernel": "^6.4 || ^7.0", - "symfony/property-access": "^6.4 || ^7.0", - "symfony/property-info": "^6.4 || ^7.1", - "symfony/serializer": "^6.4 || ^7.0", + "symfony/http-foundation": "^6.4 || ^7.0 || ^8.0", + "symfony/http-kernel": "^6.4 || ^7.0 || ^8.0", + "symfony/property-access": "^6.4 || ^7.0 || ^8.0", + "symfony/property-info": "^6.4 || ^7.1 || ^8.0", + "symfony/serializer": "^6.4 || ^7.0 || ^8.0", "symfony/translation-contracts": "^3.3", - "symfony/type-info": "^7.3 || 7.4.x-dev", - "symfony/validator": "^6.4 || ^7.1", - "symfony/web-link": "^6.4 || ^7.1", + "symfony/type-info": "^7.3 || 7.4.x-dev || ^8.0", + "symfony/validator": "^6.4 || ^7.1 || ^8.0", + "symfony/web-link": "^6.4 || ^7.1 || ^8.0", "willdurand/negotiation": "^3.1" }, "require-dev": { @@ -162,38 +162,38 @@ "soyuka/contexts": "^3.3.10", "soyuka/pmu": "^0.2.0", "soyuka/stubs-mongodb": "^1.0", - "symfony/asset": "^6.4 || ^7.0", - "symfony/browser-kit": "^6.4 || ^7.0", - "symfony/cache": "^6.4 || ^7.0", - "symfony/config": "^6.4 || ^7.0", - "symfony/console": "^6.4 || ^7.0", - "symfony/css-selector": "^6.4 || ^7.0", - "symfony/dependency-injection": "^6.4 || ^7.0", - "symfony/doctrine-bridge": "^6.4.2 || ^7.1", - "symfony/dom-crawler": "^6.4 || ^7.0", - "symfony/error-handler": "^6.4 || ^7.0", - "symfony/event-dispatcher": "^6.4 || ^7.0", - "symfony/expression-language": "^6.4 || ^7.0", - "symfony/finder": "^6.4 || ^7.0", - "symfony/form": "^6.4 || ^7.0", - "symfony/framework-bundle": "^6.4 || ^7.0 || 7.4.x-dev", - "symfony/http-client": "^6.4 || ^7.0", - "symfony/intl": "^6.4 || ^7.0", - "symfony/json-streamer": "7.4.x-dev", + "symfony/asset": "^6.4 || ^7.0 || ^8.0", + "symfony/browser-kit": "^6.4 || ^7.0 || ^8.0", + "symfony/cache": "^6.4 || ^7.0 || ^8.0", + "symfony/config": "^6.4 || ^7.0 || ^8.0", + "symfony/console": "^6.4 || ^7.0 || ^8.0", + "symfony/css-selector": "^6.4 || ^7.0 || ^8.0", + "symfony/dependency-injection": "^6.4 || ^7.0 || ^8.0", + "symfony/doctrine-bridge": "^6.4.2 || ^7.1 || ^8.0", + "symfony/dom-crawler": "^6.4 || ^7.0 || ^8.0", + "symfony/error-handler": "^6.4 || ^7.0 || ^8.0", + "symfony/event-dispatcher": "^6.4 || ^7.0 || ^8.0", + "symfony/expression-language": "^6.4 || ^7.0 || ^8.0", + "symfony/finder": "^6.4 || ^7.0 || ^8.0", + "symfony/form": "^6.4 || ^7.0 || ^8.0", + "symfony/framework-bundle": "^6.4 || ^7.0 || 7.4.x-dev || ^8.0", + "symfony/http-client": "^6.4 || ^7.0 || ^8.0", + "symfony/intl": "^6.4 || ^7.0 || ^8.0", + "symfony/json-streamer": "7.4.x-dev || ^8.0", "symfony/maker-bundle": "^1.24", "symfony/mercure-bundle": "*", - "symfony/messenger": "^6.4 || ^7.0", - "symfony/object-mapper": "7.4.x-dev", - "symfony/routing": "^6.4 || ^7.0", - "symfony/security-bundle": "^6.4 || ^7.0", - "symfony/security-core": "^6.4 || ^7.0", - "symfony/stopwatch": "^6.4 || ^7.0", + "symfony/messenger": "^6.4 || ^7.0 || ^8.0", + "symfony/object-mapper": "7.4.x-dev || ^8.0", + "symfony/routing": "^6.4 || ^7.0 || ^8.0", + "symfony/security-bundle": "^6.4 || ^7.0 || ^8.0", + "symfony/security-core": "^6.4 || ^7.0 || ^8.0", + "symfony/stopwatch": "^6.4 || ^7.0 || ^8.0", "symfony/string": "^6.4 || ^7.0", - "symfony/twig-bundle": "^6.4 || ^7.0", - "symfony/uid": "^6.4 || ^7.0", - "symfony/validator": "^6.4 || ^7.0", - "symfony/web-profiler-bundle": "^6.4 || ^7.0", - "symfony/yaml": "^6.4 || ^7.0", + "symfony/twig-bundle": "^6.4 || ^7.0 || ^8.0", + "symfony/uid": "^6.4 || ^7.0 || ^8.0", + "symfony/validator": "^6.4 || ^7.0 || ^8.0", + "symfony/web-profiler-bundle": "^6.4 || ^7.0 || ^8.0", + "symfony/yaml": "^6.4 || ^7.0 || ^8.0", "twig/twig": "^1.42.3 || ^2.12 || ^3.0", "webonyx/graphql-php": "^15.0" }, From ebb5e224c432f1fa44e3fe1fb0763488caa38002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20=C3=87al=C4=B1=C5=9Fkan?= <13554944+thecaliskan@users.noreply.github.com> Date: Mon, 10 Nov 2025 16:21:35 +0300 Subject: [PATCH 2/4] Enable PHPDoc parser in configuration test --- tests/Symfony/Bundle/DependencyInjection/ConfigurationTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Symfony/Bundle/DependencyInjection/ConfigurationTest.php b/tests/Symfony/Bundle/DependencyInjection/ConfigurationTest.php index 7a8a7b54cd4..657c418871c 100644 --- a/tests/Symfony/Bundle/DependencyInjection/ConfigurationTest.php +++ b/tests/Symfony/Bundle/DependencyInjection/ConfigurationTest.php @@ -237,6 +237,7 @@ private function runDefaultConfigTests(array $doctrineIntegrationsToLoad = ['orm 'serializer' => [ 'hydra_prefix' => null, ], + 'enable_phpdoc_parser' => true, ], $config); } From be95f9a5f81edd1cddbee9b5c5cdd4a566869d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20=C3=87al=C4=B1=C5=9Fkan?= <13554944+thecaliskan@users.noreply.github.com> Date: Mon, 10 Nov 2025 16:36:06 +0300 Subject: [PATCH 3/4] Fixed CS --- src/Symfony/Bundle/Resources/config/jsonld.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/Resources/config/jsonld.php b/src/Symfony/Bundle/Resources/config/jsonld.php index b16d6a0c221..57117fb96ca 100644 --- a/src/Symfony/Bundle/Resources/config/jsonld.php +++ b/src/Symfony/Bundle/Resources/config/jsonld.php @@ -42,7 +42,7 @@ '%api_platform.serializer.default_context%', service('api_platform.security.resource_access_checker')->ignoreOnInvalid(), service('api_platform.http_cache.tag_collector')->ignoreOnInvalid(), - service('api_platform.metadata.operation.metadata_factory')->ignoreOnInvalid() + service('api_platform.metadata.operation.metadata_factory')->ignoreOnInvalid(), ]) ->tag('serializer.normalizer', ['priority' => -890]); From 896b15d5a5f3f59cc4bdec99edf427f0505db43b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20=C3=87al=C4=B1=C5=9Fkan?= <13554944+thecaliskan@users.noreply.github.com> Date: Mon, 10 Nov 2025 17:04:58 +0300 Subject: [PATCH 4/4] Add optional Vote parameter to voteOnAttribute method --- .../TestBundle/Security/SecuredDummyAttributeBasedVoter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Fixtures/TestBundle/Security/SecuredDummyAttributeBasedVoter.php b/tests/Fixtures/TestBundle/Security/SecuredDummyAttributeBasedVoter.php index a934b4c8774..fa59e7add14 100644 --- a/tests/Fixtures/TestBundle/Security/SecuredDummyAttributeBasedVoter.php +++ b/tests/Fixtures/TestBundle/Security/SecuredDummyAttributeBasedVoter.php @@ -15,6 +15,7 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authorization\Voter\Voter; +use Symfony\Component\Security\Core\Authorization\Voter\Vote; use Symfony\Component\Security\Core\User\UserInterface; final class SecuredDummyAttributeBasedVoter extends Voter @@ -38,7 +39,7 @@ protected function supports(string $attribute, mixed $subject): bool return \in_array($subject, array_keys(self::RBAC), true); } - protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool + protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token, ?Symfony\Component\Security\Core\Authorization\Voter\Vote $vote = null): bool { $user = $token->getUser(); if (!$user instanceof UserInterface || !\is_string($subject)) {