Skip to content

[ExpressionLanguage] Add linter #16323

@Koc

Description

@Koc

In our project there is possibility write own custom rules. And currently no way check if this rules written correctly. Currently we are using workaround for it, but I think that should be linter.

$error = '';
set_error_handler(function($errno, $errstr) use (&$error) {
    $error = $errstr;
});

$expressionLanguage->compile($extendedPattern, array('title'));

restore_error_handler();

if ($error) {
    $errorElement
        ->with('categoryExtended.extendedPattern')
        ->addViolation($error)
        ->end();
}

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