- #29 Fix loading some templates on Windows
- #25 Can't register namespaces, functions & filters in plugins
- #26 Somehow allow adding safe functions
Breaking changes:
- Removed the
twigboolean option. The plugin is now active if it’s installed (classical installation). For Composer installs, there is a separate registering step. - Removed the
twig.env.classesoption andnew()Twig function. - Twig’s template cache is now disabled by default (enable with
c::set('twig.cache', true);). - Error reporting: the
twig.errorconfig key is now ignored. Instead, the site’s main error page (whose URI iserrorby default) will be used in some specific situations. Seedoc/errors.mdfor details. - Namespace and class names (and sometimes methods) have changed (again); there is now a
Kirby\Twig\Pluginclass which will act as a stable API, while other implementation details may change.
Deprecated (still working):
twig.env.functionsin favor oftwig.function.myFunction;twig.env.filtersin favor oftwig.filter.myFilter;twig.env.namespace.xyzin favor oftwig.namespace.xyz.
See on GitHub: