8000 allow method calls in expressions without parenthesis and is/has · Issue #60336 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
8000
allow method calls in expressions without parenthesis and is/has #60336
Open
@tacman

Description

@tacman

Description

Like twig, I'd like to be able to call methods in expressions without the parenthesis.

Example

public function isValid() {
   return $this->httpStatusCode == 200;
}

In the expression, e.g. for workflow

 guard: 'subject.isValid()'

I'd like to be able to call it without the parenthsis.

And like Twig, it'd be great to not need the is or has prefix,

 guard: 'subject.valid'

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

      0