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

Can not parse multiple chained reference #937

Closed
soullivaneuh opened this issue Jun 25, 2018 · 2 comments
Closed

Can not parse multiple chained reference #937

soullivaneuh opened this issue Jun 25, 2018 · 2 comments
Milestone

Comments

@soullivaneuh
Copy link
Contributor

soullivaneuh commented Jun 25, 2018

With the following fixture file:

include:
    - hosting.yml

AppBundle\Entity\CloudFlareZone:
    cloudflare_zone_default:
        id: ThisIsNotRealCloudFlareId
        name: '@hosting_default->name'
        owner: '@hosting_default->server->owners->first'

I have the error:

  [Nelmio\Alice\Throwable\Exception\FixtureBuilder\ExpressionLanguage\ParseException]                   
  Could not parse the token "@hosting_default->server->owners->first" (type: METHOD_REFERENCE_TYPE).  

From this code part:

if (count($explodedValue) !== 2) {
throw ExpressionLanguageExceptionFactory::createForUnparsableToken($token);
}

Why the chain reference should be limited to one call?

@theofidry
Copy link
Member

I don't think it should. This guard has been put there because with the tested code a different situation would be unexpected. So this means chaining references like this is currently not supported, but by the look of it that should be a situation not too complicated to fix.

@theofidry theofidry added this to the 3.x milestone Jun 25, 2018
@theofidry
Copy link
Member

I don't really have the time to work on it. So unless a PR is made for it I'll close it as part of #601

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