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] Add Attribute code examples for alias in#[Route] attribute#20638

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

Conversation

welcoMattic
Copy link
Member

Fixes#20600

This one adds code examples to alias route in#[Route] attribute. It also add example usingDeprecatedAlias.

I've also added a note to precisenew_route_name andoriginal_route_name meaning, to avoid misunderstanding.

cc@damienfern

@welcoMattic
Copy link
MemberAuthor

@stof for review

I've fixed issues we talk about in private.

But, as we discussed, we need to make this Route Alias part of the documentation a bit clearer on lower branches. This PR documents the new way to create route aliases using Attributes (which differs from the way to do in YAML, XML and PHP, if I've understood correctly).

OskarStark added a commit that referenced this pull requestMay 20, 2025
… route names (welcoMattic)This PR was squashed before being merged into the 6.4 branch.Discussion----------[Routing] Clarify route aliases examples with explicit route namesRefers to#20638 (comment)Actual examples for route aliasing are not crystal clear.Now, examples in YAML, XML and PHP provide- An original route, declared with an explicit name- An alias to this route, with an explicit nameThis change will allow to provide another clear example for route aliasing using Attribute in#20638cc `@stof` `@damienfern`Commits-------a28b614 [Routing] Clarify route aliases examples with explicit route names
@welcoMattic
Copy link
MemberAuthor

welcoMattic commentedMay 20, 2025
edited
Loading

@symfony/docs I reworked this PR to only add PHP Attribute code blocks about Route Aliasing and Deprecated Route Aliases. Your review is welcome 🙏

Status: Needs review

@OskarStarkOskarStark changed the title[Routing] Add Attribute code examples for alias in #[Route] attribute[Routing] Add Attribute code examples for alias in#[Route] attributeMay 20, 2025

So that you can use your own route name for URL generation,
while actually using a route defined by a third-party bundle as the target of that URL generation,
as the 2 definitions are not required to be in the same config file (or even in the same format).
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@OskarStark@stof I've added this side note, is it ok for you?

@javiereguiluzjaviereguiluz merged commit0b3db8e intosymfony:7.3May 27, 2025
3 checks passed
@javiereguiluz
Copy link
Member

Merged! Thanks Mathieu.

I added theversionadded directive while merging.

welcoMattic reacted with heart emoji

@welcoMatticwelcoMattic deleted the alias-route-attribute branchMay 27, 2025 15:31
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@stofstofstof approved these changes

@damienferndamienferndamienfern requested changes

@OskarStarkOskarStarkOskarStark approved these changes

@SpomkySpomkySpomky approved these changes

@javiereguiluzjaviereguiluzAwaiting requested review from javiereguiluz

@wouterjwouterjAwaiting requested review from wouterj

@xabbuhxabbuhAwaiting requested review from xabbuh

Assignees
No one assigned
Projects
None yet
Milestone
7.3
Development

Successfully merging this pull request may close these issues.

[Routing] Allow aliases in#[Route] attribute
7 participants
@welcoMattic@javiereguiluz@stof@OskarStark@Spomky@damienfern@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp