From 794345ccbba385e289ecffc80d4e074140f8b7b6 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Mon, 4 Dec 2023 13:50:59 -0800 Subject: [PATCH 1/5] Update release script --- dev-bin/release.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/dev-bin/release.sh b/dev-bin/release.sh index e8444c8..2656a9d 100755 --- a/dev-bin/release.sh +++ b/dev-bin/release.sh @@ -46,10 +46,10 @@ php composer.phar update --no-dev perl -pi -e "s/(?<=const VERSION = ').+?(?=';)/$tag/g" src/MinFraud/ServiceClient.php -box_phar_hash='d862951a7acca5641bdd3d3e289e675f3c46810c7994aebfe0c9188a80f6cac1 box.phar' +box_phar_hash='c24c400c424a68041d7af146c71943bf1acc0c5abafa45297c503b832b9c6b16 box.phar' if ! echo "$box_phar_hash" | sha256sum -c; then - wget -O box.phar "https://github.com/box-project/box/releases/download/4.0.1/box.phar" + wget -O box.phar "https://github.com/box-project/box/releases/download/4.5.1/box.phar" fi echo "$box_phar_hash" | sha256sum -c @@ -87,16 +87,17 @@ else popd fi + if [ -n "$(git status --porcelain)" ]; then echo ".gh-pages is not clean" >&2 exit 1 fi # Using Composer is possible, but they don't recommend it. -phpdocumentor_phar_hash='4a93d278fd4581f17760903134d85fcde3d40d93f739c8c648f3ed02c9c3e7bb phpDocumentor.phar' +phpdocumentor_phar_hash='bad7e4b8c99e73391bb3183a127593ecd1cd66ae42b4a33efe495d193e257f04 phpDocumentor.phar' if ! echo "$phpdocumentor_phar_hash" | sha256sum -c; then - wget -O phpDocumentor.phar https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.3.1/phpDocumentor.phar + wget -O phpDocumentor.phar https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.4.3/phpDocumentor.phar fi echo "$phpdocumentor_phar_hash" | sha256sum -c @@ -106,12 +107,16 @@ cachedir="/tmp/phpdoc-$$-$RANDOM" rm -rf "$cachedir" php phpDocumentor.phar \ + --visibility=public \ + --cache-folder="$cachedir" \ + --title="minFraud PHP API $tag" \ + run \ -d "$PWD/../src" \ - -d "$PWD/.geoip2/src" \ - --visibility public \ - --cache-folder "$cachedir" \ - --title "minFraud PHP API $tag" \ -t "doc/$tag" +# This used to work but doesn't as of 4.5.1. They say that they are working +# on fixing it. Neither the config file nor the relative path fix work as +# suggested either. +# -d "$PWD/.geoip2/src" \ rm -rf "$cachedir" From 610d2fbdeb2157589edc9848bde16ed1d62371be Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Mon, 4 Dec 2023 13:52:43 -0800 Subject: [PATCH 2/5] Update dependencies --- CHANGELOG.md | 4 ++++ composer.json | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a05ee28..7271191 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ CHANGELOG * BREAKING: The `rawResponse` property on model classess has been removed. Use the `jsonSerialize` method instead. * BREAKING: The inheritance hierarchy on model classes has changed. +* Updated `geoip2/geoip2` to version that includes the `isAnycast` property on + `GeoIp2\Record\Traits`. This property is `true` if the IP address belongs to + an [anycast network](https://en.wikipedia.org/wiki/Anycast). This is available + in minFraud Insights and Factors. 1.23.0 (2023-03-06) ------------------- diff --git a/composer.json b/composer.json index e858030..c1c0e3d 100644 --- a/composer.json +++ b/composer.json @@ -19,9 +19,9 @@ "require": { "php": ">=8.1", "ext-json": "*", - "geoip2/geoip2": "^v3.0.0-alpha3", + "geoip2/geoip2": "^v3.0.0", "maxmind/web-service-common": "^0.9.0", - "respect/validation": "~2.1" + "respect/validation": "^2.2.4" }, "require-dev": { "friendsofphp/php-cs-fixer": "3.*", @@ -44,4 +44,4 @@ "sniff": "phpcs -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src/ tests/", "format": "phpcbf -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src/ tests/" } -} +} \ No newline at end of file From 20a8d3f4ec4e2c580a447f2b4493f30ae6aafd39 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Mon, 4 Dec 2023 13:56:54 -0800 Subject: [PATCH 3/5] Set release date --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7271191..063f531 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ CHANGELOG ========= -2.0.0 -------------------- +2.0.0 (2023-12-04) +------------------ * IMPORTANT: PHP 8.1 or greater is now required. * BREAKING: Read-only properties are now used for the model class rather than From 2d2b8ffe24eda703ab7dc50ca2bf55bef2153d2a Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Mon, 4 Dec 2023 14:34:59 -0800 Subject: [PATCH 4/5] Add .phpunit.cache/ to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c28556d..f38a9da 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ _site .idea .php_cs.cache .php-cs-fixer.cache +.phpunit.cache/ .phpunit.result.cache box.phar build From fe57c573dd13ba3b6d86ae2c0e91a97e7b3bb2bf Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Mon, 4 Dec 2023 14:38:52 -0800 Subject: [PATCH 5/5] Update for v2.0.0 --- src/MinFraud/ServiceClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MinFraud/ServiceClient.php b/src/MinFraud/ServiceClient.php index a19d360..5609709 100644 --- a/src/MinFraud/ServiceClient.php +++ b/src/MinFraud/ServiceClient.php @@ -10,7 +10,7 @@ abstract class ServiceClient { - public const VERSION = 'v1.23.0'; + public const VERSION = 'v2.0.0'; /** * @var Client