File tree 1 file changed +10
-10
lines changed
1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -790,11 +790,6 @@ concise, but it can decrease route readability when requirements are complex:
790
790
// ...
791
791
};
792
792
793
- .. versionadded :: 5.2
794
-
795
- Since Symfony 5.2, inline parameter requirements are also supported in the
796
- host. Before Symfony 5.2, they were supported in the path only.
797
-
798
793
Optional Parameters
799
794
~~~~~~~~~~~~~~~~~~~
800
795
@@ -989,11 +984,6 @@ parameter:
989
984
To give a ``null `` default value to any parameter, add nothing after the
990
985
``? `` character (e.g. ``/blog/{page?} ``).
991
986
992
- .. versionadded :: 5.2
993
-
994
- Since Symfony 5.2, inline parameter default values are also supported in
995
- the host. Before Symfony 5.2, they were supported in the path only.
996
-
997
987
Priority Parameter
998
988
~~~~~~~~~~~~~~~~~~
999
989
@@ -2046,6 +2036,16 @@ these routes.
2046
2036
// ['HTTP_HOST' => 'm.' . $client->getContainer()->getParameter('domain')]
2047
2037
);
2048
2038
2039
+ .. tip ::
2040
+
2041
+ You can also use the inline defaults and requirements format in the
2042
+ ``host `` option: ``{subdomain<m|mobile>?m}.example.com ``
2043
+
2044
+ .. versionadded :: 5.2
2045
+
2046
+ Inline parameter default values support in hosts were introduced in
2047
+ Symfony 5.2. Prior to Symfony 5.2, they were supported in the path only.
2048
+
2049
2049
.. _i18n-routing :
2050
2050
2051
2051
Localized Routes (i18n)
You can’t perform that action at this time.
0 commit comments