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

We should add squirrelphp/twig-php-syntax as dependency. #1458

Closed
bobdenotter opened this issue Jun 9, 2020 · 5 comments
Closed

We should add squirrelphp/twig-php-syntax as dependency. #1458

bobdenotter opened this issue Jun 9, 2020 · 5 comments

Comments

@bobdenotter
Copy link
Member

bobdenotter commented Jun 9, 2020

See: https://github.com/squirrelphp/twig-php-syntax

@bobdenotter
Copy link
Member Author

bobdenotter commented Jun 9, 2020

@versh23 Why do you dislike this idea?

@versh23
Copy link
Contributor

versh23 commented Jun 10, 2020

because i dont understand this, there is no description in this issue :)
TWIG syntax was created special for non developers.

Easy to learn: The syntax is easy to learn and has been optimized to allow web designers to get their job done fast without getting in their way.
from https://twig.symfony.com/

TWIG documentation is small and easy for understanding.

Why do you want to add php syntax in twig?

@bobdenotter
Copy link
Member Author

bobdenotter commented Jun 10, 2020

@versh23 No, not at all! Twig is great. I like how semantic and sane it is.

The lib at https://github.com/squirrelphp/twig-php-syntax adds some extra but strictly optional syntax.. for example, it'll allow you to use {% break %} and {% continue %} in for loops, and you can now do {% '1' !== true %} strict comparisons. Oh, and things like {% if record.slug is string %}.

It will explicitly not allow PHP statements in Twig. :-)

@versh23
Copy link
Contributor

versh23 commented Jun 10, 2020

@bobdenotter thanks for explain 👍

@bobdenotter
Copy link
Member Author

bobdenotter commented Jun 11, 2020

Fixed in #1466

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