Skip to content

Document routing inline requirements and defaults for host #14671

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
Dec 9, 2020
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
10 changes: 10 additions & 0 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,11 @@ concise, but it can decrease route readability when requirements are complex:
// ...
};

.. versionadded:: 5.2

Since Symfony 5.2, inline parameter requirements are also supported in the
host. Before Symfony 5.2, they were supported in the path only.

Optional Parameters
~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -984,6 +989,11 @@ parameter:
To give a ``null`` default value to any parameter, add nothing after the
``?`` character (e.g. ``/blog/{page?}``).

.. versionadded:: 5.2

Since Symfony 5.2, inline parameter default values are also supported in
the host. Before Symfony 5.2, they were supported in the path only.

Priority Parameter
~~~~~~~~~~~~~~~~~~

Expand Down