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

@@ -39,8 +39,11 @@ class NodeBuilder implements NodeParentInterface
*
* @return $this
*/
public function setParent(ParentNodeDefinitionInterface $parent = null)
public function setParent(ParentNodeDefinitionInterface $parent = null): static
{
if (1 > \func_num_args()) {
trigger_deprecation('symfony/form', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
}
$this->parent = $parent;
return $this;
@@ -48,70 +51,56 @@ class NodeBuilder implements NodeParentInterface
/**
* Creates a child array node.
*
* @return ArrayNodeDefinition
*/
public function arrayNode(string $name)
public function arrayNode(string $name): ArrayNodeDefinition
{
return $this->node($name, 'array');
}
/**
* Creates a child scalar node.
*
* @return ScalarNodeDefinition
*/
public function scalarNode(string $name)
public function scalarNode(string $name): ScalarNodeDefinition
{
return $this->node($name, 'scalar');
}
/**
* Creates a child Boolean node.
*
* @return BooleanNodeDefinition
*/
public function booleanNode(string $name)
public function booleanNode(string $name): BooleanNodeDefinition
{
return $this->node($name, 'boolean');
}
/**
* Creates a child integer node.
*
* @return IntegerNodeDefinition
*/
public function integerNode(string $name)
public function integerNode(string $name): IntegerNodeDefinition
{
return $this->node($name, 'integer');
}
/**
* Creates a child float node.
*
* @return FloatNodeDefinition
*/
public function floatNode(string $name)
public function floatNode(string $name): FloatNodeDefinition
{
return $this->node($name, 'float');
}
/**
* Creates a child EnumNode.
*
* @return EnumNodeDefinition
*/
public function enumNode(string $name)
public function enumNode(string $name): EnumNodeDefinition
{
return $this->node($name, 'enum');
}
/**
* Creates a child variable node.
*
* @return VariableNodeDefinition
*/
public function variableNode(string $name)
public function variableNode(string $name): VariableNodeDefinition
{
return $this->node($name, 'variable');
}
@@ -129,12 +118,10 @@ class NodeBuilder implements NodeParentInterface
/**
* Creates a child node.
*
* @return NodeDefinition
*
* @throws \RuntimeException When the node type is not registered
* @throws \RuntimeException When the node class is not found
*/
public function node(?string $name, string $type)
public function node(?string $name, string $type): NodeDefinition
{
$class = $this->getNodeClass($type);
@@ -160,7 +147,7 @@ class NodeBuilder implements NodeParentInterface
*
* @return $this
*/
public function append(NodeDefinition $node)
public function append(NodeDefinition $node): static
{
if ($node instanceof BuilderAwareInterface) {
$builder = clone $this;
@@ -185,7 +172,7 @@ class NodeBuilder implements NodeParentInterface
*
* @return $this
*/
public function setNodeClass(string $type, string $class)
public function setNodeClass(string $type, string $class): static
{
$this->nodeMapping[strtolower($type)] = $class;
@@ -195,12 +182,10 @@ class NodeBuilder implements NodeParentInterface
/**
* Returns the class name of the node definition.
*
* @return string
*
* @throws \RuntimeException When the node type is not registered
* @throws \RuntimeException When the node class is not found
*/
protected function getNodeClass(string $type)
protected function getNodeClass(string $type): string
{
$type = strtolower($type);