Skip to content
Open
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
20 changes: 7 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ 'ubuntu-latest' ]
php-versions: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1' ]
php-versions: [ '8.1', '8.2', '8.3', '8.4' ]

steps:
- uses: actions/checkout@master
Expand All @@ -36,9 +36,7 @@ jobs:

#get dependencies
- name: Install dependencies
env:
COMPOSER_NO_BLOCKING: 1
run: composer install --prefer-dist --no-progress --no-suggest
run: composer install --prefer-dist --no-progress

#get static analysis tool
- name: Install static analysis tool
Expand All @@ -58,7 +56,7 @@ jobs:
fail-fast: false
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['5.6', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
php-versions: ['8.1', '8.2', '8.3', '8.4']

steps:
- uses: actions/checkout@master
Expand All @@ -74,9 +72,7 @@ jobs:
run: composer validate

- name: Install dependencies
env:
COMPOSER_NO_BLOCKING: 1
run: composer install --prefer-dist --no-progress --no-suggest
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: |
Expand All @@ -91,7 +87,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ 'ubuntu-latest' ]
php-versions: [ '5.6' ]
php-versions: [ '8.1' ]

steps:
- uses: actions/checkout@master
Expand All @@ -106,9 +102,7 @@ jobs:
run: composer validate

- name: Install dependencies
env:
COMPOSER_NO_BLOCKING: 1
run: composer install --prefer-dist --no-progress --no-suggest
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: |
Expand All @@ -118,4 +112,4 @@ jobs:
- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./vendor/bin/php-coveralls -v --exclude-no-stmt
run: ./vendor/bin/php-coveralls -v --exclude-no-stmt
10 changes: 3 additions & 7 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
operating-system: [ 'ubuntu-latest' ]
php-versions: [ '8.1' ]
php-versions: [ '8.4' ]

steps:
- uses: actions/checkout@master
Expand All @@ -26,14 +26,10 @@ jobs:
coverage: xdebug

- name: Install dependencies
env:
COMPOSER_NO_BLOCKING: 1
run: composer install --prefer-dist --no-progress --no-suggest
run: composer install --prefer-dist --no-progress

- name: Install API doc generator tool
env:
COMPOSER_NO_BLOCKING: 1
run: composer create-project --no-dev apigen/apigen:^7.0@alpha tools/apigen
run: composer create-project --no-dev apigen/apigen:^7.0 tools/apigen

- name: Generate Documentation
run: tools/apigen/bin/apigen src --output docs
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ For Hyperwallet v3 API calls, please use the latest SDK version 1.x.x. See [here
Prerequisites
------------

Hyperwallet's PHP server SDK requires at minimum PHP 5.6 and above.
Hyperwallet's PHP server SDK requires PHP 8.1 or later.

Installation
------------
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@
}
],
"require": {
"php": ">=5.6.0",
"php": ">=8.1.0",
"ext-json": "*",
"guzzlehttp/guzzle": "^6.2.1 || ^7.0.1",
"phpseclib/phpseclib": "^2.0.11",
"gree/jose": "^2.2.1"
"web-token/jwt-core": "^3.4",
"web-token/jwt-signature-algorithm-rsa": "^3.4",
"web-token/jwt-encryption": "^3.4",
"web-token/jwt-encryption-algorithm-rsa": "^3.4",
"web-token/jwt-encryption-algorithm-aescbc": "^3.4"
},
"autoload": {
"psr-4": { "Hyperwallet\\": "src/Hyperwallet", "ComposerScript\\" : "src/ComposerScript" }
"psr-4": { "Hyperwallet\\": "src/Hyperwallet" }
},
"autoload-dev" : {
"psr-4": { "Hyperwallet\\Tests\\" : "tests/Hyperwallet/Tests", "ComposerScript\\" : "src/ComposerScript" }
"psr-4": { "Hyperwallet\\Tests\\" : "tests/Hyperwallet/Tests" }
},
"require-dev": {
"phpunit/phpunit": "^5.7 || ^7.0.0 || ^9.0",
"phake/phake": "^2.3 || ^4.2",
"php-coveralls/php-coveralls": "^2.5"
},
"scripts": {
"post-install-cmd": "ComposerScript\\RsaOaep256AlgorithmInstaller::install"
}
}
19 changes: 0 additions & 19 deletions src/ComposerScript/RsaOaep256AlgorithmInstaller.php

This file was deleted.

