1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace KunicMarko\SonataAnnotationBundle\DependencyInjection; |
||
6 | |||
7 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
||
8 | use Symfony\Component\Config\Definition\ConfigurationInterface; |
||
9 | |||
10 | /** |
||
11 | * @author Marko Kunic <[email protected]> |
||
12 | */ |
||
13 | final class Configuration implements ConfigurationInterface |
||
14 | { |
||
15 | public function getConfigTreeBuilder(): TreeBuilder |
||
16 | { |
||
17 | $treeBuilder = new TreeBuilder('sonata_annotation'); |
||
18 | |||
19 | if (\method_exists($treeBuilder, 'getRootNode')) { |
||
20 | $rootNode = $treeBuilder->getRootNode(); |
||
21 | } else { |
||
22 | // BC layer for symfony/config 4.1 and older |
||
23 | $rootNode = $treeBuilder->root('sonata_annotation'); |
||
0 ignored issues
–
show
|
|||
24 | } |
||
25 | |||
26 | $rootNode |
||
27 | ->children() |
||
28 | ->scalarNode('directory')->defaultNull()->end() |
||
29 | ->end(); |
||
30 | |||
31 | return $treeBuilder; |
||
32 | } |
||
33 | } |
||
34 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.