Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[ExpressionLanguage]: Lexer should provide information to malformed file and/or expression on SyntaxError #19445

Copy link
Copy link
Closed
@k0pernikus

Description

@k0pernikus
Issue body actions

If a malformed expression syntax is provided in a yaml service config, e.g:

http.request_factory:
    class: Dreamlines\Http\RequestFactory
    arguments:
        - '@ba.endpoint_provider'
        - "@=service(rba.context.factory').create()"

(The r should be a ')

The SyntaxError looks like:

[Symfony\Component\ExpressionLanguage\SyntaxError]  
Unexpected character "'" around position 36. 

There's no information provided what file caused the error, nor the line, nor the faulty expression is echoed so I had to start a xdebug session to find out the yml file in error.

I would have expected the information to read like:

[Symfony\Component\ExpressionLanguage\SyntaxError]  
Unexpected character "'" around position 36 in expression "@=service(rba.context.factory').create()" in "path/to/my/service.yml" on line 39.

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.