2 changes: 1 addition & 1 deletion src/Hyperwallet/Exception/HyperwalletArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class HyperwalletArgumentException extends HyperwalletException {
* @param int $code The error code
* @param \Exception|null $previous The original exception
*/
public function __construct($message, $code = 0, \Exception $previous = null) {
public function __construct($message, $code = 0, ?\Exception $previous = null) {
parent::__construct($message, $code, $previous);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Hyperwallet/Exception/HyperwalletException.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class HyperwalletException extends \Exception {
* @param int $code The error code
* @param \Exception|null $previous The original exception
*/
public function __construct($message = "", $code = 0, \Exception $previous = null) {
public function __construct($message = "", $code = 0, ?\Exception $previous = null) {
parent::__construct($message, $code, $previous);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Hyperwallet/Hyperwallet.php
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,7 @@ public function listBankCardStatusTransitions($userToken, $bankCardToken, array
* @throws HyperwalletArgumentException
* @throws HyperwalletApiException
*/
public function createTransferMethod($userToken, $jsonCacheToken, TransferMethod $transferMethod = null) {
public function createTransferMethod($userToken, $jsonCacheToken, ?TransferMethod $transferMethod = null) {
if (empty($userToken)) {
throw new HyperwalletArgumentException('userToken is required!');
}
Expand Down
2 changes: 1 addition & 1 deletion src/Hyperwallet/Model/BankAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ public function getDateOfBirth() {
* @param \DateTime|null $dateOfBirth
* @return BankAccount
*/
public function setDateOfBirth(\DateTime $dateOfBirth = null) {
public function setDateOfBirth(?\DateTime $dateOfBirth = null) {
$this->dateOfBirth = $dateOfBirth == null ? null : $dateOfBirth->format('Y-m-d');
return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Hyperwallet/Model/BankCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public function getDateOfExpiry() {
* @param \DateTime $dateOfExpiry
* @return BankCard
*/
public function setDateOfExpiry(\DateTime $dateOfExpiry = null) {
public function setDateOfExpiry(?\DateTime $dateOfExpiry = null) {
$this->dateOfExpiry = $dateOfExpiry == null ? null : $dateOfExpiry->format('Y-m-d');
return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Hyperwallet/Model/BusinessStakeholder.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public function getDateOfBirth() {
* @param \DateTime|null $dateOfBirth
* @return BusinessStakeholder
*/
public function setDateOfBirth(\DateTime $dateOfBirth = null) {
public function setDateOfBirth(?\DateTime $dateOfBirth = null) {
$this->dateOfBirth = $dateOfBirth == null ? null : $dateOfBirth->format('Y-m-d');
return $this;
}
Expand Down
3 changes: 3 additions & 0 deletions src/Hyperwallet/Model/HyperwalletVerificationDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ public function getUploadFiles($uploadFiles) {
*/
class HyperwalletVerificationDocumentCollection {

/** @var HyperwalletVerificationDocument[] */
public $documents;

public function __construct(HyperwalletVerificationDocument ...$documents) {
$this->documents = $documents;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ public function getDescription() {
*/
class HyperwalletVerificationDocumentReasonCollection {

/** @var HyperwalletVerificationDocumentReason[] */
public $reasons;

public function __construct(HyperwalletVerificationDocumentReason ...$reasons) {
$this->reasons = $reasons;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Hyperwallet/Model/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public function getReleaseOn() {
* @param \DateTime $releaseOn
* @return Payment
*/
public function setReleaseOn(\DateTime $releaseOn = null) {
public function setReleaseOn(?\DateTime $releaseOn = null) {
$this->releaseOn = $releaseOn == null ? null : $releaseOn->format('Y-m-d\TH:i:s');
return $this;
}
Expand All @@ -272,7 +272,7 @@ public function getExpiresOn() {
* @param \DateTime $expiresOn
* @return Payment
*/
public function setExpiresOn(\DateTime $expiresOn = null) {
public function setExpiresOn(?\DateTime $expiresOn = null) {
$this->expiresOn = $expiresOn == null ? null : $expiresOn->format('Y-m-d\TH:i:s');
return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Hyperwallet/Model/TransferMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ public function getDateOfBirth() {
* @param \DateTime|null $dateOfBirth
* @return TransferMethod
*/
public function setDateOfBirth(\DateTime $dateOfBirth = null) {
public function setDateOfBirth(?\DateTime $dateOfBirth = null) {
$this->dateOfBirth = $dateOfBirth == null ? null : $dateOfBirth->format('Y-m-d');
return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Hyperwallet/Model/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ public function getDateOfBirth() {
* @param \DateTime|null $dateOfBirth
* @return User
*/
public function setDateOfBirth(\DateTime $dateOfBirth = null) {
public function setDateOfBirth(?\DateTime $dateOfBirth = null) {
$this->dateOfBirth = $dateOfBirth == null ? null : $dateOfBirth->format('Y-m-d');
return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Hyperwallet/Util/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function __construct($username, $password, $server, $clientOptions = arra
*
* @throws HyperwalletApiException
*/
public function doPost($partialUrl, array $uriParams, BaseModel $data = null, array $query = array(), array $headers = array()) {
public function doPost($partialUrl, array $uriParams, ?BaseModel $data = null, array $query = array(), array $headers = array()) {
return $this->doRequest('POST', $partialUrl, $uriParams, array(
'query' => $query,
'body' => $data ? \GuzzleHttp\json_encode($data->getPropertiesForCreate(), JSON_FORCE_OBJECT) : '{}',
Expand Down
Loading
Loading