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

@@ -21,9 +21,9 @@ use Symfony\Component\DependencyInjection\Exception\EnvParameterException;
*/
class Compiler
{
private $passConfig;
private $log = [];
private $serviceReferenceGraph;
private PassConfig $passConfig;
private array $log = [];
private ServiceReferenceGraph $serviceReferenceGraph;
public function __construct()
{
@@ -31,22 +31,19 @@ class Compiler
$this->serviceReferenceGraph = new ServiceReferenceGraph();
}
/**
* @return PassConfig
*/
public function getPassConfig()
public function getPassConfig(): PassConfig
{
return $this->passConfig;
}
/**
* @return ServiceReferenceGraph
*/
public function getServiceReferenceGraph()
public function getServiceReferenceGraph(): ServiceReferenceGraph
{
return $this->serviceReferenceGraph;
}
/**
* @return void
*/
public function addPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0)
{
$this->passConfig->addPass($pass, $type, $priority);
@@ -54,26 +51,27 @@ class Compiler
/**
* @final
*
* @return void
*/
public function log(CompilerPassInterface $pass, string $message)
{
if (str_contains($message, "\n")) {
$message = str_replace("\n", "\n".\get_class($pass).': ', trim($message));
$message = str_replace("\n", "\n".$pass::class.': ', trim($message));
}
$this->log[] = \get_class($pass).': '.$message;
$this->log[] = $pass::class.': '.$message;
}
/**
* @return array
*/
public function getLog()
public function getLog(): array
{
return $this->log;
}
/**
* Run the Compiler and process all Passes.
*
* @return void
*/
public function compile(ContainerBuilder $container)
{
@@ -90,7 +88,6 @@ class Compiler
if ($msg !== $resolvedMsg = $container->resolveEnvPlaceholders($msg, null, $usedEnvs)) {
$r = new \ReflectionProperty($prev, 'message');
$r->setAccessible(true);
$r->setValue($prev, $resolvedMsg);
}
} while ($prev = $prev->getPrevious());