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

@@ -29,8 +29,8 @@ final class TranslationNodeVisitor extends AbstractNodeVisitor
{
public const UNDEFINED_DOMAIN = '_undefined';
private $enabled = false;
private $messages = [];
private bool $enabled = false;
private array $messages = [];
public function enable(): void
{
@@ -49,9 +49,6 @@ final class TranslationNodeVisitor extends AbstractNodeVisitor
return $this->messages;
}
/**
* {@inheritdoc}
*/
protected function doEnterNode(Node $node, Environment $env): Node
{
if (!$this->enabled) {
@@ -59,9 +56,9 @@ final class TranslationNodeVisitor extends AbstractNodeVisitor
}
if (
$node instanceof FilterExpression &&
'trans' === $node->getNode('filter')->getAttribute('value') &&
$node->getNode('node') instanceof ConstantExpression
$node instanceof FilterExpression
&& 'trans' === $node->getNode('filter')->getAttribute('value')
&& $node->getNode('node') instanceof ConstantExpression
) {
// extract constant nodes with a trans filter
$this->messages[] = [
@@ -69,8 +66,8 @@ final class TranslationNodeVisitor extends AbstractNodeVisitor
$this->getReadDomainFromArguments($node->getNode('arguments'), 1),
];
} elseif (
$node instanceof FunctionExpression &&
't' === $node->getAttribute('name')
$node instanceof FunctionExpression
&& 't' === $node->getAttribute('name')
) {
$nodeArguments = $node->getNode('arguments');
@@ -87,10 +84,10 @@ final class TranslationNodeVisitor extends AbstractNodeVisitor
$node->hasNode('domain') ? $this->getReadDomainFromNode($node->getNode('domain')) : null,
];
} elseif (
$node instanceof FilterExpression &&
'trans' === $node->getNode('filter')->getAttribute('value') &&
$node->getNode('node') instanceof ConcatBinary &&
$message = $this->getConcatValueFromNode($node->getNode('node'), null)
$node instanceof FilterExpression
&& 'trans' === $node->getNode('filter')->getAttribute('value')
&& $node->getNode('node') instanceof ConcatBinary
&& $message = $this->getConcatValueFromNode($node->getNode('node'), null)
) {
$this->messages[] = [
$message,
@@ -101,17 +98,11 @@ final class TranslationNodeVisitor extends AbstractNodeVisitor
return $node;
}
/**
* {@inheritdoc}
*/
protected function doLeaveNode(Node $node, Environment $env): ?Node
{
return $node;
}
/**
* {@inheritdoc}
*/
public function getPriority(): int
{
return 0;