You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the FrameworkBundle, a new router will be added that extends the router from the routing component. This router adds the WarmableInterface, which causes the RouterCacheWarmer to warm the cache. However, if you decorate the router based on the component, rather than the FrameworkBundle, you'll never get hinted to use the WarmableInterface, which results in not warming the cache properly in Symfony.
While the current behavior is correct, it might unknowingly "break" the cache warmup for the router, if the WarmableInterface is not implemented on the decorating router. This would be the fix for any decorator: linaori/http-bundle#20. I'm not sure what a good fix would be in Symfony. I'd like to see a warning of sorts, but I have no idea how to efficiently let the developer know about this.
The text was updated successfully, but these errors were encountered:
…terface without warmupInterface in RouterCacheWarmer (Simperfit)
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle] add a notice when passing a routerInterface without warmupInterface in RouterCacheWarmer
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yesish
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #23403
| License | MIT
| Doc PR | none
I'm adding a test to RouterCacheWarmer since there were none.
Commits
-------
daa7f02 [FrameworkBundle] add a notice when passing a routerInterface with warmupInterface in RouterCacheWarmer
When using the FrameworkBundle, a new router will be added that extends the router from the routing component. This router adds the
WarmableInterface
, which causes theRouterCacheWarmer
to warm the cache. However, if you decorate the router based on the component, rather than the FrameworkBundle, you'll never get hinted to use theWarmableInterface
, which results in not warming the cache properly in Symfony.While the current behavior is correct, it might unknowingly "break" the cache warmup for the router, if the
WarmableInterface
is not implemented on the decorating router. This would be the fix for any decorator: linaori/http-bundle#20. I'm not sure what a good fix would be in Symfony. I'd like to see a warning of sorts, but I have no idea how to efficiently let the developer know about this.The text was updated successfully, but these errors were encountered: