mirror of
https://github.com/KnpLabs/KnpMarkdownBundle.git
synced 2024-06-17 13:15:04 +02:00
Merge pull request #98 from antograssiot/patch-1
Avoid deprecation warning when using symfony/config >= 4.2
This commit is contained in:
commit
d2824faf99
|
@ -14,9 +14,11 @@ class Configuration implements ConfigurationInterface
|
||||||
*/
|
*/
|
||||||
public function getConfigTreeBuilder()
|
public function getConfigTreeBuilder()
|
||||||
{
|
{
|
||||||
$treeBuilder = new TreeBuilder();
|
$treeBuilder = new TreeBuilder('knp_markdown');
|
||||||
|
// BC layer for symfony/config < 4.2
|
||||||
|
$rootNode = method_exists($treeBuilder, 'getRootNode') ? $treeBuilder->getRootNode() : $treeBuilder->root('knp_markdown');
|
||||||
|
|
||||||
$treeBuilder->root('knp_markdown', 'array')
|
$rootNode
|
||||||
->addDefaultsIfNotSet()
|
->addDefaultsIfNotSet()
|
||||||
->children()
|
->children()
|
||||||
->arrayNode('parser')
|
->arrayNode('parser')
|
||||||
|
|
Loading…
Reference in a new issue