-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Routing] Tell about {foo:bar} mapping syntax #20956
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
base: 7.2
Are you sure you want to change the base?
Conversation
27aa16a
to
803d7cc
Compare
@@ -22,8 +22,7 @@ Creating Routes as Attributes | |||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |||
|
|||
PHP attributes allow to define routes next to the code of the | |||
:doc:`controllers </controller>` associated to those routes. Attributes are | |||
native in PHP 8 and higher versions, so you can use them right away. | |||
:doc:`controllers </controller>` associated to those routes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHP 8 is the past now, the removed sentence feels outdated
|
||
When using regular expressions in route parameters, you can set the ``utf8`` | ||
route option to ``true`` to make any ``.`` character match any UTF-8 | ||
characters instead of just a single byte. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utf8 is enabled by default since a few years now
@@ -998,7 +991,7 @@ controller action. Instead of ``string $slug``, add ``BlogPost $post``:: | |||
{ | |||
// ... | |||
|
|||
#[Route('/blog/{slug}', name: 'blog_show')] | |||
#[Route('/blog/{slug:post}', name: 'blog_show')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the example is using deprecated implicit mapping that doesn't work anymore with the default recipes since 7.1
Fix #20806
Fix #19846
Replaces #19869
Replaces #20812