Skip to content

Commit 937f293

Browse files
author
Jeremiah VALERIE
committed
Fix some Symfony deprecation messages
1 parent 8f77a03 commit 937f293

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/DependencyInjection/Configuration.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition;
2020
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
2121
use Symfony\Component\Config\Definition\ConfigurationInterface;
22+
use Symfony\Component\HttpKernel\Kernel;
2223
use function array_keys;
2324
use function is_array;
2425
use function is_int;
@@ -207,6 +208,16 @@ private function definitionsSchemaSection(): ArrayNodeDefinition
207208
/** @var ArrayNodeDefinition $node */
208209
$node = $builder->getRootNode();
209210

211+
if (Kernel::VERSION_ID >= 50100) {
212+
$deprecatedArgs = [
213+
'overblog/graphql-bundle',
214+
'1.0',
215+
'The "%path%.%node%" configuration is deprecated and will be removed in 1.0. Add the "overblog_graphql.resolver_map" tag to the services instead.',
216+
];
217+
} else {
218+
$deprecatedArgs = ['The "%path%.%node%" configuration is deprecated since version 0.13 and will be removed in 1.0. Add the "overblog_graphql.resolver_map" tag to the services instead.'];
219+
}
220+
210221
// @phpstan-ignore-next-line
211222
$node
212223
->beforeNormalization()
@@ -223,7 +234,7 @@ private function definitionsSchemaSection(): ArrayNodeDefinition
223234
->arrayNode('resolver_maps')
224235
->defaultValue([])
225236
->prototype('scalar')->end()
226-
->setDeprecated('The "%path%.%node%" configuration is deprecated since version 0.13 and will be removed in 1.0. Add the "overblog_graphql.resolver_map" tag to the services instead.')
237+
->setDeprecated(...$deprecatedArgs)
227238
->end()
228239
->arrayNode('types')
229240
->defaultValue([])

tests/Functional/App/config/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ framework:
33
secret: test
44
router:
55
resource: "%kernel.project_dir%/config/routing.yml"
6+
utf8: true
67
profiler:
78
enabled: false
89

0 commit comments

Comments
 (0)