Skip to content

Commit ad5cd89

Browse files
committed
Release 2.1.0
1 parent 99ac86f commit ad5cd89

1 file changed

Lines changed: 72 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5+
6+
## [2.1.0] Uncontrolled Space - 2026-04-26
7+
8+
### Added
9+
- `parseWithoutProcessing()` method.
10+
11+
### Changed
12+
- Optimized whitespace control and lexer position advancement.
13+
- Removed underscore from `PathExpression::this_` to align with the Handlebars.js AST.
14+
15+
### Fixed
16+
- Close tag indentation wasn't consistently stripped from chained `{{else if}}` branches of a standalone block.
17+
- Tilde whitespace control in one `{{~else if}}` branch unexpectedly leaked onto unrelated branches.
18+
19+
Both of the above issues stemmed from bugs in the Handlebars.js parser, and I opened PR
20+
[handlebars-lang/handlebars-parser#31](https://github.com/handlebars-lang/handlebars-parser/pull/31) to also fix them there.
21+
22+
23+
## [2.0.0] Stateless Parser - 2026-04-02
24+
25+
### Changed
26+
- Moved the optional `ignoreStandalone` parameter from `ParserFactory::create()` to the `Parser::parse()` method.
27+
This makes the parser instance independent of options so it can be reused when compiling multiple templates,
28+
enabling better performance and lower memory usage.
29+
30+
31+
## [1.1.2] Zero Head - 2026-04-01
32+
33+
### Fixed
34+
- Parsing of `0` as path expression head (https://github.com/devtheorem/php-handlebars/issues/16).
35+
36+
### Changed
37+
- Optimized parser slightly by replacing a few unnecessary `preg_match` calls.
38+
39+
40+
## [1.1.1] Root SubExpression - 2026-03-23
41+
42+
### Fixed
43+
- Parsing of SubExpressions that are PathExpression roots.
44+
45+
46+
## [1.1.0] Optimal Lexer - 2026-02-24
47+
48+
This release will be the foundation for [PHP Handlebars](https://github.com/devtheorem/php-handlebars) 1.0.
49+
50+
### Changed
51+
- Optimized position tracking to avoid per-token full-text rescans.
52+
- Made use of the `preg_match()` offset parameter and `\G` anchor to avoid per-token string allocations.
53+
- Combined alternation pattern per state: replaced N separate `preg_match()` calls (one per rule) with a single
54+
call against a per-state `/\G(?:(rule0)|(rule1)|...)/` pattern, letting PCRE try all alternatives in one pass.
55+
56+
### Added
57+
- Benchmark to test parsing a large, complex template 1000 times.
58+
59+
In this release, parsing a complex, 13 KB Handlebars template is now about 30x faster than in v1.0.0.
60+
61+
62+
## [1.0.0] Initial Release - 2026-02-20
63+
64+
The full Handlebars.js grammar, whitespace control, and parse error handling is now implemented in native PHP.
65+
66+
67+
[2.1.0]: https://github.com/devtheorem/php-handlebars-parser/compare/v2.0.0...v2.1.0
68+
[2.0.0]: https://github.com/devtheorem/php-handlebars-parser/compare/v1.1.2...v2.0.0
69+
[1.1.2]: https://github.com/devtheorem/php-handlebars-parser/compare/v1.1.1...v1.1.2
70+
[1.1.1]: https://github.com/devtheorem/php-handlebars-parser/compare/v1.1.0...v1.1.1
71+
[1.1.0]: https://github.com/devtheorem/php-handlebars-parser/compare/v1.0.0...v1.1.0
72+
[1.0.0]: https://github.com/devtheorem/php-handlebars-parser/tree/v1.0.0

0 commit comments

Comments
 (0)