/**
* @deprecated since Symfony 6.2, use resolve() instead
*/
public function supports(Request
$request, ArgumentMetadata
$argument): bool
{ @
trigger_deprecation('symfony/http-kernel', '6.2', 'The "%s()" method is deprecated, use "resolve()" instead.', __METHOD__
);
if (!
is_subclass_of($argument->
getType(), \BackedEnum::
class)) { return false;
} if ($argument->
isVariadic()) { // only target route path parameters, which cannot be variadic.
return false;
} // do not support if no value can be resolved at all
// letting the \Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver be used
// or \Symfony\Component\HttpKernel\Controller\ArgumentResolver fail with a meaningful error.
return $request->attributes->
has($argument->
getName());
} public function resolve(Request
$request, ArgumentMetadata
$argument): iterable
{