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

current() in combination with referencing properties broken #879

Closed
ChristianVermeulen opened this issue Feb 27, 2018 · 1 comment
Closed

Comments

@ChristianVermeulen
Copy link
Contributor

Hi There,

I've upgraded van 2.1.2 to 3.2.0 and I think I might've found a bug which is causing us problems right now.

This is an example of what I'm trying to do:

user (template):
  __construct:
    - '@user__*'
    - '<email()>'
    - '<uuid()>'

user_confirmed__{1..20} (extends user):
  confirm:
    - '@user_confirmed__<current()>->token'

The User entity has a token generated automatically on __construct which has its getToken()-method. However, when using this syntax I get:

Nelmio\Alice\Throwable\Exception\FixtureBuilder\ExpressionLanguage\LexException:
Could not lex the value ">token".

When I change it to e.g. - '@user_confirmed__1->token' it does work. Well, besides the fact that it uses the same token for all users then, but the syntax is accepted.

This makes me believe there is a problem with the <current()> function which causes it to not being able to be chained anymore.

I hope you either know what I'm doing wrong or where the bug is because this is causing us a few headaches 😅.

@ChristianVermeulen
Copy link
Contributor Author

I just stumbled upon #761 which was a joy to read 🙈. Anyway, thanks for rubber ducking and apologies for the premature issue!

zac5evg19ycva

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

No branches or pull requests

1 participant