-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
RoutingactionableClear and specific issues ready for anyone to take them.Clear and specific issues ready for anyone to take them.good first issueIdeal for your first contribution! (some Symfony experience may be required)Ideal for your first contribution! (some Symfony experience may be required)hasPRA Pull Request has already been submitted for this issue.A Pull Request has already been submitted for this issue.
Description
It isn't clear for people to not use Router#getRouteCollection(). Using this method will regenerate the Routing cache on each request, making apps very slow. I think we should explicitely tell people to not use this method.
A common use case of this method seems to be checking whether a route exists (symfony/symfony#19270, http://stackoverflow.com/q/14136484/1149495, http://stackoverflow.com/q/17241235/1149495, etc.). Maybe we can document to catch the RouteNotFoundException in such cases and then explain to not use getRouteCollection().
Metadata
Metadata
Assignees
Labels
RoutingactionableClear and specific issues ready for anyone to take them.Clear and specific issues ready for anyone to take them.good first issueIdeal for your first contribution! (some Symfony experience may be required)Ideal for your first contribution! (some Symfony experience may be required)hasPRA Pull Request has already been submitted for this issue.A Pull Request has already been submitted for this issue.