-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Routing] Add support for aliasing routes #38389
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
Conversation
Lctrs
commented
Oct 2, 2020
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | yes |
Deprecations? | no |
Tickets | Fix #6088 |
License | MIT |
Doc PR | None yet |
Will update changelog later. Created it first to gather reviews. |
throw new InvalidArgumentException(sprintf('An alias can not reference itself, got a circular reference on "%s".', $alias)); | ||
} | ||
|
||
unset($this->routes[$alias], $this->priorities[$alias]); |
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.
Add a comment to explain why you unset these keys in these array?
based on the discussion happening in #6088 (comment) and following comments, we should be able to mark aliases as deprecated, so that the UrlGenerator triggers a deprecation when trying to generate the URL for such alias (pointing to the new name). |
Co-authored-by: GoT <PierreRambaud@users.noreply.github.com>
Co-authored-by: GoT <PierreRambaud@users.noreply.github.com>
We've just moved away from |
This PR was merged into the 5.4 branch. Discussion ---------- [Routing] Add support for aliasing routes | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | yes | Deprecations? | yes | Tickets | Fix #6088 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | None yet Continuation of #38389 Commits ------- 43575a1 [Routing] Add support for aliasing routes