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
thrownewInvalidArgumentException(\sprintf('The return value in config file "%s" is expected to be a RouteCollection, an array or a configurator callable, but got "%s".', $path, get_debug_type($result)));
\Closure::bind(function () use ($collection, $routes, $path, $file) {
121
-
foreach ($routesas$name => $config) {
122
-
if (str_starts_with($when = $name, 'when@')) {
123
-
if (!$this->env || 'when@'.$this->env !== $name) {
124
-
continue;
125
-
}
126
-
$when .= '" when "@'.$this->env;
127
-
} elseif (!$configinstanceof RoutesConfig) {
128
-
$config = [$name => $config];
129
-
} elseif (!\is_int($name)) {
130
-
thrownewInvalidArgumentException(\sprintf('Invalid key "%s" returned for the "%s" config builder; none or "when@%%env%%" expected in file "%s".', $name, get_debug_type($config), $path));
131
-
}
132
-
133
-
if ($configinstanceof RoutesConfig) {
134
-
$config = $config->routes;
135
-
} elseif (!\is_array($config)) {
136
-
thrownewInvalidArgumentException(\sprintf('The "%s" key should contain an array in "%s".', $name, $path));
0 commit comments