mirror of
https://github.com/KnpLabs/KnpMarkdownBundle.git
synced 2024-05-27 11:02:54 +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()
|
||||
{
|
||||
$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()
|
||||
->children()
|
||||
->arrayNode('parser')
|
||||
|
|
Loading…
Reference in a new issue