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 (!isset($trace[3]['object']) || !$trace[3]['object'] instanceof self) {
79
+
thrownew \ErrorException(sprintf('Function "%s()" must be called in a "%s" context.', $trace[1]['function'], __CLASS__), 0, E_ERROR, $trace[1]['file'], $trace[1]['line']);
thrownewInvalidArgumentException(sprintf('"%s()" can be used only at the root of service configuration files.', $value::FACTORY));
130
+
}
131
+
132
+
switch (true) {
133
+
casenull === $value:
134
+
caseis_scalar($value):
135
+
case$valueinstanceof ArgumentInterface:
136
+
case$valueinstanceof Definition:
137
+
case$valueinstanceof Expression:
138
+
case$valueinstanceof Parameter:
139
+
case$valueinstanceof Reference:
140
+
return$value;
141
+
}
142
+
143
+
thrownewInvalidArgumentException(sprintf('Cannot use values of type "%s" in service configuration files.', is_object($value) ? get_class($value) : gettype($value)));
0 commit comments