Skip to content

Releases: bobthecow/mustache.php

Mustache.php v2.7.0

26 Aug 19:59
Compare
Choose a tag to compare
  • 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

20 Jun 19:36
Compare
Choose a tag to compare
  • Code cleanup (thanks @keradus!)
  • Fix parse error with mismatched triple-mustache delimiters (thanks @smarden1!)

Mustache.php v2.6.0

20 Jun 19:37
Compare
Choose a tag to compare

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

28 Feb 19:36
Compare
Choose a tag to compare

Fix a tokenization error with sections containing only the number zero.

Yay PHP!

Mustache.php v2.5.0

14 Dec 21:01
Compare
Choose a tag to compare
  • 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

13 Aug 04:50
Compare
Choose a tag to compare
  • 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