From b4ae4a63b8873883a89fa34c4438c9156ef66321 Mon Sep 17 00:00:00 2001 From: Shabab Haider Siddique Date: Mon, 30 Jun 2025 16:19:16 +0600 Subject: [PATCH 1/5] null variable declaration deprecation fix --- composer.json | 2 +- src/Exception/Request.php | 6 +++--- src/Method/Payment/Create.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 9b90e03..66c08d6 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ }, "require-dev": { "monolog/monolog" : "~1.0", - "phpspec/phpspec" : "~6.2||7.*", + "phpspec/phpspec" : "~6.2||^7.0", "phpunit/phpunit" : "^8.5", "symfony/yaml" : ">=4.4" }, 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..87bed74 100644 --- a/src/Method/Payment/Create.php +++ b/src/Method/Payment/Create.php @@ -205,8 +205,8 @@ private function getCardHolderInfoConstraints(): object private function buildElement( string $typeValue, bool $isRequired = false, - array $length = null, - $args = null // TODO can it be null? + ?array $length = null, + mixed $args = null // TODO can it be null? ): object { $inside_array = $this->getInsideArray($typeValue); From 711d66a0b009b5660ac9144ec1cb13a43188a102 Mon Sep 17 00:00:00 2001 From: Shabab Haider Siddique Date: Mon, 30 Jun 2025 16:23:16 +0600 Subject: [PATCH 2/5] null variable declaration deprecation fix --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 407641a..085f392 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -11,7 +11,7 @@ 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 From 87790c19f84784980f4c8ca407c42ccd006d5cfe Mon Sep 17 00:00:00 2001 From: Shabab Haider Siddique Date: Mon, 30 Jun 2025 16:26:34 +0600 Subject: [PATCH 3/5] updated workflow actions --- .github/workflows/php.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 085f392..c029418 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -13,7 +13,7 @@ jobs: matrix: 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') }} From b98ae5ab23b36a737a2b6cca656195562a687575 Mon Sep 17 00:00:00 2001 From: Shabab Haider Siddique Date: Mon, 30 Jun 2025 16:38:43 +0600 Subject: [PATCH 4/5] updated workflow version updated phpspec to unreleased if needed --- composer.json | 3 ++- phpunit.xml.dist | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 66c08d6..8a76e30 100644 --- a/composer.json +++ b/composer.json @@ -12,10 +12,11 @@ }, "require-dev": { "monolog/monolog" : "~1.0", - "phpspec/phpspec" : "~6.2||^7.0", + "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 @@ - - + + From 7aa07a93be97f300de3a54c7306b1ed5863471e8 Mon Sep 17 00:00:00 2001 From: Shabab Haider Siddique Date: Mon, 30 Jun 2025 17:01:15 +0600 Subject: [PATCH 5/5] updated workflow actions --- src/Method/Payment/Create.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Method/Payment/Create.php b/src/Method/Payment/Create.php index 87bed74..1d0083a 100644 --- a/src/Method/Payment/Create.php +++ b/src/Method/Payment/Create.php @@ -206,7 +206,7 @@ private function buildElement( string $typeValue, bool $isRequired = false, ?array $length = null, - mixed $args = null // TODO can it be null? + $args = null // TODO can it be null? ): object { $inside_array = $this->getInsideArray($typeValue);