Skip to content

Commit aa64cac

Browse files
aymanrbclaude
andcommitted
Introduce CHANGELOG.md following Keep a Changelog format
Adds a structured CHANGELOG.md with Added/Changed/Fixed/Removed sections for each release. Covers v3.0.1 (this release), v3.0.0, and brief notes for the v2.x and v1.x generations. Comparison links at the bottom allow navigating diffs between any two releases on GitHub. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 920e1f2 commit aa64cac

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [3.1.0] - 2026-03-22
11+
12+
### Added
13+
- `ParseResult::getOrFail(string $key): string` — strict key accessor with a non-nullable return type, as a cleaner alternative to `get($key, true)`.
14+
- `ParseResult` now implements `\IteratorAggregate` and `\Countable`, enabling native `foreach` iteration and `count()` without calling `getParsedRawData()`.
15+
- Template variable name validation in `TemplatesHelper::prepareTemplate()`: variable names that are not valid PCRE named capture group identifiers now throw `InvalidTemplateVariableNameException` immediately instead of silently producing broken regex.
16+
- In-memory template cache in `TemplatesHelper`: prepared regex patterns are cached by file path for the lifetime of the `TemplatesHelper` instance, eliminating redundant `file_get_contents()` and regex compilation on repeated `parseText()` calls.
17+
- Added PHPStan level-8 static analysis
18+
19+
### Changed
20+
- Log messages in `TextParser` now include: file path and byte count in `parseFileContent()`, text length and template count with similarity-mode flag in `parseText()`, template basename on each attempt, extracted key count on a successful match, and an explicit no-match log when no template fits.
21+
- `parseText()` returns early with an empty `ParseResult` and a `warning`-level log when called with an empty or whitespace-only string, avoiding meaningless similarity comparisons and wasted I/O.
22+
23+
## [3.0.0] - 2026-03-14
24+
25+
### Added
26+
- PHP 8.1+ first-class callable syntax (`$this->cleanElement(...)`) in `ParseResult`.
27+
28+
### Changed
29+
- Minimum PHP version raised to `^8.1`; PHP 7.4 is no longer supported.
30+
- PHPUnit upgraded from `^8.5` to `^10.5`.
31+
32+
## [2.x]
33+
34+
### Added
35+
- `ParseResult` value object replacing raw array returns.
36+
- PSR-3 logger support via `LoggerAwareTrait`.
37+
- Specific exception classes inheriting from `UnstructuredTextParserException`.
38+
39+
## [1.x]
40+
41+
- Initial implementation returning plain arrays from the parser.

0 commit comments

Comments
 (0)