Skip to content

[Expression Language] Validate expression syntax without parsing an expression itself. #35700

@anyt

Description

@anyt

Description
In OroCommerce we use expression language in many contexts, as this is a very powerful and flexible component. We even allow users to enter some limited expressions from UI, here are just a few of features that use the expression language:

  • workflows
  • menu
  • price rules
  • shipping rules
  • page layout builder

Sometimes, to know about an error as soon as possible, we want to validate an expression syntax in a place where we don't know yet all available variable names.

With the current component architecture, the only option we have, to provide syntax validation - is to copy the Parser, and modify it, so it will not trigger an exception when the variable name was not found.

We don't like this approach so we are considering contributing a feature to validate expression language syntax, without parsing, if there are other projects that can leverage it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions