diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml
index 407641a..c029418 100644
--- a/.github/workflows/php.yml
+++ b/.github/workflows/php.yml
@@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- php-versions: ['7.2', '7.3', '7.4', '8.0','8.1','8.2','8.3']
+ php-versions: ['7.2', '7.3', '7.4', '8.0','8.1','8.2','8.3','8.4']
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
@@ -25,7 +25,7 @@ jobs:
- name: Cache Composer packages
id: composer-cache
- uses: actions/cache@v2
+ uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
diff --git a/composer.json b/composer.json
index 9b90e03..8a76e30 100644
--- a/composer.json
+++ b/composer.json
@@ -12,10 +12,11 @@
},
"require-dev": {
"monolog/monolog" : "~1.0",
- "phpspec/phpspec" : "~6.2||7.*",
+ "phpspec/phpspec" : "~6.2||7.*||dev-main",
"phpunit/phpunit" : "^8.5",
"symfony/yaml" : ">=4.4"
},
+ "prefer-stable": true,
"config": {
"bin-dir": "bin"
},
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index badbd18..f29f268 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -15,8 +15,8 @@
-
-
+
+
diff --git a/src/Exception/Request.php b/src/Exception/Request.php
index 7cdc65a..62a07b1 100644
--- a/src/Exception/Request.php
+++ b/src/Exception/Request.php
@@ -10,10 +10,10 @@ class Request extends Runtime
private $result;
/**
- * @param \Exception $previous
- * @param ResultObjectInterface $result
+ * @param \Exception|null $previous
+ * @param ResultObjectInterface|null $result
*/
- public function __construct(\Exception $previous = null, ResultObjectInterface $result = null)
+ public function __construct(?\Exception $previous = null, ?ResultObjectInterface $result = null)
{
$this->message .= ' Response data: ' . serialize($result);
parent::__construct($this->message, $this->code, $previous);
diff --git a/src/Method/Payment/Create.php b/src/Method/Payment/Create.php
index e7a0ecf..1d0083a 100644
--- a/src/Method/Payment/Create.php
+++ b/src/Method/Payment/Create.php
@@ -205,7 +205,7 @@ private function getCardHolderInfoConstraints(): object
private function buildElement(
string $typeValue,
bool $isRequired = false,
- array $length = null,
+ ?array $length = null,
$args = null // TODO can it be null?
): object
{