DomTemplate: Minor bugfixes & PHP 8.1 compatibility
Published on by Greg Bowler
fix: bind multiple attribute placeholders https://github.com/PhpGt/DomTemplate/pull/327
Example: <a href="/path/to/{{project}}/with/{{another}}/attribute/placeholder"> - any attribute can now contain multiple placeholders.
290 default placeholder https://github.com/PhpGt/DomTemplate/pull/328
Example:
Hello, {{name ?? you}}!
fix: resolve deprecation notices https://github.com/PhpGt/DomTemplate/pull/329
PHP 9 will introduce a lot more strict typing, and 8.1 has started emitting deprecation notices. These have all been addressed in this release.
fix: insert template before correct element https://github.com/PhpGt/DomTemplate/pull/330
When template elements have more than one similar siblings, the correct next sibling is remembered, and the template element is inserted in the correct position.
Identify template parents when there are ambiguous XPath selectors https://github.com/PhpGt/DomTemplate/pull/337
Similarly to above, when two or more template elements have similarly-addressed parents, the template element is now always added to the correct one.