Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for 2.0.0 #157

Merged
merged 5 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ _site
.idea
.php_cs.cache
.php-cs-fixer.cache
.phpunit.cache/
.phpunit.result.cache
box.phar
build
Expand Down
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
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
magic methods.
* 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)
-------------------
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.*",
Expand All @@ -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/"
}
}
}
21 changes: 13 additions & 8 deletions dev-bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion src/MinFraud/ServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

abstract class ServiceClient
{
public const VERSION = 'v1.23.0';
public const VERSION = 'v2.0.0';

/**
* @var Client
Expand Down