Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Enable service for symfony routing condition option #99

Open
tacman opened this issue Jun 9, 2022 · 0 comments
Open

Enable service for symfony routing condition option #99

tacman opened this issue Jun 9, 2022 · 0 comments

Comments

@tacman
Copy link

tacman commented Jun 9, 2022

The latest version of Symfony allows the routing condition to access a service, so developers can write:

    #[Route('/demo', name: 'app_demo', condition: "service('flagception.manager.feature_manager').isActive('beta')")]
    public function demo(): Response
    {
        return $this->render('app/index.html.twig', [
            'controller_name' => 'Demo',
        ]);
    }

I'll submit a PR to tag the service so it can be used this way.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant