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

Cannot use optional reference with function #833

Closed
ostrolucky opened this issue Nov 4, 2017 · 1 comment
Closed

Cannot use optional reference with function #833

ostrolucky opened this issue Nov 4, 2017 · 1 comment
Milestone

Comments

@ostrolucky
Copy link

ostrolucky commented Nov 4, 2017

Tried to find similar bug report, could not find one with same error message though, which makes me believe this might be different:

expression: 50%? @company_<numberBetween(5, 10)>

In ExpressionLanguageExceptionFactory.php line 59:
                                                                                                                                              
  [Nelmio\Alice\Throwable\Exception\FixtureBuilder\ExpressionLanguage\MalformedFunctionException]                                             
  The value "@company_<aliceTokenizedFunction(FUNCTION_START__numberBetween__5, 10IDENTITY_OR_FUNCTION_END)>" contains an unclosed function.  
                                                                                                                                              

Exception trace:
 Nelmio\Alice\Throwable\Exception\FixtureBuilder\ExpressionLanguage\ExpressionLanguageExceptionFactory::createForMalformedFunction() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/ExpressionLanguage/Lexer/FunctionTokenizer.php:121
 Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Lexer\FunctionTokenizer->buildTree() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/ExpressionLanguage/Lexer/FunctionTokenizer.php:45
 Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Lexer\FunctionTokenizer->tokenize() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/ExpressionLanguage/Lexer/FunctionLexer.php:54
 Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Lexer\FunctionLexer->lex() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/ExpressionLanguage/Lexer/GlobalPatternsLexer.php:63
 Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Lexer\GlobalPatternsLexer->lex() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/ExpressionLanguage/Lexer/ReferenceEscaperLexer.php:49
 Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Lexer\ReferenceEscaperLexer->lex() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/ExpressionLanguage/Lexer/EmptyValueLexer.php:44
 Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Lexer\EmptyValueLexer->lex() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/ExpressionLanguage/Parser/SimpleParser.php:56
 Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Parser\SimpleParser->parse() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/ExpressionLanguage/Parser/TokenParser/Chainable/OptionalTokenParser.php:55
 Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Parser\TokenParser\Chainable\OptionalTokenParser->parse() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/ExpressionLanguage/Parser/TokenParser/TokenParserRegistry.php:71
 Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Parser\TokenParser\TokenParserRegistry->parse() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/ExpressionLanguage/Parser/SimpleParser.php:81
 Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Parser\SimpleParser->parseToken() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/ExpressionLanguage/Parser/SimpleParser.php:59
 Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Parser\SimpleParser->parse() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/ExpressionLanguage/Parser/StringMergerParser.php:45
 Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Parser\StringMergerParser->parse() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/ExpressionLanguage/Parser/FunctionFixtureReferenceParser.php:48
 Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Parser\FunctionFixtureReferenceParser->parse() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/Denormalizer/Fixture/SpecificationBagDenormalizer/Value/SimpleValueDenormalizer.php:70
 Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\SpecificationBagDenormalizer\Value\SimpleValueDenormalizer->parseValue() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/Denormalizer/Fixture/SpecificationBagDenormalizer/Value/SimpleValueDenormalizer.php:46
 Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\SpecificationBagDenormalizer\Value\SimpleValueDenormalizer->denormalize() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/Denormalizer/Fixture/SpecificationBagDenormalizer/Value/UniqueValueDenormalizer.php:49
 Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\SpecificationBagDenormalizer\Value\UniqueValueDenormalizer->denormalize() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/Denormalizer/Fixture/SpecificationBagDenormalizer/Property/SimplePropertyDenormalizer.php:42
 Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\SpecificationBagDenormalizer\Property\SimplePropertyDenormalizer->denormalize() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/Denormalizer/Fixture/SpecificationBagDenormalizer/SimpleSpecificationsDenormalizer.php:147
 Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\SpecificationBagDenormalizer\SimpleSpecificationsDenormalizer->denormalizeProperty() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/Denormalizer/Fixture/SpecificationBagDenormalizer/SimpleSpecificationsDenormalizer.php:105
 Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\SpecificationBagDenormalizer\SimpleSpecificationsDenormalizer->denormalize() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/Denormalizer/Fixture/Chainable/SimpleDenormalizer.php:83
 Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\Chainable\SimpleDenormalizer->denormalize() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/Denormalizer/Fixture/FixtureDenormalizerRegistry.php:63
 Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\FixtureDenormalizerRegistry->denormalize() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/Denormalizer/Fixture/Chainable/CollectionDenormalizerWithTemporaryFixture.php:169
 Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\Chainable\CollectionDenormalizerWithTemporaryFixture->denormalizeTemporaryFixture() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/Denormalizer/Fixture/Chainable/CollectionDenormalizerWithTemporaryFixture.php:126
 Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\Chainable\CollectionDenormalizerWithTemporaryFixture->denormalize() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/Denormalizer/Fixture/Chainable/SimpleCollectionDenormalizer.php:118
 Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\Chainable\SimpleCollectionDenormalizer->denormalize() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/Denormalizer/Fixture/FixtureDenormalizerRegistry.php:63
 Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\FixtureDenormalizerRegistry->denormalize() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/Denormalizer/Fixture/SimpleFixtureBagDenormalizer.php:74
 Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\SimpleFixtureBagDenormalizer->denormalize() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/Denormalizer/SimpleDenormalizer.php:48
 Nelmio\Alice\FixtureBuilder\Denormalizer\SimpleDenormalizer->denormalize() at /var/www/vendor/nelmio/alice/src/FixtureBuilder/SimpleBuilder.php:41
 Nelmio\Alice\FixtureBuilder\SimpleBuilder->build() at /var/www/vendor/nelmio/alice/src/Loader/SimpleDataLoader.php:47
 Nelmio\Alice\Loader\SimpleDataLoader->loadData() at /var/www/vendor/nelmio/alice/src/Loader/SimpleFilesLoader.php:65
 Nelmio\Alice\Loader\SimpleFilesLoader->loadFiles() at /var/www/vendor/nelmio/alice/src/Loader/NativeLoader.php:247
 Nelmio\Alice\Loader\NativeLoader->loadFiles() at /var/www/src/DataFixtures/FixtureLoader.php:93
@ostrolucky ostrolucky changed the title Optional reference containing function Cannot use optional reference with function Nov 4, 2017
@theofidry theofidry added this to the 3.x milestone Nov 4, 2017
@theofidry
Copy link
Member

theofidry commented Dec 17, 2017

See my comment here: #797 (comment), #601 is the real fix

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