Releases: bobthecow/mustache.php
Releases · bobthecow/mustache.php
Mustache.php v3.0.0
Mustache.php v3.x drops support for PHP 5.2–5.5, but is otherwise backwards compatible with v2.x.
To ease the transition, previous behavior can be preserved via configuration:
- The
strict_callables
config option now defaults totrue
. Lambda sections should use closures or callable objects. To continue supporting array-style callables for lambda sections (e.g.[$this, 'foo']
), setstrict_callables
tofalse
. - A context shadowing bug from v2.x has been fixed, but if you depend on the previous buggy behavior you can preserve it via the
buggy_property_shadowing
config option. - By default the return value of higher-order sections that are rendered via the lambda helper will no longer be double-rendered. To preserve the previous behavior, set
double_render_lambdas
totrue
. This is not recommended.
Note
In order to maintain a wide PHP version support range, there are minor changes to a few interfaces, which you might need to handle if you extend Mustache (see c0453be).
New
\Mustache_Engine
and other prefixed classnames are all available as\Mustache\Engine
, etc. You can keep using the old style for now, if you feel nostalgic for 2008, but you'll want to update eventually.- Adds support for the Mustache dynamic tag names spec for partials and interpolation.
Improved
- The
{{% BLOCKS }}
pragma is now part of the Mustache spec, and is enabled by default. - Optional Mustache specs (
lambdas
,inheritance
, anddynamic_names
) can now be disabled via config options. - No more warnings or errors in PHP 8.x (thanks @reedy, @swissspidy, and everyone else who helped with this!).
- Improved resolution of complicated combinations of filters, dotted name lookups, and lambdas.
- Remove autoloader implementation. Just use Composer.
Mustache.php v3.0.0-alpha1
Mustache.php v3.0 will drop support for PHP <5.6.
- No more warnings or errors in PHP 8.x (thanks @reedy, @swissspidy, and everyone else who helped with this!).
- Finally get rid of the pseudo-namespaced classes (
\Mustache_Engine
->\Mustache\Engine
) like it's 2009. - Preserve compatibility with non-namespaced class names (e.g.
\Mustache_Engine
) because let's not be too hasty. - Remove autoloader implementation. Just use Composer.
This release should be a drop-in replacement for Mustache.php v2.x, provided you're using at least PHP 5.6. You are using at least PHP 5.6, right?
- In order to preserve the wide PHP version support range, there are some minor changes to interfaces, which you might need to handle if you extend Mustache (see c0453be).
Mustache.php v2.14.2
- Throw syntax error for unclosed tags.
- Remove dev dependency on deprecated YAML library.
Mustache.php v2.14.1 — Security release
- Fix CVE-2022-0323, possible RCE when rendering untrusted user templates, reported by @altm4n via huntr.dev
- Improve compatibility with PHP 8.1
Mustache.php v2.14.0
- Improve compatibility with PHP 8.1 (thanks @schlessera!)
- Update spec to v1.2.2
- Various README and CONTRIBUTORS updates (thanks @samizdam and @Kirill89!)
- Add .gitattributes for better release packaging (thanks @fezfez!)
Mustache.php v2.13.0
- Fix notices on PHP 7.4 (Thanks @tomjn, @stronk7, and @JoyceBabu!)
- Fix a parse error in the delimiter change tag (e.g.
{{=<% %>=}}
) and throw a syntax error when it's invalid. - Improve Tokenizer::scan performance by 98.2%.
- Test against all the PHPs in CI.
Mustache.php v2.12.0
- Prevent redundant Autoloader registration (Thanks @hcpss-banderson!)
- Add a ProductionFilesystemLoader, which doesn't read template file contents before every render.
- Improve test coverage.
- Fix a bug when rendering the same block names multiple times in one template.
- Add a
delimiters
option for overriding default delimiters at the engine level. - Add validation to prevent empty
template_class_prefix
config.
Mustache.php v2.11.1
- Fix test bootstrap in PHP < 5.5
Mustache.php v2.11.0
- Add support for exception chaining (Thanks @thewilkybarkid!)
- Support parent tags and block args as direct children of blocks and sections.
- Add support for non-local templates via FilesystemLoader (Thanks @oschettler!)
Mustache.php v2.10.0
- Respect delimiter changes inside lambda sections. See janl/mustache.js#489
- Fix incorrect padding added to lambda values inside partials. See #286
- Make LambdaHelper invokable. See #285