mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
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:
@@ -27,9 +27,11 @@ use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceExce
|
||||
*/
|
||||
class ResolveChildDefinitionsPass extends AbstractRecursivePass
|
||||
{
|
||||
private $currentPath;
|
||||
protected bool $skipScalars = true;
|
||||
|
||||
protected function processValue($value, bool $isRoot = false)
|
||||
private array $currentPath;
|
||||
|
||||
protected function processValue(mixed $value, bool $isRoot = false): mixed
|
||||
{
|
||||
if (!$value instanceof Definition) {
|
||||
return parent::processValue($value, $isRoot);
|
||||
@@ -63,7 +65,6 @@ class ResolveChildDefinitionsPass extends AbstractRecursivePass
|
||||
throw $e;
|
||||
} catch (ExceptionInterface $e) {
|
||||
$r = new \ReflectionProperty($e, 'message');
|
||||
$r->setAccessible(true);
|
||||
$r->setValue($e, sprintf('Service "%s": %s', $this->currentId, $e->getMessage()));
|
||||
|
||||
throw $e;
|
||||
@@ -139,13 +140,9 @@ class ResolveChildDefinitionsPass extends AbstractRecursivePass
|
||||
if (isset($changes['lazy'])) {
|
||||
$def->setLazy($definition->isLazy());
|
||||
}
|
||||
if (isset($changes['deprecated'])) {
|
||||
if ($definition->isDeprecated()) {
|
||||
$deprecation = $definition->getDeprecation('%service_id%');
|
||||
$def->setDeprecated($deprecation['package'], $deprecation['version'], $deprecation['message']);
|
||||
} else {
|
||||
$def->setDeprecated(false);
|
||||
}
|
||||
if (isset($changes['deprecated']) && $definition->isDeprecated()) {
|
||||
$deprecation = $definition->getDeprecation('%service_id%');
|
||||
$def->setDeprecated($deprecation['package'], $deprecation['version'], $deprecation['message']);
|
||||
}
|
||||
if (isset($changes['autowired'])) {
|
||||
$def->setAutowired($definition->isAutowired());
|
||||
|
||||
Reference in New Issue
Block a user