8000 Update value_resolver.rst by athib · Pull Request #18388 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Update value_resolver.rst #18388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update value_resolver.rst
Replace return type from `array` to `iterable` as it is defined in `ValueResolverInterface`
  • Loading branch information
athib authored and javiereguiluz committed Jun 9, 2023
commit d8365d27db73f2fbca9a2f081f703736ace574cf
2 changes: 1 addition & 1 deletion controller/value_resolver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ values. That's why you must always return an array, even for single values::

class BookingIdValueResolver implements ValueResolverInterface
{
public function resolve(Request $request, ArgumentMetadata $argument): array
public function resolve(Request $request, ArgumentMetadata $argument): iterable
{
// get the argument type (e.g. BookingId)
$argumentType = $argument->getType();
Expand Down
0