mirror of
https://github.com/KnpLabs/KnpMarkdownBundle.git
synced 2026-03-14 20:55:51 +01:00
Avoid deprecation warning when using symfony/config >= 4.2
This commit is contained in:
parent
a97046ec63
commit
c2b7faa646
1 changed files with 4 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue