You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (\is_string($factory = $value->getFactory()) && str_starts_with($factory, '@=')) {
96
+
if (!class_exists(Expression::class)) {
97
+
thrownewLogicException('Expressions cannot be used in service factories without the ExpressionLanguage component. Try running "composer require symfony/expression-language".');
98
+
}
99
+
$factory = newExpression(substr($factory, 2));
100
+
}
101
+
if (($factory = $this->processValue($factory)) instanceof Expression) {
if (\is_string($factory = $value->getFactory()) && str_starts_with($factory, '@=')) {
141
+
if (!class_exists(Expression::class)) {
142
+
thrownewLogicException('Expressions cannot be used in service factories without the ExpressionLanguage component. Try running "composer require symfony/expression-language".');
thrownewInvalidArgumentException(sprintf('Invalid definition for service "%s": an array of references is expected as first argument when the "container.service_locator" tag is set, "%s" found for key "%s".', $this->currentId, get_debug_type($v), $k));
thrownewInvalidArgumentException(sprintf('Invalid service locator definition: only services can be referenced, "%s" found for key "%s". Inject parameter values using constructors instead.', get_debug_type($ref), $id));
108
-
}
109
-
$refMap[$id] = newServiceClosureArgument($ref);
101
+
foreach ($mapas$k => $v) {
102
+
$map[$k] = newServiceClosureArgument($v);
110
103
}
111
104
112
105
$locator = (newDefinition(ServiceLocator::class))
113
-
->addArgument($refMap)
106
+
->addArgument($map)
114
107
->addTag('container.service_locator');
115
108
116
109
if (null !== $callerId && $container->hasDefinition($callerId)) {
if (!class_exists(\Symfony\Component\ExpressionLanguage\ExpressionLanguage::class)) {
1587
-
thrownewLogicException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.');
1591
+
if (!class_exists(Expression::class)) {
1592
+
thrownewLogicException('Expressions cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".');
0 commit comments