[ResourceBundle] ParameterParser Request Value on expression #9681
Labels
Enhancement
Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.).
RFC
Discussions about potential changes or new features.
Stale
Issues and PRs with no recent activity, about to be closed soon.
Hi,
i try to implement a custom expression language function with a request value parameter.
If i use
expr:datetime($start)
for example, i can call my route withstart
parameter or not. But if i want to use a custom defaultstart
parameter who depends on my route, i use this syntax :expr:datetime($start ?: "+1 days")
expr:datetime($start ?: "+3 days")
But if i call my route without
start
=>Unexpected token "punctuation" of value "?" around position 11 for expression datetime( ?: "+3 days")
.For solve my problem, i override
ParametersParser
class and i change functionparseRequestValueExpression
line 103 by :Of course i need to add
= null
on php expression function parameter, but i think it's more flexible and my problem is solved.Thanks for your feedback.
The text was updated successfully, but these errors were encountered: