Skip to content

Commit b67a833

Browse files
authored
Merge pull request overblog#715 from murtukov/fix/issue-714
Fix issue overblog#714
2 parents 25e6a6b + 14939bf commit b67a833

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/DependencyInjection/Configuration.php

+16-1
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

2324
class Configuration implements ConfigurationInterface
2425
{
@@ -210,7 +211,7 @@ private function definitionsSchemaSection()
210211
->arrayNode('resolver_maps')
211212
->defaultValue([])
212213
->prototype('scalar')->end()
213-
->setDeprecated('The "%path%.%node%" configuration is deprecated since version 0.13 and will be removed in 0.14. Add the "overblog_graphql.resolver_map" tag to the services instead.')
214+
->setDeprecated(...$this->getDeprecationArgs())
214215
->end()
215216
->arrayNode('types')
216217
->defaultValue([])
@@ -223,6 +224,20 @@ private function definitionsSchemaSection()
223224
return $node;
224225
}
225226

227+
/**
228+
* BC layer for symfony/config <5.1 .
229+
*/
230+
private function getDeprecationArgs()
231+
{
232+
$msg = '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.';
233+
234+
if (Kernel::VERSION_ID < 50100) {
235+
return [$msg];
236+
}
237+
238+
return ['overblog/graphql-bundle', '0.13', $msg];
239+
}
240+
226241
private function definitionsMappingsSection()
227242
{
228243
$builder = new TreeBuilder('mappings');

0 commit comments

Comments
 (0)