I have a route with a parameter {id} on which I want to apply a condition. Only if {id} contains more than 3 characters, this route should be available. I read about conditions in routes both in the documentation and in a similar question. What I tried:
/**
* @Route("/{id}", name="some_route", condition="strlen(id) > 3")
*/
I also tried with requirements instead of condition and tried {id} instead of id. No luck. The error that is show is:
The function "strlen" does not exist around position 1 for expression
strlen(id) > 3.
How to solve this issue?