Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MalformedFunctionException when using two functions and text #781

Closed
mrmkrs opened this issue Aug 29, 2017 · 1 comment
Closed

MalformedFunctionException when using two functions and text #781

mrmkrs opened this issue Aug 29, 2017 · 1 comment

Comments

@mrmkrs
Copy link

mrmkrs commented Aug 29, 2017

Hi,
I found some constructions where the parsing / tokenizing stuff does not work properly and throws an MalformedFunctionException.

Some\Class:
  fullName: '<nl_NL:lastName()> test <nl_NL:firstName()>'

The exception:
[Nelmio\Alice\Throwable\Exception\FixtureBuilder\ExpressionLanguage\MalformedFunctionException]
The value ")>)> test <aliceTokenizedFunction(<nl_NL:firstName(" contains an unclosed function.

Also broken:

Some\Class:
  fullName: 'somestring <current()> <nl_NL:firstName()>'

[Nelmio\Alice\Throwable\Exception\FixtureBuilder\ExpressionLanguage\MalformedFunctionException]
The value "somestring <current()> <nl_NL:firstName()>" contains an unclosed function.

This does work:

Some\Class:
  fullName: '<nl_NL:lastName()> <current()>'

And this does also work:

Some\Class:
  fullName: '<nl_NL:lastName()> <current()>somestring'

And this does also work:

Some\Class:
  fullName: 'somestring <nl_NL:lastName()> <current()>'
@theofidry theofidry added the Bug label Aug 29, 2017
@theofidry theofidry added this to the 3.x milestone Aug 29, 2017
@theofidry
Copy link
Member

I think it's the localised call that fucks up a bit things. But the real fix is in #601 unless you are ready to patch the current lexer & parser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants