-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
For ease of use, an annotation can be added that handles feature assertions. This should work something like this:
use Nusje2000\FeatureToggleBundle\Annotation as FeatureToggle;
// imports ...
/**
* @Route("/some-route", name="route_name") # The symfony route definition
*
* @FeatureToggle\AssertEnabled() # Guard method
* @FeatureToggle\AssertEnabled(route="route_name") # With route specification
* @FeatureToggle\AssertEnabled(redirect="redirect_route_name") # With redirect route name
* @FeatureToggle\AssertEnabled(redirect="/some/path") # With redirect path
*
* @FeatureToggle\AssertDisabled() # Guard method
* @FeatureToggle\AssertDisabled(route="route_name") # With route specification
* @FeatureToggle\AssertDisabled(redirect="redirect_route_name") # With redirect
* @FeatureToggle\AssertDisabled(redirect="/some/path") # With redirect path
*/
public function someControllerMethod(): Response
{
// ... code ...
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels