-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 3.2.2 |
While using a @Route
annotation in the controller, the dev
cache is properly invalidated, if the route requirements are written directly in the annotation. But when using container parameters in requirements, the cache is not invalidated automatically and you need to delete cache/dev
directory manually.
See the example: If another option is added to config, the route is not matched until the cache directory is manually deleted:
# config.yml
parameters:
routing.type_slug: article|category
// DefaultController.php
/**
* @Route("/{typeSlug}/", name="homepage", requirements={"typeSlug": "%routing.type_slug%"})
*/
public function indexAction(string $typeSlug, Request $request)