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

@@ -27,24 +27,21 @@ class VariableNode extends BaseNode implements PrototypeNodeInterface
protected $defaultValue;
protected $allowEmptyValue = true;
public function setDefaultValue($value)
/**
* @return void
*/
public function setDefaultValue(mixed $value)
{
$this->defaultValueSet = true;
$this->defaultValue = $value;
}
/**
* {@inheritdoc}
*/
public function hasDefaultValue()
public function hasDefaultValue(): bool
{
return $this->defaultValueSet;
}
/**
* {@inheritdoc}
*/
public function getDefaultValue()
public function getDefaultValue(): mixed
{
$v = $this->defaultValue;
@@ -55,6 +52,8 @@ class VariableNode extends BaseNode implements PrototypeNodeInterface
* Sets if this node is allowed to have an empty value.
*
* @param bool $boolean True if this entity will accept empty values
*
* @return void
*/
public function setAllowEmptyValue(bool $boolean)
{
@@ -62,7 +61,7 @@ class VariableNode extends BaseNode implements PrototypeNodeInterface
}
/**
* {@inheritdoc}
* @return void
*/
public function setName(string $name)
{
@@ -70,16 +69,13 @@ class VariableNode extends BaseNode implements PrototypeNodeInterface
}
/**
* {@inheritdoc}
* @return void
*/
protected function validateType($value)
protected function validateType(mixed $value)
{
}
/**
* {@inheritdoc}
*/
protected function finalizeValue($value)
protected function finalizeValue(mixed $value): mixed
{
// deny environment variables only when using custom validators
// this avoids ever passing an empty value to final validation closures
@@ -106,18 +102,12 @@ class VariableNode extends BaseNode implements PrototypeNodeInterface
return $value;
}
/**
* {@inheritdoc}
*/
protected function normalizeValue($value)
protected function normalizeValue(mixed $value): mixed
{
return $value;
}
/**
* {@inheritdoc}
*/
protected function mergeValues($leftSide, $rightSide)
protected function mergeValues(mixed $leftSide, mixed $rightSide): mixed
{
return $rightSide;
}
@@ -129,13 +119,9 @@ class VariableNode extends BaseNode implements PrototypeNodeInterface
* method may be overridden by subtypes to better match their understanding
* of empty data.
*
* @param mixed $value
*
* @return bool
*
* @see finalizeValue()
*/
protected function isValueEmpty($value)
protected function isValueEmpty(mixed $value): bool
{
return empty($value);
}