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

@@ -31,11 +31,11 @@ final class CompletionInput extends ArgvInput
public const TYPE_OPTION_NAME = 'option_name';
public const TYPE_NONE = 'none';
private $tokens;
private $currentIndex;
private $completionType;
private $completionName = null;
private $completionValue = '';
private array $tokens;
private int $currentIndex;
private string $completionType;
private ?string $completionName = null;
private string $completionValue = '';
/**
* Converts a terminal string into tokens.
@@ -64,9 +64,6 @@ final class CompletionInput extends ArgvInput
return $input;
}
/**
* {@inheritdoc}
*/
public function bind(InputDefinition $definition): void
{
parent::bind($definition);
@@ -84,7 +81,7 @@ final class CompletionInput extends ArgvInput
return;
}
if (null !== $option && $option->acceptValue()) {
if ($option?->acceptValue()) {
$this->completionType = self::TYPE_OPTION_VALUE;
$this->completionName = $option->getName();
$this->completionValue = $optionValue ?: (!str_starts_with($optionToken, '--') ? substr($optionToken, 2) : '');
@@ -97,7 +94,7 @@ final class CompletionInput extends ArgvInput
if ('-' === $previousToken[0] && '' !== trim($previousToken, '-')) {
// check if previous option accepted a value
$previousOption = $this->getOptionFromToken($previousToken);
if (null !== $previousOption && $previousOption->acceptValue()) {
if ($previousOption?->acceptValue()) {
$this->completionType = self::TYPE_OPTION_VALUE;
$this->completionName = $previousOption->getName();
$this->completionValue = $relevantToken;
@@ -144,7 +141,9 @@ final class CompletionInput extends ArgvInput
* TYPE_OPTION_NAME when completing the name of an input option
* TYPE_NONE when nothing should be completed
*
* @return string One of self::TYPE_* constants. TYPE_OPTION_NAME and TYPE_NONE are already implemented by the Console component
* TYPE_OPTION_NAME and TYPE_NONE are already implemented by the Console component.
*
* @return self::TYPE_*
*/
public function getCompletionType(): string
{
@@ -183,7 +182,7 @@ final class CompletionInput extends ArgvInput
{
try {
return parent::parseToken($token, $parseOptions);
} catch (RuntimeException $e) {
} catch (RuntimeException) {
// suppress errors, completed input is almost never valid
}