N°6934 - Symfony 6.4 - upgrade Symfony bundles to 6.4 (#580)

* Update Symfony lib to version ~6.4.0
* Update code missing return type
* Add an iTop general configuration entry to store application secret (Symfony mandatory parameter)
* Use dependency injection in ExceptionListener & UserProvider classes
This commit is contained in:
bdalsass
2023-12-05 13:56:56 +01:00
committed by GitHub
parent 863ab4560c
commit 27ce51ab07
1392 changed files with 44869 additions and 27799 deletions

View File

@@ -20,19 +20,26 @@ use Symfony\Component\Config\Definition\NodeInterface;
*/
class TreeBuilder implements NodeParentInterface
{
/**
* @var NodeInterface|null
*/
protected $tree;
/**
* @var NodeDefinition
*/
protected $root;
public function __construct(string $name, string $type = 'array', NodeBuilder $builder = null)
{
$builder = $builder ?? new NodeBuilder();
$builder ??= new NodeBuilder();
$this->root = $builder->node($name, $type)->setParent($this);
}
/**
* @return NodeDefinition|ArrayNodeDefinition The root node (as an ArrayNodeDefinition when the type is 'array')
*/
public function getRootNode(): NodeDefinition
public function getRootNode(): NodeDefinition|ArrayNodeDefinition
{
return $this->root;
}
@@ -40,19 +47,16 @@ class TreeBuilder implements NodeParentInterface
/**
* Builds the tree.
*
* @return NodeInterface
*
* @throws \RuntimeException
*/
public function buildTree()
public function buildTree(): NodeInterface
{
if (null !== $this->tree) {
return $this->tree;
}
return $this->tree = $this->root->getNode(true);
return $this->tree ??= $this->root->getNode(true);
}
/**
* @return void
*/
public function setPathSeparator(string $separator)
{
// unset last built as changing path separator changes all nodes