Skip to content
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

Improve param fetcher listener docs #2391

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions Resources/doc/param_fetcher_listener.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ configured for the matched controller so that the user does not need to do this
/**
* @QueryParam(name="page", requirements="\d+", default="1", description="Page of the overview.")
* Will look for a page query parameter, ie. ?page=XX
* If not passed it will be automatically be set to the default of "1"
* If passed but doesn't match the requirement "\d+" it will be also be set to the default of "1"
* If not passed it will be automatically set to the default of "1"
* If passed but doesn't match the requirement "\d+" it will also be set to the default of "1"
* Note that if the value matches the default then no validation is run.
* So make sure the default value really matches your expectations.
*
* @QueryParam(name="count", requirements="\d+", strict=true, nullable=true, description="Item count limit")
* In some case you also want to have a strict requirements but accept a null value, this is possible
* In some cases you also want to have a strict requirement but accept a null value, this is possible
* thanks to the nullable option.
* If ?count= parameter is set, the requirements will be checked strictly, if not, the null value will be used.
* If you set the strict parameter without a nullable option, this will result in an error if the parameter is
Expand Down