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
thrownew \LogicException(sprintf('Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.', $expectedAlias, $extension->getAlias()));
81
+
thrownew \LogicException(\sprintf('Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.', $expectedAlias, $extension->getAlias()));
Copy file name to clipboardExpand all lines: Controller/ArgumentResolver.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ public function getArguments(Request $request, callable $controller, ?\Reflectio
60
60
if ($attribute->disabled) {
61
61
$disabledResolvers[$attribute->resolver] = true;
62
62
} elseif ($resolverName) {
63
-
thrownew \LogicException(sprintf('You can only pin one resolver per argument, but argument "$%s" of "%s()" has more.', $metadata->getName(), $this->getPrettyName($controller)));
63
+
thrownew \LogicException(\sprintf('You can only pin one resolver per argument, but argument "$%s" of "%s()" has more.', $metadata->getName(), $this->getPrettyName($controller)));
64
64
} else {
65
65
$resolverName = $attribute->resolver;
66
66
}
@@ -94,7 +94,7 @@ public function getArguments(Request $request, callable $controller, ?\Reflectio
94
94
}
95
95
96
96
if (1 < $count && !$metadata->isVariadic()) {
97
-
thrownew \InvalidArgumentException(sprintf('"%s::resolve()" must yield at most one value for non-variadic arguments.', get_debug_type($resolver)));
97
+
thrownew \InvalidArgumentException(\sprintf('"%s::resolve()" must yield at most one value for non-variadic arguments.', get_debug_type($resolver)));
98
98
}
99
99
100
100
if ($count) {
@@ -103,11 +103,11 @@ public function getArguments(Request $request, callable $controller, ?\Reflectio
103
103
}
104
104
105
105
if (!$resolverinstanceof ValueResolverInterface) {
106
-
thrownew \InvalidArgumentException(sprintf('"%s::resolve()" must yield at least one value.', get_debug_type($resolver)));
106
+
thrownew \InvalidArgumentException(\sprintf('"%s::resolve()" must yield at least one value.', get_debug_type($resolver)));
107
107
}
108
108
}
109
109
110
-
thrownew \RuntimeException(sprintf('Controller "%s" requires that you provide a value for the "$%s" argument. Either the argument is nullable and no null value has been provided, no default value has been provided or there is a non-optional argument after this one.', $this->getPrettyName($controller), $metadata->getName()));
110
+
thrownew \RuntimeException(\sprintf('Controller "%s" requires that you provide a value for the "$%s" argument. Either the argument is nullable and no null value has been provided, no default value has been provided or there is a non-optional argument after this one.', $this->getPrettyName($controller), $metadata->getName()));
Copy file name to clipboardExpand all lines: Controller/ArgumentResolver/BackedEnumValueResolver.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ public function resolve(Request $request, ArgumentMetadata $argument): iterable
78
78
}
79
79
80
80
if (!\is_int($value) && !\is_string($value)) {
81
-
thrownew \LogicException(sprintf('Could not resolve the "%s $%s" controller argument: expecting an int or string, got "%s".', $argument->getType(), $argument->getName(), get_debug_type($value)));
81
+
thrownew \LogicException(\sprintf('Could not resolve the "%s $%s" controller argument: expecting an int or string, got "%s".', $argument->getType(), $argument->getName(), get_debug_type($value)));
82
82
}
83
83
84
84
/** @var class-string<\BackedEnum> $enumType */
@@ -87,7 +87,7 @@ public function resolve(Request $request, ArgumentMetadata $argument): iterable
87
87
try {
88
88
return [$enumType::from($value)];
89
89
} catch (\ValueError|\TypeError$e) {
90
-
thrownewNotFoundHttpException(sprintf('Could not resolve the "%s $%s" controller argument: ', $argument->getType(), $argument->getName()).$e->getMessage(), $e);
90
+
thrownewNotFoundHttpException(\sprintf('Could not resolve the "%s $%s" controller argument: ', $argument->getType(), $argument->getName()).$e->getMessage(), $e);
Copy file name to clipboardExpand all lines: Controller/ArgumentResolver/NotTaggedControllerValueResolver.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -82,8 +82,8 @@ public function resolve(Request $request, ArgumentMetadata $argument): array
82
82
return [];
83
83
}
84
84
85
-
$what = sprintf('argument $%s of "%s()"', $argument->getName(), $controller);
86
-
$message = sprintf('Could not resolve %s, maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?', $what);
85
+
$what = \sprintf('argument $%s of "%s()"', $argument->getName(), $controller);
86
+
$message = \sprintf('Could not resolve %s, maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?', $what);
@@ -80,8 +80,8 @@ public function resolve(Request $request, ArgumentMetadata $argument): array
80
80
default => match ($enumType = is_subclass_of($type, \BackedEnum::class) ? (new \ReflectionEnum($type))->getBackingType()->getName() : null) {
81
81
'int' => \FILTER_VALIDATE_INT,
82
82
'string' => \FILTER_DEFAULT,
83
-
default => thrownew \LogicException(sprintf('#[MapQueryParameter] cannot be used on controller argument "%s$%s" of type "%s"; one of array, string, int, float, bool or \BackedEnum should be used.', $argument->isVariadic() ? '...' : '', $argument->getName(), $type ?? 'mixed')),
84
-
}
83
+
default => thrownew \LogicException(\sprintf('#[MapQueryParameter] cannot be used on controller argument "%s$%s" of type "%s"; one of array, string, int, float, bool or \BackedEnum should be used.', $argument->isVariadic() ? '...' : '', $argument->getName(), $type ?? 'mixed')),
0 commit comments