Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\HttpKernel\Kernel;

class Configuration implements ConfigurationInterface
{
Expand Down Expand Up @@ -210,7 +211,7 @@ private function definitionsSchemaSection()
->arrayNode('resolver_maps')
->defaultValue([])
->prototype('scalar')->end()
->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.')
->setDeprecated(...$this->getDeprecationArgs())
->end()
->arrayNode('types')
->defaultValue([])
Expand All @@ -223,6 +224,20 @@ private function definitionsSchemaSection()
return $node;
}

/**
* BC layer for symfony/config <5.1 .
*/
private function getDeprecationArgs()
{
$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.';

if (Kernel::VERSION_ID < 50100) {
return [$msg];
}

return ['overblog/graphql-bundle', '0.13', $msg];
}

private function definitionsMappingsSection()
{
$builder = new TreeBuilder('mappings');
Expand Down