Use Env Vars in Route Conditions

Syntax

/**

  • @Route(“/new-feature”, condition=“env(‘bool:IS_FEATURE_ENABLED’) === true”)
    */
    public function __invoke()
    {
    // this route will only execute when the value of the
    // IS_FEATURE_ENABLED env var is TRUE
    }