Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
javiereguiluz merged 1 commit intosymfony:7.2fromnicolas-grekas:route-alias
May 20, 2025

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekasnicolas-grekas commentedMay 12, 2025
edited
Loading

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

@@ -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
MemberAuthor

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

javiereguiluz reacted with thumbs up emoji

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
MemberAuthor

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

javiereguiluz reacted with thumbs up emoji
@@ -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
MemberAuthor

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

@OskarStarkOskarStark changed the title[Routing] Tell about {foo:bar} mapping syntax[Routing] Tell about{foo:bar} mapping syntaxMay 13, 2025
@nicolas-grekasnicolas-grekas changed the base branch from7.2 to7.3May 13, 2025 12:05
@nicolas-grekasnicolas-grekas modified the milestones:7.1,7.3May 13, 2025
@nicolas-grekas
Copy link
MemberAuthor

nicolas-grekas commentedMay 13, 2025
edited
Loading

Thanks, typo fixed and target updated for 7.3

@nicolas-grekasnicolas-grekas changed the base branch from7.3 to7.2May 17, 2025 14:42
@@ -812,18 +815,6 @@ control behavior:
): Response {
}

``exclude``
Copy link
MemberAuthor

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)

javiereguiluz reacted with thumbs up emoji
@xabbuh
Copy link
Member

Does this also make#20638 obsolet?

@nicolas-grekas
Copy link
MemberAuthor

@xabbuh it's something else

@javiereguiluzjaviereguiluz merged commit2d7393a intosymfony:7.2May 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 freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@OskarStarkOskarStarkOskarStark left review comments

@xabbuhxabbuhAwaiting requested review from xabbuh

Assignees
No one assigned
Projects
None yet
Milestone
7.2
Development

Successfully merging this pull request may close these issues.

[Routing] Add alias in{foo:bar} syntax in route parameter [Routing] Add{foo:bar} syntax to define a mapping between a route pa…
5 participants
@nicolas-grekas@xabbuh@javiereguiluz@OskarStark@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp