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

Appearance settings

Conversation

HypeMC
Copy link
Member

@HypeMC HypeMC commented Sep 4, 2025

Q A
Branch? 7.3
Bug fix? yes
New feature? no
Deprecations? no
Issues -
License MIT

Currently, whenever the body of a controller action that uses attributes for routing is changed, the router cache is rebuilt. This can get a little annoying when you have many routes, as the rebuild time becomes noticeable, in my case, over 2 seconds.

This PR switches to using ReflectionClassResource and GlobResource to prevent the cache from being rebuilt unnecessarily.

I'm not sure how best to test this, or if there's even anything to test. Any suggestions would be appreciated.

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

I'd be fine as a bugfix!

@nicolas-grekas nicolas-grekas modified the milestones: 7.4, 7.3 Sep 4, 2025
@nicolas-grekas
Copy link
Member

Thank you @HypeMC.

@nicolas-grekas nicolas-grekas merged commit 9157094 into symfony:7.3 Sep 4, 2025
9 of 11 checks passed
@HypeMC HypeMC deleted the router-attributes-resource branch September 4, 2025 14:30
@fabpot fabpot mentioned this pull request Sep 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.