All notable changes to this project will be documented in this file, in reverse chronological order by release.
Please note: changelogs were introduced starting with 2.0. For information on previous versions, read through the release tags.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- Updates the zend-stdlib dependency to also allow version 3, as the features it consumes remain compatible.
- #32 adds
Phly\Mustache\Exception\ExceptionInterface
. - #34 adds a joint MkDocs/Bookdown build chain for the documentation, simplifying documentation creation and rendering.
- #33 adds
AggregateResolver
and namespace support toDefaultResolver
. InDefaultResolver
, it adds the new methodgetNamespaces()
andaddTemplatePath()
.Mustache
now composes anAggregateResolver
by default, which in turn composes aDefaultResolver
at low priority. - #38 updates
Mustache
:- The constructor now can accept an
AggregateResolver
instance. getResolver()
now always returns anAggregateResolver
instance.
- The constructor now can accept an
- #35 adds:
Phly\Mustache\Pragma\PragmaInterface
, which replacesPhly\Mustache\Pragma
, removinggetRenderer()
from the interface, and adding an additional argument,Phly\Mustache\Mustache $mustache
to thehandle()
method.handle()
was renamed torender()
.Phly\Mustache\Pragma\PragmaNameAndTokensTrait
, which replacesPhly\Mustache\Pragma\AbstractPragma
, removing the methods dealing with the renderer.Phly\Mustache\Pragma\PragmaCollection
, which aggregates pragmas.Phly\Mustache\Mustache::getPragmas()
, which returns aPragmaCollection
instance.
- #37 adds a new pragma,
CONTEXTUAL-ESCAPE
, handled byPhly\Mustache\Pragma\ContextualEscape
. It allows specifying an escape context for variables using the syntax{{varname|context}}
, and supports the contextshtml
,attr
,js
,css
, andurl
. When encountered, it will pass the current value for the variable to the appropriateZend\Escaper\Escaper
method in order to escape it.
- Nothing.
- #32 removes the
Phly\Mustache\Exception
interface, in favor ofPhly\Mustache\Exception\ExceptionInterface
. - #34 removes ReStructured Text documentation in favor of Markdown.
- #33 removes the method
setTemplatePath()
from theDefaultResolver
, and removes the methodssetTemplatePath()
,setSuffix()
, andgetSuffix()
fromMustache
. - #35 removes:
Phly\Mustache\Pragma
, in favor ofPhly\Mustache\Pragma\PragmaInterface
; the new interface removes thegetRenderer()
method, and renames thehandle()
method torender()
.- All public methods in
Phly\Mustache\Renderer
related to adding, removing, and manipulating pragmas; these are now managed byMustache::getPragmas()
. - The
Mustache
argument to thePhly\Mustache\Pragma\SubViews
constructor was removed, as theMustache
instance is now passed to thehandle()
method.
- #38 updates
Mustache
to remove thesetResolver()
method; anAggregateResolver
can be added at construction if desired. - #41 removes all protected methods and properties, making the private.
- #40 modifies the
PragmaInterface::render()
signature to remove the$token
and$data
arguments, and replace them witharray $tokenStruct
. - #37 removes the ability to specify
a custom escaper callback; it now only accepts
Zend\Escaper\Escaper
instances.
- #31 refactors the project to:
- Require PHP 5.5+. Some features from 5.4 have been specifically adopted (short array syntax), and more will be added in the future.
- Follow PSR-4.
- Use PHP_CodeSniffer for coding standards checks.
- Modernize the Travis configuration, and use docker builds, a proper build matrix with conditional tests based on environment, etc.
- #32 refactors exceptions, having them extend appropriate SPL exceptions.
- #40 fixes the
Lexer
to only delegate to a composedPragmaInterface
instance if the given pragma has been matched in the current scope.