Skip to content

Commit b8a65c5

Browse files
jderussenicolas-grekas
authored andcommitted
Remove deprecate session service
1 parent f04fd29 commit b8a65c5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Compiler/RegisterServiceSubscribersPass.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed
6868
throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $this->currentId, ServiceSubscriberInterface::class));
6969
}
7070
$class = $r->name;
71+
// to remove when symfony/dependency-injection will stop being compatible with symfony/framework-bundle<6.0
7172
$replaceDeprecatedSession = $this->container->has('.session.deprecated') && $r->isSubclassOf(AbstractController::class);
7273
$subscriberMap = [];
7374

@@ -89,7 +90,7 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed
8990
}
9091
if ($replaceDeprecatedSession && SessionInterface::class === $type) {
9192
// This prevents triggering the deprecation when building the container
92-
// Should be removed in Symfony 6.0
93+
// to remove when symfony/dependency-injection will stop being compatible with symfony/framework-bundle<6.0
9394
$type = '.session.deprecated';
9495
}
9596
$serviceMap[$key] = new Reference($type);

0 commit comments

Comments
 (0)