Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[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

Merged
merged 1 commit into from
May 20, 2025

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented May 12, 2025

Fix #20806
Fix #19846
Fix #19848
Replaces #19869
Replaces #20812

@carsonbot carsonbot added this to the 7.1 milestone May 12, 2025
@nicolas-grekas nicolas-grekas changed the base branch from 7.1 to 7.2 May 12, 2025 13:23
@symfony symfony deleted a comment from carsonbot May 12, 2025
@@ -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.
Copy link
Member Author

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.
Copy link
Member Author

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')]
Copy link
Member Author

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

@OskarStark OskarStark changed the title [Routing] Tell about {foo:bar} mapping syntax [Routing] Tell about {foo:bar} mapping syntax May 13, 2025
routing.rst Outdated Show resolved Hide resolved
@nicolas-grekas nicolas-grekas changed the base branch from 7.2 to 7.3 May 13, 2025 12:05
@nicolas-grekas nicolas-grekas modified the milestones: 7.1, 7.3 May 13, 2025
@nicolas-grekas
Copy link
Member Author

nicolas-grekas commented May 13, 2025

Thanks, typo fixed and target updated for 7.3

@nicolas-grekas nicolas-grekas changed the base branch from 7.3 to 7.2 May 17, 2025 14:42
@nicolas-grekas nicolas-grekas requested a review from xabbuh as a code owner May 17, 2025 14:42
@nicolas-grekas nicolas-grekas modified the milestones: 7.3, 7.2 May 17, 2025
@@ -812,18 +815,6 @@ control behavior:
): Response {
}

``exclude``
Copy link
Member Author

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 for exclude anymore IIUC, we could even deprecate it (but it's not strictly need either)

@xabbuh
Copy link
Member

xabbuh commented May 18, 2025

Does this also make #20638 obsolet?

@nicolas-grekas
Copy link
Member Author

@xabbuh it's something else

@javiereguiluz javiereguiluz merged commit 2d7393a into symfony:7.2 May 20, 2025
2 of 3 checks passed
@javiereguiluz
Copy link
Member

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.