-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Routing] Revert " Fix removing aliases pointing to removed route in RouteCollection::remove()" #52831
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
…outeCollection::remove()" This reverts commit 238894b.
unset($this->aliases[$k]); | ||
} | ||
foreach ((array) $name as $n) { | ||
unset($this->routes[$n], $this->priorities[$n], $this->aliases[$n]); |
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.
Maybe I'm missing something here, but why not have this method remove both an alias, if it's an alias, or a route with all its aliases, if it's a route?
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.
I also wondered the same. That'd make sense to me.
Another thing about this solution: So when someone uses FQCN for their routing and they add Hosts or Prefixes, that will not work anymore. |
Closing in favor of #52845 |
…ve() (fancyweb) This PR was merged into the 5.4 branch. Discussion ---------- [Routing] Restore aliases removal in RouteCollection::remove() | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | #52806 (comment) | License | MIT As suggested in #52831 (comment) It's still a small behavior change on 5.4, let's see what people think 😃 Commits ------- 3c6dc17 [Routing] Restore aliases removal in RouteCollection::remove()
We need to find another solution that doesn't change the behavior on 5.4 😕