Releases: bobthecow/mustache.php
Releases · bobthecow/mustache.php
Mustache.php v2.7.0
- Add template inheritance, via the BLOCKS pragma. Thanks @jazzdan and the rest of the @etsy devs!
- Add a
pragmas
option to the Mustache_Engine constructor for enabling default pragmas. - A couple of performance improvements. Thanks @nizsheanez!
- Code cleanup. Thanks @keradus!
- Check coding standards on CI. Thanks @keradus!
- Fix whitespace bug in nested partials. Thanks for the bug report, @mikesherov and @behance!
- Allow omitting the filters on closing section tags, for example,
{{# a | b }}{{/ a }}
is now valid. - Increase test coverage, improve comments and examples.
If you process Mustache parse trees yourself…
Note that the parse tree representation of filtered interpolation and section tokens has changed. The tag name is now separate from the filters list. For example, the template:
{{%FILTERS}}
{{ foo | bar }}
was parsed as:
[
[
"type" => "%",
"name" => "FILTERS",
"line" => 0
],
[
"type" => "_v",
"name" => "foo | bar | baz",
"otag" => "{{",
"ctag" => "}}",
"line" => 0,
"index" => 33
]
]
but is now parsed as:
[
[
"type" => "%",
"name" => "FILTERS",
"line" => 0
],
[
"type" => "_v",
"name" => "foo",
"otag" => "{{",
"ctag" => "}}",
"line" => 0,
"index" => 33,
"filters" => [
"bar",
"baz"
]
]
]
Mustache.php v2.6.1
Mustache.php v2.6.0
Lots of little changes, plus two bigger ones:
- Fix disabling lambda template cache option: it didn't before, now it does.
- Improve tokenizer performance: 25-60% performance boost!
Mustache.php v2.5.1
Fix a tokenization error with sections containing only the number zero.
Yay PHP!
Mustache.php v2.5.0
- Add section filter support
- Add more flexible cache options (thanks @amitsnyderman!)
- A nested partials whitespace bugfix
- Add ArrayAccess context lookup support (thanks @kriss0r!)
- Some lambda section optimizations and smarter lambda cache defaults
Mustache.php v2.4.1
- Fix autoloader for paths starting with
./
(thanks @mirkolofio!) - Allow stream URIs in Filesystem Loader (thanks @mlebrun!)
- Fix bonus indents in lambda sections inside indented partials