Releases: phpgt/DomTemplate
QA tests
Tighter quality assurance tests have finally been implemented into DomTemplate.
This issue has been tracked for a while, but because of the extra complexity DomTemplate adds over Dom, it was proving difficult to get any traction with Code Sniffer and Mess Detector tests.
This latest release has not changed any external facing functionality, but internally has implemented.
The drive to implement phpcs and phpmd forced a refactor of some internal classes. Several large, procedural methods have been broken down intro smaller private helpers across the binding pipeline, especially BindableCache, TableBinder, HTMLAttributeBinder, ListBinder, PartialExpander and CommentIni.
The public behaviour looks intended to stay broadly the same, but the internal flow is now much more decomposed: bindable-class discovery, table normalisation/binding, attribute binding, list-item binding, and comment-INI parsing have all been split into narrower responsibilities.
Cyclomatic complexity is now below the measured threshold of 10 and all systems are green. Enjoy, and have fun!
List binding improvements
November 2024 patch release
What's Changed
- Bindable cache recursive by @g105b in #496
- feature: allow binding directly to
data-elementby @g105b in #498
Full Changelog: v3.4.1...v3.4.2
April 2024 release
What's Changed
- Automatically binding nested array iterators by @g105b in #487
- 489 bindable cache method OR property name by @g105b in #490
- feature: @ bind key synonymous for name by @g105b in #493
- feature: pass selectors instead of element references by @g105b in #494
Full Changelog: v3.4.0...v3.4.1
Remove elements with bind attribute
IteratorAggregate objects
Type check - ReflectionNamedType
Remove data-elements as last operation
Introduce data-element
This release introduces a helper attribute, data-element, which can be used to remove unbound elements from the document. Documentation here: https://github.com/PhpGt/DomTemplate/wiki/automatically-remove-unbound-elements
What's Changed
Full Changelog: v3.2.0...v3.2.1
March 2023 minor release
What's Changed
- bindable non scalar object properties by @g105b in #393
- Trim whitespace where there are only template children in an element by @g105b in #394
- Binding a list of options, with already existing select options by @g105b in #395
- Modifier tests - more tests to enforce documented functionality by @g105b in #396
- Improvements to TableBinding by @g105b in #397
- Simplified casting of bind value by @g105b in #399
- Handle [vars] section of comment ini by @g105b in #401
- Tidy up after quality analysis by @g105b in #403
- PHPUnit 10 by @g105b in #408
- Improvements to working with lists of data (data-bind:list and nested object improvements) by @g105b in #415
- data-list replaces data-template by @g105b in #417
Full Changelog: v3.1.5...v3.2.0