- Added new unshift method in templates to support prepending content to sections (thanks @kozubsky)
- Added support for PHP8 (thanks @roxblnfk)
- Dropped explicit support for php 5. PHP 7/8 is allowed in composer, and only php 7.3-8.0 are tested in CI pipeline.
- Minor modifications to repo workflow for CI with GitHub Actions instead of Travis
- Migrated docs from Jekyll to Hugo
EDIT (12/24/2020): This release has been abandoned. Some of this work will be merged into the v3 branch, but most of it has been scrapped. This tag will still be available, but a version 4 will not be based off of this alpha release.
v4 has been a complete rewrite in the plates system. It's fairly backwards compatible, but a lot of the internals have changed, and we still have a decent amount of features and work to do for v4.
- Templates are Immutable VO's
- Rendering is handled via RenderTemplate interfaces
- Extensions are first class citizens
- The Engine is now a small wrapper for an IoC Container
- RenderContext API for defining composable functions and more
- Powerful and customizable naming strategies for dynamic base paths
- Multi folder fallbacks
- Relative and Absolute Path templates
- Better Error Handling
- Default Layouts
- Deep Sections #169
- Template Composers
- Static File Rendering
- Image/Base64Encoding Rendering
- And probably a few more ;p
Documentation is lacking for many of these features. Contributions are welcome! The best way to learn about the features it to look at the tests and examples.
- Fixed an issue where template functions were not accessible from extensions.
- Fixed an issued with the URI extension throwing errors when it shouldn't.
- Added the ability to get all template data by calling
- Added the ability to render a template via the
- Added the ability to run the tests using
- Improvements to error handling when rendering templates.
- Various coding style, CI and documentation improvements.
- Added ability to share data across templates.
- Added ability to preassign data to specific templates.
- Added ability to create one-off template functions, without using an extension.
- Added new folder "fall backs", where missing folder templates will fall back to the default folder.
- Added new
Engineclass, improving the use of the
Engineas the primary API.
- Templates variables are now accessed without the
- Total overhaul to how extensions are registered. Replaced
getFunctions()method with new
- Section content is no longer assigned to template variables. Use the the
- Renamed section
stop(). This fits more appropriately with the
pathExists()method in the
getTemplatePath()method in the
makeTemplate()method in the
- Removed the ability to assign template data directly to the
Templateclass. For example:
$this->name = 'Jonathan'. This applies both within and outside of templates. Use the
getEngine()method from the
Templateclass. There's no reason to need this anymore.
addFolders()method from the
unloadExtensionFunction()methods from the