Releases: scottchiefbaker/sluz
Releases · scottchiefbaker/sluz
v0.8.2
- Add parental/wrapper TPL support for frameworks
- Allow function params to be strings as well as integers
- Add unit tests for
fetch()
- Minor performance improvement for simple (most) if statements
- Update docs to use Bootstrap v5.3 and generally be easier to read
Full Changelog: v0.8.1...v0.8.2
v0.8.1
- Minor bugfix for nested if/then statements. We should be MUCH smarter about nested ifs now
Full Changelog: v0.8...v0.8.1
v0.8
- Function calls can now have multiple params
- Better error handling if we call a function that doesn't exist
- First pass at line numbers in error messages
- Error messages aren't so ugly anymore
- Include blocks can now contain variables to pass to child template
- Minor speed improvements from micro-optimizations
- Use
str_contains()
where possible because it's faster thanstr_pos()
- Add
$__FOREACH_FIRST
$__FOREACH_LAST
and$__FOREACH_INDEX
- Better handling of default values
- Work on complicated nested
{if}
statements
Full Changelog: v0.7...v0.8
v0.7
- Support chaining modifiers:
{$word|strtolower|ucfirst}
- Speed up by not processing comments at all
- Nested comments now work
- Improved unit tests for catching corner cases
- Break out
get_blocks()
andprocess_blocks()
for portability - Fix some PHP 8.1 E_DEPRECATED alerts
- Functions can take params now:
{$prefix|substr:0,3}
- Better error handling on functions that are not defined
Full Changelog: v0.6...v0.7
v0.6
- Match Smarty output for foreach on scalars and nulls
- Local bootstrap for unit tests and docs
- Change to
SLUZ_INLINE
as a constant - Various bugfixes
v0.5
- Lots of bug fixes
- Add support for default values in a template
v0.4
- Significant speed improvments (about 120% faster than v0.3)
- Added a simple benchmark script to help compare future versions
- Added
fetch()
anddisplay()
to be consistent with Smarty - Fix a bug where foreach loops could overwrite variables
- Tons of comments added
- Removed a lot of
substr()
because it's slow-ish - Fix a bug where assigning deeply nested hash/arrays wouldn't work
v0.3
- Updated documentation with more examples
- Minor bug fixes
- First public release
v0.2
First full featured release
- Basic variable assignment: scalar, array, hash
- If/then conditionals
- Foreach for arrays and hashes
- Literal to support { and } in templates
- Simple mode
- Inline mode
- Extensive unit tests
- Validates against PHP 7.3, 7.4, 8.0, 8.1
- Documentation and examples with sample syntax