Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -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
{foo:bar}
mapping syntaxUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedMay 13, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thanks, typo fixed and target updated for 7.3 |
@@ -812,18 +815,6 @@ control behavior: | |||
): Response { | |||
} | |||
``exclude`` |
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.
there's no use case forexclude
anymore IIUC, we could even deprecate it (but it's not strictly need either)
Does this also make#20638 obsolet? |
@xabbuh it's something else |
2d7393a
intosymfony:7.2Uh oh!
There was an error while loading.Please reload this page.
Nicolas, thanks a lot for this contribution! While merging in 7.2, we removed the contents related to the 7.3 feature but readded those back when upmerging in 7.3 branch. Thanks! |
Uh oh!
There was an error while loading.Please reload this page.
Fix#20806
Fix#19846
Fix#19848
Replaces#19869
Replaces#20812