This was brought up by @bwaidelich on Slack, but I think it’s much better home is here…
Hey Fusion & Eel fans,
do you agree that the static
Neos\Eel\Utitlity class is hard to use?
It leads to glue code like https://github.com/Flowpack/Flowpack.NodeTemplates/blob/master/Classes/Service/EelEvaluationService.php in many places and it’s currently not possible to detect an Eel expression before evaluating it (without duplicating code that is).
- Deprecate the
Neos.Fusion.defaultContextsetting in favor of a global
- Deprecate the static
Utilityin favor of a singleton with a really easy to use interface like:
$this->eelXYZ->evaluateEelExpression($expression, $variables)that throws an exception if the given $expression is not valid
2a. Maybe add a second method that allows to specify a custom context, too!?
- disallow special characters (particularly dots) in the context names to prevent those nasty nesting issues
See https://github.com/neos/flow-development-collection/pull/1437#pullrequestreview-240079235 for the related discussion [that triggered this post.]