Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Router] Decorating router might miss WarmableInterface #23403

Closed
@linaori

Description

@linaori
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.2.x

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions