flagception-bundle
flagception-bundle copied to clipboard
Enable service for symfony routing condition option
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.