From 3b7a3165e0ba5cc39b7edb1bd39e1ec927f7bc2a Mon Sep 17 00:00:00 2001 From: Borislav Kosun <16259603+bkosun@users.noreply.github.com> Date: Wed, 25 Feb 2026 03:13:31 +0200 Subject: [PATCH] fix(symfony): allow toggling GraphQL Playground to ensure BC --- src/Symfony/Bundle/DependencyInjection/Configuration.php | 3 ++- tests/Symfony/Bundle/DependencyInjection/ConfigurationTest.php | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/DependencyInjection/Configuration.php index 354b7b1f2d8..f20a9fb3cc2 100644 --- a/src/Symfony/Bundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/DependencyInjection/Configuration.php @@ -277,7 +277,8 @@ private function addGraphQlSection(ArrayNodeDefinition $rootNode): void ->integerNode('max_query_depth')->defaultValue(20) ->end() ->arrayNode('graphql_playground') - ->setDeprecated('api-platform/core', '4.0') + ->setDeprecated('api-platform/core', '4.0', 'The "graphql_playground" configuration is deprecated and will be ignored.') + ->canBeEnabled() ->end() ->integerNode('max_query_complexity')->defaultValue(500) ->end() diff --git a/tests/Symfony/Bundle/DependencyInjection/ConfigurationTest.php b/tests/Symfony/Bundle/DependencyInjection/ConfigurationTest.php index d9e53850166..356a31b4838 100644 --- a/tests/Symfony/Bundle/DependencyInjection/ConfigurationTest.php +++ b/tests/Symfony/Bundle/DependencyInjection/ConfigurationTest.php @@ -132,6 +132,9 @@ private function runDefaultConfigTests(array $doctrineIntegrationsToLoad = ['orm 'enabled' => true, ], ], + 'graphql_playground' => [ + 'enabled' => false, + ], ], 'elasticsearch' => [ 'enabled' => false,