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

Allow expressions as keys in an object #236

Closed
wants to merge 1 commit into from
Closed

Allow expressions as keys in an object #236

wants to merge 1 commit into from

Conversation

csimi
Copy link
Contributor

@csimi csimi commented Jun 9, 2015

From the twig php docs:

{# keys as expressions (the expression must be enclosed into parentheses) -- as of Twig 1.5 #}
{ (1 + 1): 'foo', (a ~ 'b'): 'bar' }

@xphere
Copy link

xphere commented Sep 28, 2015

Hi! Any news on this one? 😄

@plepe
Copy link
Contributor

plepe commented Dec 12, 2015

Hmm, I tried to merge this pull request on the current master and got the following exception when running make test (for the test which was created in this pull request):

Error compiling twig template undefined: 
TwigException: Unexpected value before ':' of Twig.expression.type.parameter.end = )
Error parsing twig template undefined: 
TypeError: Cannot call method 'forEach' of undefined
    at Object.Twig.forEach (/home/skunk/public_html/twig.js/twig.js:79:24)
    at Twig.parse (/home/skunk/public_html/twig.js/twig.js:576:18)
    at Twig.Template.render (/home/skunk/public_html/twig.js/twig.js:949:29)
    at Context.<anonymous> (/home/skunk/public_html/twig.js/test/test.core.js:120:58)
    at callFn (/home/skunk/public_html/twig.js/node_modules/mocha/lib/runnable.js:223:21)
    at Test.Runnable.run (/home/skunk/public_html/twig.js/node_modules/mocha/lib/runnable.js:216:7)
    at Runner.runTest (/home/skunk/public_html/twig.js/node_modules/mocha/lib/runner.js:374:10)
    at /home/skunk/public_html/twig.js/node_modules/mocha/lib/runner.js:452:12
    at next (/home/skunk/public_html/twig.js/node_modules/mocha/lib/runner.js:299:14)
    at /home/skunk/public_html/twig.js/node_modules/mocha/lib/runner.js:309:7
    at next (/home/skunk/public_html/twig.js/node_modules/mocha/lib/runner.js:247:23)
    at Object._onImmediate (/home/skunk/public_html/twig.js/node_modules/mocha/lib/runner.js:276:5)
    at processImmediate [as _immediateCallback] (timers.js:330:15)

Could you please have another look at it?

@plepe plepe mentioned this pull request Dec 13, 2015
12 tasks
@plepe
Copy link
Contributor

plepe commented Dec 19, 2015

replaced by #284

@plepe plepe closed this Dec 19, 2015
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

Successfully merging this pull request may close these issues.

None yet

3 participants