10000 Provide PHP style output of booleans by specifying option. by antoineveldhoven · Pull Request #913 · twigjs/twig.js · GitHub
[go: up one dir, main page]

Skip to content

Provide PHP style output of booleans by specifying option. #913

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

antoineveldhoven
Copy link
Contributor

I'm not sure if this is the way to go, since this is a very old issue.
Please share your thoughts @willrowe && @RobLoach about this fix.

Aiming to fix #88

Since this change breaks every boolean test and / or comparison, I've introduced an option in order to enable PHP style boolean outputs.

@willrowe
Copy link
Collaborator

I don't see any issue with this since the option is disabled by default. It gives an upgrade path for the next major version to change the default. May be a good idea to include a deprecation notice when the option is not enabled and a boolean is encountered?

…olean is encountered.

Co-Authored-By: Will Rowe <willrowe@users.noreply.github.com>
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.

"Twig supports binary operations (+, -, *, /, ~, %, and, or)" incorrect print of boolean
2 participants
0