Skip to content

feat: upgrade Twig to use new filter, map, reduce #1107

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

Merged
merged 1 commit into from
Dec 3, 2019
Merged

Conversation

EvanLovely
Copy link
Member

This updates brings in @basalt/twig-renderer v0.13.0 which updates Twig PHP to v1.42.2 and brings in the new filter, map, and reduce functions just
added
.

This updates brings in [`@basalt/twig-renderer` v0.13.0](https://github.com/basaltinc/twig-renderer/releases/tag/v0.13.0) which updates Twig PHP to v1.42.2 and brings in the new `filter`, `map`, and `reduce` functions [just
added](https://symfony.com/blog/twig-adds-filter-map-and-reduce-features).
@EvanLovely EvanLovely added the twig renderer Issues and updates related to the PHP-based Twig rendering engine label Dec 3, 2019
sghoweri added a commit to boltdesignsystem/bolt that referenced this pull request Dec 3, 2019
Copy link
Contributor

@sghoweri sghoweri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @EvanLovely - tested and verified that the updated Twig renderer is working as expected (and the new Twig functions like map work like a charm 😄) 🎉

{% set people = [
  {first: "Alice", last: "Dupond"},
  {first: "Bob", last: "Smith"},
] %}

{{ people|map(p => p.first ~ ' ' ~ p.last)|join(', ') }}

outputs:

Alice Dupond, Bob Smith

@sghoweri sghoweri added this to the v5.5.0 milestone Dec 3, 2019
@sghoweri sghoweri merged commit 9571d43 into dev Dec 3, 2019
@sghoweri sghoweri deleted the feature/update-twig branch December 3, 2019 19:31
@bmuenzenmeyer
Copy link
Member

Thanks @EvanLovely !!!

@EvanLovely
Copy link
Member Author

Welcome! 🎉

sghoweri added a commit to boltdesignsystem/core-php that referenced this pull request Dec 13, 2019
sghoweri added a commit to boltdesignsystem/core-php that referenced this pull request Dec 17, 2019
sghoweri added a commit to boltdesignsystem/core-php that referenced this pull request Dec 30, 2019
sghoweri added a commit to boltdesignsystem/core-php that referenced this pull request Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ twig renderer Issues and updates related to the PHP-based Twig rendering engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants