$class =
$value->
getClass();
if (!
$r =
$this->container->
getReflectionClass($class)) { throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.',
$class,
$this->currentId
));
} if (!
$r->
isSubclassOf(ServiceSubscriberInterface::
class)) { throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".',
$this->currentId, ServiceSubscriberInterface::
class));
} $class =
$r->name;
// to remove when symfony/dependency-injection will stop being compatible with symfony/framework-bundle<6.0
$replaceDeprecatedSession =
$this->container->
has('.session.deprecated'
) &&
$r->
isSubclassOf(AbstractController::
class);
$subscriberMap =
[];
foreach ($class::
getSubscribedServices() as $key =>
$type) { $attributes =
[];
if ($type instanceof SubscribedService
) { $key =
$type->key;
$attributes =
$type->attributes;
$type =
($type->nullable ? '?' : ''
).
($type->type ??
throw new InvalidArgumentException(sprintf('When "%s::getSubscribedServices()" returns "%s", a type must be set.',
$class, SubscribedService::
class)));
}