Skip to content

[Router] Decorating router might miss WarmableInterface #23403

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy