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

@@ -23,10 +23,12 @@ use Symfony\Component\DependencyInjection\Reference;
*/
class CheckExceptionOnInvalidReferenceBehaviorPass extends AbstractRecursivePass
{
private $serviceLocatorContextIds = [];
protected bool $skipScalars = true;
private array $serviceLocatorContextIds = [];
/**
* {@inheritdoc}
* @return void
*/
public function process(ContainerBuilder $container)
{
@@ -37,13 +39,13 @@ class CheckExceptionOnInvalidReferenceBehaviorPass extends AbstractRecursivePass
}
try {
return parent::process($container);
parent::process($container);
} finally {
$this->serviceLocatorContextIds = [];
}
}
protected function processValue($value, bool $isRoot = false)
protected function processValue(mixed $value, bool $isRoot = false): mixed
{
if (!$value instanceof Reference) {
return parent::processValue($value, $isRoot);
@@ -90,12 +92,12 @@ class CheckExceptionOnInvalidReferenceBehaviorPass extends AbstractRecursivePass
{
$alternatives = [];
foreach ($this->container->getServiceIds() as $knownId) {
if ('' === $knownId || '.' === $knownId[0]) {
if ('' === $knownId || '.' === $knownId[0] || $knownId === $this->currentId) {
continue;
}
$lev = levenshtein($id, $knownId);
if ($lev <= \strlen($id) / 3 || false !== strpos($knownId, $id)) {
if ($lev <= \strlen($id) / 3 || str_contains($knownId, $id)) {
$alternatives[] = $knownId;
}
}