From 00d11897f13178016348bc3164b2f151320f6652 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Sun, 24 Jul 2022 20:24:17 +0100 Subject: [PATCH 1/6] build: upgrade dom requirement and loosen version range --- composer.json | 2 +- composer.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index bc58106..3dcba5b 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "require": { "php": ">=8.1", "ext-dom": "*", - "phpgt/dom": "v4.0.1" + "phpgt/dom": "^v4.0" }, "require-dev": { "phpstan/phpstan": "v1.8.1", diff --git a/composer.lock b/composer.lock index 64e87f3..44ec4c5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b57878c0e886a9e8f58619865fa2caa7", + "content-hash": "e544480a9ca0ce7658c288d6d07887ab", "packages": [ { "name": "phpgt/cssxpath", @@ -62,16 +62,16 @@ }, { "name": "phpgt/dom", - "version": "v4.0.1", + "version": "v4.0.2", "source": { "type": "git", "url": "https://github.com/PhpGt/Dom.git", - "reference": "6d802e8ed4b3bf42887d1ea23a10ebf29094d492" + "reference": "32106d0ea4273f9366d35e58bfdf3bfdb2548c7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PhpGt/Dom/zipball/6d802e8ed4b3bf42887d1ea23a10ebf29094d492", - "reference": "6d802e8ed4b3bf42887d1ea23a10ebf29094d492", + "url": "https://api.github.com/repos/PhpGt/Dom/zipball/32106d0ea4273f9366d35e58bfdf3bfdb2548c7a", + "reference": "32106d0ea4273f9366d35e58bfdf3bfdb2548c7a", "shasum": "" }, "require": { @@ -84,7 +84,7 @@ "psr/http-message": "^1.0" }, "require-dev": { - "phpstan/phpstan": "v1.8.0", + "phpstan/phpstan": "v1.8.2", "phpunit/phpunit": "v9.5.21" }, "type": "library", @@ -148,7 +148,7 @@ "description": "The modern DOM API for PHP projects.", "support": { "issues": "https://github.com/PhpGt/Dom/issues", - "source": "https://github.com/PhpGt/Dom/tree/v4.0.1" + "source": "https://github.com/PhpGt/Dom/tree/v4.0.2" }, "funding": [ { @@ -156,7 +156,7 @@ "type": "github" } ], - "time": "2022-07-12T15:19:44+00:00" + "time": "2022-07-24T18:51:01+00:00" }, { "name": "phpgt/propfunc", From 5d58fc48eba3626c14935007d11a0363c34eb240 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Thu, 18 Aug 2022 15:00:19 +0100 Subject: [PATCH 2/6] docs: update examples --- examples/binding/01-simple.php | 10 ++ examples/binding/02-non-trivial.php | 46 +++++++++ examples/binding/03-bindValue.php | 9 ++ examples/binding/04-bindKeyValue.php | 10 ++ examples/binding/05-bindData.php | 17 ++++ examples/binding/06-bindList.php | 18 ++++ examples/binding/07-bindListCallback.php | 18 ++++ .../binding/08-bindListCallback-nested.php | 93 +++++++++++++++++++ examples/binding/08-bindTable.php | 35 ------- examples/binding/09-bindTable.php | 82 ++++++++++++++++ 10 files changed, 303 insertions(+), 35 deletions(-) create mode 100644 examples/binding/08-bindListCallback-nested.php delete mode 100644 examples/binding/08-bindTable.php create mode 100644 examples/binding/09-bindTable.php diff --git a/examples/binding/01-simple.php b/examples/binding/01-simple.php index a0cd4be..3837060 100644 --- a/examples/binding/01-simple.php +++ b/examples/binding/01-simple.php @@ -7,6 +7,7 @@ // EXAMPLE CODE: https://github.com/PhpGt/DomTemplate/wiki/Binding#simplest-possible-usage $html = <<

Name

HTML; @@ -21,3 +22,12 @@ function example(DocumentBinder $binder):void { example($binder); $binder->cleanDatasets(); echo $document; + +/* Output: + + + +

Cody

+ + +*/ diff --git a/examples/binding/02-non-trivial.php b/examples/binding/02-non-trivial.php index 8bd25f3..9382906 100644 --- a/examples/binding/02-non-trivial.php +++ b/examples/binding/02-non-trivial.php @@ -10,6 +10,7 @@ // EXAMPLE CODE: https://github.com/PhpGt/DomTemplate/wiki/Binding#non-trivial-usage $html = <<

Top three drivers of 0000