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

PHP8 fixes #24

Closed
wants to merge 3 commits into from
Closed
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ vendor/composer
vendor/doctrine
vendor/symfony
vm-config/
adhoc/
adhoc/
.phpunit.result.cache
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
86 changes: 43 additions & 43 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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": "^8.3"
},
"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"
]
}
}
}
}
4 changes: 2 additions & 2 deletions test/main/php/com-realexpayments-hpp-sdk/RealexHppTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
* @author vicpada
*
*/
class RealexHppTest extends \PHPUnit_Framework_TestCase
class RealexHppTest extends \PHPUnit\Framework\TestCase
{

/**
* @var RealexHpp
*/
private static $realex_HPP;

public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
self::$realex_HPP = new RealexHpp(SampleJsonData::SECRET);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @author vicpada
*
*/
class JsonUtilsTest extends \PHPUnit_Framework_TestCase {
class JsonUtilsTest extends \PHPUnit\Framework\TestCase {

/**
* Test converting {@link HppRequest} to JSON.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @author vicpada
*/
class ValidationUtilsTest extends \PHPUnit_Framework_TestCase {
class ValidationUtilsTest extends \PHPUnit\Framework\TestCase {


/**
Expand Down