From 8633e13d1989defe92bfb8178027ea1a547f0b5e Mon Sep 17 00:00:00 2001 From: kazsaj Date: Thu, 29 Dec 2022 23:04:05 +0000 Subject: [PATCH 1/3] Updated doctrine/annotations version requirement --- composer.json | 86 +++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/composer.json b/composer.json index 4cf1dfc..42c46ce 100644 --- a/composer.json +++ b/composer.json @@ -1,47 +1,47 @@ { - "name": "realexpayments/rxp-hpp-php", - "type": "library", - "description": "SDK to send requests and parse responses from Realex Payments using HPP", - "keywords": [ - "realex", - "payments", - "HPP" - ], - "authors": [ - { - "name": "Realex Payments", - "homepage": "https://www.realexpayments.com/" + "name": "realexpayments/rxp-hpp-php", + "type": "library", + "description": "SDK to send requests and parse responses from Realex Payments using HPP", + "keywords": [ + "realex", + "payments", + "HPP" + ], + "authors": [ + { + "name": "Realex Payments", + "homepage": "https://www.realexpayments.com/" + }, + { + "name": "Victor Palomares", + "homepage": "http://www.softwaredesign.ie", + "role": "Developer" + } + ], + "license": "MIT", + "require": { + "php": ">=5.3.9", + "apache/log4php": "2.3.*", + "symfony/validator": "2.7.*", + "doctrine/annotations": "~1", + "doctrine/cache": "1.4.*" }, - { - "name": "Victor Palomares", - "homepage": "http://www.softwaredesign.ie", - "role": "Developer" - } - ], - "license": "MIT", - "require": { - "php": ">=5.3.9", - "apache/log4php": "2.3.*", - "symfony/validator": "2.7.*", - "doctrine/annotations":"1.2.*", - "doctrine/cache":"1.4.*" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, - "autoload": { - "psr-4": { - "com\\realexpayments\\hpp\\sdk\\": [ - "src/main/php/com-realexpayments-hpp-sdk" - ] - } - }, - "autoload-dev": { - "psr-4": { - "com\\realexpayments\\hpp\\sdk\\": [ - "src/main/php/com-realexpayments-hpp-sdk", - "test/main/php/com-realexpayments-hpp-sdk" - ] + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "autoload": { + "psr-4": { + "com\\realexpayments\\hpp\\sdk\\": [ + "src/main/php/com-realexpayments-hpp-sdk" + ] + } + }, + "autoload-dev": { + "psr-4": { + "com\\realexpayments\\hpp\\sdk\\": [ + "src/main/php/com-realexpayments-hpp-sdk", + "test/main/php/com-realexpayments-hpp-sdk" + ] + } } - } } From df56806a183cde921b85784d76ce665331c68016 Mon Sep 17 00:00:00 2001 From: kazsaj Date: Thu, 29 Dec 2022 23:16:33 +0000 Subject: [PATCH 2/3] PHPUnit update to 8.3 --- .gitignore | 3 ++- composer.json | 2 +- test/main/php/com-realexpayments-hpp-sdk/RealexHppTest.php | 4 ++-- test/main/php/com-realexpayments-hpp-sdk/SampleJsonData.php | 2 +- .../php/com-realexpayments-hpp-sdk/domain/HppRequestTest.php | 2 +- .../com-realexpayments-hpp-sdk/utils/GenerationUtilsTest.php | 2 +- .../php/com-realexpayments-hpp-sdk/utils/JsonUtilsTest.php | 2 +- .../com-realexpayments-hpp-sdk/utils/ValidationUtilsTest.php | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 6da56fa..cb67432 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ vendor/composer vendor/doctrine vendor/symfony vm-config/ -adhoc/ \ No newline at end of file +adhoc/ +.phpunit.result.cache \ No newline at end of file diff --git a/composer.json b/composer.json index 42c46ce..180484f 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "doctrine/cache": "1.4.*" }, "require-dev": { - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^8.3" }, "autoload": { "psr-4": { diff --git a/test/main/php/com-realexpayments-hpp-sdk/RealexHppTest.php b/test/main/php/com-realexpayments-hpp-sdk/RealexHppTest.php index c74c4da..9e2906f 100644 --- a/test/main/php/com-realexpayments-hpp-sdk/RealexHppTest.php +++ b/test/main/php/com-realexpayments-hpp-sdk/RealexHppTest.php @@ -9,7 +9,7 @@ * @author vicpada * */ -class RealexHppTest extends \PHPUnit_Framework_TestCase +class RealexHppTest extends \PHPUnit\Framework\TestCase { /** @@ -17,7 +17,7 @@ class RealexHppTest extends \PHPUnit_Framework_TestCase */ private static $realex_HPP; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$realex_HPP = new RealexHpp(SampleJsonData::SECRET); } diff --git a/test/main/php/com-realexpayments-hpp-sdk/SampleJsonData.php b/test/main/php/com-realexpayments-hpp-sdk/SampleJsonData.php index 28b39d1..8c7abe1 100644 --- a/test/main/php/com-realexpayments-hpp-sdk/SampleJsonData.php +++ b/test/main/php/com-realexpayments-hpp-sdk/SampleJsonData.php @@ -6,7 +6,7 @@ use com\realexpayments\hpp\sdk\domain\Flag; use com\realexpayments\hpp\sdk\domain\HppRequest; use com\realexpayments\hpp\sdk\domain\HppResponse; -use PHPUnit_Framework_TestCase; +use \PHPUnit\Framework\TestCase as PHPUnit_Framework_TestCase; /** * Class containing sample JSON data and methods to check test data matches expected values. diff --git a/test/main/php/com-realexpayments-hpp-sdk/domain/HppRequestTest.php b/test/main/php/com-realexpayments-hpp-sdk/domain/HppRequestTest.php index 8c880bc..8cb2e34 100644 --- a/test/main/php/com-realexpayments-hpp-sdk/domain/HppRequestTest.php +++ b/test/main/php/com-realexpayments-hpp-sdk/domain/HppRequestTest.php @@ -10,7 +10,7 @@ * @author vicpada * */ -class HppRequestTest extends \PHPUnit_Framework_TestCase +class HppRequestTest extends \PHPUnit\Framework\TestCase { const TIMESTAMP = "20130814122239"; const MERCHANT_ID = "thestore"; diff --git a/test/main/php/com-realexpayments-hpp-sdk/utils/GenerationUtilsTest.php b/test/main/php/com-realexpayments-hpp-sdk/utils/GenerationUtilsTest.php index 479e06f..20fa62f 100644 --- a/test/main/php/com-realexpayments-hpp-sdk/utils/GenerationUtilsTest.php +++ b/test/main/php/com-realexpayments-hpp-sdk/utils/GenerationUtilsTest.php @@ -9,7 +9,7 @@ * @package com\realexpayments\hpp\sdk\utils * @author vicpada */ -class GenerationUtilsTest extends \PHPUnit_Framework_TestCase { +class GenerationUtilsTest extends \PHPUnit\Framework\TestCase { /** * Test Hash generation success case. diff --git a/test/main/php/com-realexpayments-hpp-sdk/utils/JsonUtilsTest.php b/test/main/php/com-realexpayments-hpp-sdk/utils/JsonUtilsTest.php index 0626550..52a98b0 100644 --- a/test/main/php/com-realexpayments-hpp-sdk/utils/JsonUtilsTest.php +++ b/test/main/php/com-realexpayments-hpp-sdk/utils/JsonUtilsTest.php @@ -16,7 +16,7 @@ * @author vicpada * */ -class JsonUtilsTest extends \PHPUnit_Framework_TestCase { +class JsonUtilsTest extends \PHPUnit\Framework\TestCase { /** * Test converting {@link HppRequest} to JSON. diff --git a/test/main/php/com-realexpayments-hpp-sdk/utils/ValidationUtilsTest.php b/test/main/php/com-realexpayments-hpp-sdk/utils/ValidationUtilsTest.php index e14f631..f42b611 100644 --- a/test/main/php/com-realexpayments-hpp-sdk/utils/ValidationUtilsTest.php +++ b/test/main/php/com-realexpayments-hpp-sdk/utils/ValidationUtilsTest.php @@ -14,7 +14,7 @@ * * @author vicpada */ -class ValidationUtilsTest extends \PHPUnit_Framework_TestCase { +class ValidationUtilsTest extends \PHPUnit\Framework\TestCase { /** From bc6d46b2eebf85a2454fb787c617a6f6e7dba287 Mon Sep 17 00:00:00 2001 From: kazsaj Date: Thu, 29 Dec 2022 23:16:36 +0000 Subject: [PATCH 3/3] Readme update --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index ec6a029..df6293d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ +# Purpose of this fork + +This is a fork to update any incompatibilities with PHP8. Below list of known problems: +- doctrine/annotations 1.2.x is incompatible with PHP8, requirement changed to accept any 1.x +- phpunit/phpunit updated to 8.3, so that tests are runnable on newer version of PHP + +Contents of original README start below. + +--- + # Please use our new PHP SDK We've moved. We highly recommend you use the Global Payments PHP SDK which supports all the features of this SDK and will benefit from all future releases: