From 81daccd01efa408f753579fdb763dea5e8841fe0 Mon Sep 17 00:00:00 2001 From: "daan.rijpkema" Date: Sun, 10 Nov 2024 13:46:09 +0100 Subject: [PATCH 01/11] chore: Improve SetBrandID logic --- src/Requests/PaymentStatusBluemRequest.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Requests/PaymentStatusBluemRequest.php b/src/Requests/PaymentStatusBluemRequest.php index 0ebc7f4..e341b55 100644 --- a/src/Requests/PaymentStatusBluemRequest.php +++ b/src/Requests/PaymentStatusBluemRequest.php @@ -9,6 +9,7 @@ namespace Bluem\BluemPHP\Requests; use Bluem\BluemPHP\Contexts\PaymentsContext; +use Bluem\BluemPHP\Helpers\BluemConfiguration; class PaymentStatusBluemRequest extends BluemRequest { @@ -25,12 +26,17 @@ public function __construct( ) { parent::__construct($config, $entranceCode, $expected_return); - if (isset($config->paymentBrandID) - && $config->paymentBrandID !== "" - ) { - $config->setBrandID($config->paymentBrandID); - } else { - $config->setBrandID($config->brandID); + if ($config instanceof BluemConfiguration) { + if (isset($config->paymentBrandID) + && $config->paymentBrandID !== "" + ) { + $config->setBrandID($config->paymentBrandID); + } else { + $config->setBrandID($config->brandID); + } + } elseif ($config instanceof \stdClass && isset($config->paymentBrandID) + && $config->paymentBrandID !== "") { + $config->brandID = $config->paymentBrandID; } $this->transactionID = $transactionID; From 078067837474c9d22a48bf9ea33f17889eb94b4f Mon Sep 17 00:00:00 2001 From: "daan.rijpkema" Date: Sun, 10 Nov 2024 13:59:03 +0100 Subject: [PATCH 02/11] fix: Improve exception in identity requests --- src/Requests/IdentityBluemRequest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Requests/IdentityBluemRequest.php b/src/Requests/IdentityBluemRequest.php index bbe64b1..e4df817 100644 --- a/src/Requests/IdentityBluemRequest.php +++ b/src/Requests/IdentityBluemRequest.php @@ -9,6 +9,7 @@ namespace Bluem\BluemPHP\Requests; use Bluem\BluemPHP\Contexts\IdentityContext; +use Bluem\BluemPHP\Exceptions\InvalidBluemRequestException; use Exception; define("BLUEM_DEFAULT_MIN_AGE", 18); @@ -60,8 +61,8 @@ public function __construct( $this->requestCategory = $this->getRequestCategoryElement($requestCategory); $this->description = $this->_sanitizeDescription($description); - if ($debtorReturnURL == "") { - throw new Exception("Debtor return URL is required"); + if (empty($debtorReturnURL)) { + throw new InvalidBluemRequestException("Debtor return URL is required"); } $this->debtorReturnURL = $debtorReturnURL . "?debtorReference=$this->debtorReference"; From a64416fc3bd620f87f4fd8477bfad5d3b466e105 Mon Sep 17 00:00:00 2001 From: "daan.rijpkema" Date: Sun, 10 Nov 2024 14:25:17 +0100 Subject: [PATCH 03/11] chore: update phpunit --- composer.json | 2 +- composer.lock | 572 +++++++++++++++++++++++--------------------------- 2 files changed, 268 insertions(+), 306 deletions(-) diff --git a/composer.json b/composer.json index d5f06a6..4d5c82d 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ } }, "require-dev": { - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^11", "phpspec/prophecy": "~1.0", "vlucas/phpdotenv": "^5.4", "rector/rector": "^0.15.10", diff --git a/composer.lock b/composer.lock index a894af6..0223143 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1cd474d4354dafb5533494d852cad5bc", + "content-hash": "b13ed1538175c2f346758e003e664f9f", "packages": [ { "name": "selective/xmldsig", @@ -288,16 +288,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", "shasum": "" }, "require": { @@ -305,11 +305,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -335,7 +336,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" }, "funding": [ { @@ -343,20 +344,20 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-11-08T17:47:46+00:00" }, { "name": "nikic/php-parser", - "version": "v5.0.2", + "version": "v5.3.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", "shasum": "" }, "require": { @@ -367,7 +368,7 @@ }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -399,9 +400,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" }, - "time": "2024-03-05T20:51:40+00:00" + "time": "2024-10-08T18:51:32+00:00" }, { "name": "phar-io/manifest", @@ -1013,35 +1014,35 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.31", + "version": "11.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" + "reference": "f7f08030e8811582cc459871d28d6f5a1a4d35ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f7f08030e8811582cc459871d28d6f5a1a4d35ca", + "reference": "f7f08030e8811582cc459871d28d6f5a1a4d35ca", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" + "nikic/php-parser": "^5.3.1", + "php": ">=8.2", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-text-template": "^4.0.1", + "sebastian/code-unit-reverse-lookup": "^4.0.1", + "sebastian/complexity": "^4.0.1", + "sebastian/environment": "^7.2.0", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.4.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -1050,7 +1051,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "11.0.x-dev" } }, "autoload": { @@ -1079,7 +1080,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.7" }, "funding": [ { @@ -1087,32 +1088,32 @@ "type": "github" } ], - "time": "2024-03-02T06:37:42+00:00" + "time": "2024-10-09T06:21:38+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/118cfaaa8bc5aef3287bf315b6060b1174754af6", + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1139,7 +1140,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.0" }, "funding": [ { @@ -1147,28 +1149,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2024-08-27T05:02:59+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-pcntl": "*" @@ -1176,7 +1178,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1202,7 +1204,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" }, "funding": [ { @@ -1210,32 +1213,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2024-07-03T05:07:44+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1261,7 +1264,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" }, "funding": [ { @@ -1269,32 +1273,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2024-07-03T05:08:43+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "7.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -1320,7 +1324,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" }, "funding": [ { @@ -1328,54 +1333,51 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2024-07-03T05:09:35+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.19", + "version": "11.4.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8" + "reference": "e8e8ed1854de5d36c088ec1833beae40d2dedd76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8", - "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e8e8ed1854de5d36c088ec1833beae40d2dedd76", + "reference": "e8e8ed1854de5d36c088ec1833beae40d2dedd76", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", - "sebastian/version": "^3.0.2" + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=8.2", + "phpunit/php-code-coverage": "^11.0.7", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.1", + "sebastian/comparator": "^6.1.1", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.0", + "sebastian/exporter": "^6.1.3", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/type": "^5.1.0", + "sebastian/version": "^5.0.2" }, "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -1383,7 +1385,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "11.4-dev" } }, "autoload": { @@ -1415,7 +1417,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.4.3" }, "funding": [ { @@ -1431,7 +1433,7 @@ "type": "tidelift" } ], - "time": "2024-04-05T04:35:58+00:00" + "time": "2024-10-28T13:07:50+00:00" }, { "name": "rector/rector", @@ -1496,28 +1498,28 @@ }, { "name": "sebastian/cli-parser", - "version": "1.0.2", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1540,7 +1542,8 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" }, "funding": [ { @@ -1548,32 +1551,32 @@ "type": "github" } ], - "time": "2024-03-02T06:27:43+00:00" + "time": "2024-07-03T04:41:36+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "6bb7d09d6623567178cf54126afa9c2310114268" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/6bb7d09d6623567178cf54126afa9c2310114268", + "reference": "6bb7d09d6623567178cf54126afa9c2310114268", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1596,7 +1599,8 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.1" }, "funding": [ { @@ -1604,32 +1608,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2024-07-03T04:44:28+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1651,7 +1655,8 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" }, "funding": [ { @@ -1659,34 +1664,36 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2024-07-03T04:45:54+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "6.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/43d129d6a0f81c78bee378b46688293eb7ea3739", + "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.2-dev" } }, "autoload": { @@ -1725,7 +1732,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/6.2.1" }, "funding": [ { @@ -1733,33 +1741,33 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2024-10-31T05:30:08+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.3", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" + "nikic/php-parser": "^5.0", + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1782,7 +1790,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" }, "funding": [ { @@ -1790,33 +1799,33 @@ "type": "github" } ], - "time": "2023-12-22T06:19:30+00:00" + "time": "2024-07-03T04:49:50+00:00" }, { "name": "sebastian/diff", - "version": "4.0.6", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^11.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1848,7 +1857,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" }, "funding": [ { @@ -1856,27 +1866,27 @@ "type": "github" } ], - "time": "2024-03-02T06:30:58+00:00" + "time": "2024-07-03T04:53:05+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "7.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-posix": "*" @@ -1884,7 +1894,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "7.2-dev" } }, "autoload": { @@ -1903,7 +1913,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -1911,7 +1921,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.0" }, "funding": [ { @@ -1919,34 +1930,34 @@ "type": "github" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2024-07-03T04:54:44+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.6", + "version": "6.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" + "reference": "c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e", + "reference": "c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.1-dev" } }, "autoload": { @@ -1988,7 +1999,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/6.1.3" }, "funding": [ { @@ -1996,38 +2008,35 @@ "type": "github" } ], - "time": "2024-03-02T06:33:00+00:00" + "time": "2024-07-03T04:56:19+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.7", + "version": "7.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -2046,13 +2055,14 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" }, "funding": [ { @@ -2060,33 +2070,33 @@ "type": "github" } ], - "time": "2024-03-02T06:35:11+00:00" + "time": "2024-07-03T04:57:36+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.4", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" + "nikic/php-parser": "^5.0", + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2109,7 +2119,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" }, "funding": [ { @@ -2117,34 +2128,34 @@ "type": "github" } ], - "time": "2023-12-22T06:20:34+00:00" + "time": "2024-07-03T04:58:38+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2166,7 +2177,8 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" }, "funding": [ { @@ -2174,32 +2186,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2024-07-03T05:00:13+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2221,7 +2233,8 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" }, "funding": [ { @@ -2229,32 +2242,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2024-07-03T05:01:32+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.5", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/694d156164372abbd149a4b85ccda2e4670c0e16", + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2284,7 +2297,8 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.2" }, "funding": [ { @@ -2292,86 +2306,32 @@ "type": "github" } ], - "time": "2023-02-03T06:07:39+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-14T16:00:52+00:00" + "time": "2024-07-03T05:10:34+00:00" }, { "name": "sebastian/type", - "version": "3.2.1", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/461b9c5da241511a2a0e8f240814fb23ce5c0aac", + "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^11.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -2394,7 +2354,8 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/5.1.0" }, "funding": [ { @@ -2402,29 +2363,29 @@ "type": "github" } ], - "time": "2023-02-03T06:13:03+00:00" + "time": "2024-09-17T13:12:04+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "5.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2447,7 +2408,8 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" }, "funding": [ { @@ -2455,7 +2417,7 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2024-10-09T05:16:32+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -3045,11 +3007,11 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=8.1", + "php": ">=8.0", "ext-dom": "*", "ext-libxml": "*", "ext-simplexml": "*", @@ -3057,6 +3019,6 @@ "ext-json": "*", "ext-openssl": "*" }, - "platform-dev": [], + "platform-dev": {}, "plugin-api-version": "2.6.0" } From 0bdb718a436182746efe4e1c79ac8f7148526dc8 Mon Sep 17 00:00:00 2001 From: "daan.rijpkema" Date: Sun, 10 Nov 2024 14:25:23 +0100 Subject: [PATCH 04/11] chore: add makefile --- Makefile | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fffc356 --- /dev/null +++ b/Makefile @@ -0,0 +1,42 @@ +# Define the PHP executable and commonly used paths +PHP := php +PHPUNIT := ./vendor/bin/phpunit +RECTOR := ./vendor/bin/rector + +# Default target +all: test + +# PHPUnit target +test: + @echo "Running PHPUnit tests..." + $(PHPUNIT) --configuration phpunit.xml --colors=always + +# Rector targets for code refactoring +rector: + @echo "Running Rector refactoring..." + $(RECTOR) process src --dry-run --clear-cache --config rector.php + +rector-fix: + @echo "Applying Rector refactoring..." + $(RECTOR) process src --clear-cache --config rector.php + +# Clean up cache generated by Rector and PHPUnit +clean: + @echo "Cleaning Rector and PHPUnit caches..." + rm -rf .rector/cache + rm -rf .phpunit.result.cache + +# Run both test and rector targets +check: test rector + +# Help menu +help: + @echo "Available targets:" + @echo " test - Run PHPUnit tests with default configuration" + @echo " rector - Run Rector in dry-run mode" + @echo " rector-fix - Apply Rector refactoring" + @echo " clean - Remove cache for Rector and PHPUnit" + @echo " check - Run both tests and Rector in dry-run mode" + +# Phony targets to prevent issues with files named like targets +.PHONY: all test rector rector-fix clean check help From 67cd67fdf33fcaa77306f09560e43b8b2f303c21 Mon Sep 17 00:00:00 2001 From: "daan.rijpkema" Date: Sun, 10 Nov 2024 14:25:49 +0100 Subject: [PATCH 05/11] chore: improve test case setup --- tests/Unit/BluemPaymentsTest.php | 18 +++++++++++ tests/Unit/BluemTest.php | 38 +---------------------- tests/Unit/BluemTestCase.php | 52 ++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 37 deletions(-) create mode 100644 tests/Unit/BluemPaymentsTest.php create mode 100644 tests/Unit/BluemTestCase.php diff --git a/tests/Unit/BluemPaymentsTest.php b/tests/Unit/BluemPaymentsTest.php new file mode 100644 index 0000000..a1d1e65 --- /dev/null +++ b/tests/Unit/BluemPaymentsTest.php @@ -0,0 +1,18 @@ + + * + * This source file is subject to the license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Bluem\BluemPHP\Tests\Unit; + +class BluemPaymentsTest extends BluemTestCase +{ + + public function testCanCreatePaymentRequest(): void + { + + } +} diff --git a/tests/Unit/BluemTest.php b/tests/Unit/BluemTest.php index 9742fe0..8c155cc 100644 --- a/tests/Unit/BluemTest.php +++ b/tests/Unit/BluemTest.php @@ -14,25 +14,10 @@ use Bluem\BluemPHP\Interfaces\BluemResponseInterface; use Bluem\BluemPHP\Requests\BluemRequest; use Bluem\BluemPHP\Responses\ErrorBluemResponse; -use PHPUnit\Framework\TestCase; use RuntimeException; -use stdClass; -class BluemTest extends TestCase +class BluemTest extends BluemTestCase { - private Bluem $bluem; - - /** - * @throws InvalidBluemConfigurationException - */ - protected function setUp(): void - { - // Mock the configuration as needed - $mockedConfig = $this->getConfig(); - $this->bluem = new Bluem($mockedConfig); - } - - public function testConstructorWithValidConfig(): void { @@ -84,25 +69,4 @@ public function testPerformRequestWithInvalidXml(): void $this->assertInstanceOf(ErrorBluemResponse::class, $result); } - // helper classes - private function getConfig(): stdClass - { - $bluem_config = new stdClass; - $bluem_config->environment = 'test'; - $bluem_config->senderID = 'S12345'; - - $bluem_config->brandID = 'BLUEM_BRANDID'; - $bluem_config->test_accessToken = 'BLUEM_TEST_ACCESS_TOKEN'; - $bluem_config->IDINBrandID = 'BLUEM_BRANDID'; - $bluem_config->merchantID = 'BLUEM_MERCHANTID'; - $bluem_config->merchantReturnURLBase = 'BLUEM_MERCHANTRETURNURLBASE'; - - $bluem_config->production_accessToken = ""; - $bluem_config->expectedReturnStatus = "success"; - $bluem_config->eMandateReason = "eMandateReason"; - $bluem_config->sequenceType = "OOFF"; - $bluem_config->localInstrumentCode = "B2B"; - - return $bluem_config; - } } diff --git a/tests/Unit/BluemTestCase.php b/tests/Unit/BluemTestCase.php new file mode 100644 index 0000000..5182403 --- /dev/null +++ b/tests/Unit/BluemTestCase.php @@ -0,0 +1,52 @@ + + * + * This source file is subject to the license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Bluem\BluemPHP\Tests\Unit; + +use Bluem\BluemPHP\Bluem; +use Bluem\BluemPHP\Exceptions\InvalidBluemConfigurationException; +use PHPUnit\Framework\TestCase; +use stdClass; + +class BluemTestCase extends TestCase +{ + protected Bluem $bluem; + + /** + * @throws InvalidBluemConfigurationException + */ + protected function setUp(): void + { + // Mock the configuration as needed + $mockedConfig = $this->getConfig(); + $this->bluem = new Bluem($mockedConfig); + } + + + // helper classes + protected function getConfig(): stdClass + { + $bluem_config = new stdClass; + $bluem_config->environment = 'test'; + $bluem_config->senderID = 'S12345'; + + $bluem_config->brandID = 'BLUEM_BRANDID'; + $bluem_config->test_accessToken = 'BLUEM_TEST_ACCESS_TOKEN'; + $bluem_config->IDINBrandID = 'BLUEM_BRANDID'; + $bluem_config->merchantID = 'BLUEM_MERCHANTID'; + $bluem_config->merchantReturnURLBase = 'BLUEM_MERCHANTRETURNURLBASE'; + + $bluem_config->production_accessToken = ""; + $bluem_config->expectedReturnStatus = "success"; + $bluem_config->eMandateReason = "eMandateReason"; + $bluem_config->sequenceType = "OOFF"; + $bluem_config->localInstrumentCode = "B2B"; + + return $bluem_config; + } +} From fcb89b558dfb28b9b2bd566d330003532912a894 Mon Sep 17 00:00:00 2001 From: "daan.rijpkema" Date: Sun, 10 Nov 2024 14:29:46 +0100 Subject: [PATCH 06/11] chore: Change CI settings --- .github/dependabot.yaml | 2 +- .github/workflows/ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 921c11d..78058b9 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -4,4 +4,4 @@ updates: directory: "/" schedule: interval: "weekly" - open-pull-requests-limit: 10 + open-pull-requests-limit: 5 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d5f141..217d6eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: - name: PHPUnit Tests uses: php-actions/phpunit@v3 with: - version: 9.5 + version: 11.0 php_version: 8.1 bootstrap: ./vendor/autoload.php configuration: ./.github/workflows/phpunit.xml From fdd78f6c4c097ce4dd39b645e9dc11232dc5f816 Mon Sep 17 00:00:00 2001 From: "daan.rijpkema" Date: Sun, 10 Nov 2024 14:31:05 +0100 Subject: [PATCH 07/11] chore: add root version to composer.json --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 4d5c82d..0118226 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,7 @@ "keywords": ["bluem", "php", "interface", "wrapper", "emandate", "epayment", "idin"], "homepage": "https://bluem-development.github.io/bluem-php/", "license": "GPL-3.0-or-later", + "version": "2.3.4.2", "authors": [{ "name": "Bluem Plugin Support", "email": "pluginsupport@bluem.nl", From fa86b99fcbcfd912fcaea24c8c3e19a5c636f09d Mon Sep 17 00:00:00 2001 From: "daan.rijpkema" Date: Sun, 10 Nov 2024 14:31:51 +0100 Subject: [PATCH 08/11] chore: Downgrade to PHPUnit 10 because of PHP8.1 support --- .github/workflows/ci.yml | 2 +- composer.json | 2 +- composer.lock | 452 +++++++++++++++++++-------------------- 3 files changed, 224 insertions(+), 232 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 217d6eb..5a65876 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: - name: PHPUnit Tests uses: php-actions/phpunit@v3 with: - version: 11.0 + version: 10.0 php_version: 8.1 bootstrap: ./vendor/autoload.php configuration: ./.github/workflows/phpunit.xml diff --git a/composer.json b/composer.json index 0118226..d2144ef 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ } }, "require-dev": { - "phpunit/phpunit": "^11", + "phpunit/phpunit": "^10", "phpspec/prophecy": "~1.0", "vlucas/phpdotenv": "^5.4", "rector/rector": "^0.15.10", diff --git a/composer.lock b/composer.lock index 0223143..19b297c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b13ed1538175c2f346758e003e664f9f", + "content-hash": "9837f25c8d4bff61df968159326f6b8e", "packages": [ { "name": "selective/xmldsig", @@ -1014,35 +1014,35 @@ }, { "name": "phpunit/php-code-coverage", - "version": "11.0.7", + "version": "10.1.16", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f7f08030e8811582cc459871d28d6f5a1a4d35ca" + "reference": "7e308268858ed6baedc8704a304727d20bc07c77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f7f08030e8811582cc459871d28d6f5a1a4d35ca", - "reference": "f7f08030e8811582cc459871d28d6f5a1a4d35ca", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77", + "reference": "7e308268858ed6baedc8704a304727d20bc07c77", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^5.3.1", - "php": ">=8.2", - "phpunit/php-file-iterator": "^5.1.0", - "phpunit/php-text-template": "^4.0.1", - "sebastian/code-unit-reverse-lookup": "^4.0.1", - "sebastian/complexity": "^4.0.1", - "sebastian/environment": "^7.2.0", - "sebastian/lines-of-code": "^3.0.1", - "sebastian/version": "^5.0.2", + "nikic/php-parser": "^4.19.1 || ^5.1.0", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-text-template": "^3.0.1", + "sebastian/code-unit-reverse-lookup": "^3.0.0", + "sebastian/complexity": "^3.2.0", + "sebastian/environment": "^6.1.0", + "sebastian/lines-of-code": "^2.0.2", + "sebastian/version": "^4.0.1", "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^11.4.1" + "phpunit/phpunit": "^10.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -1051,7 +1051,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "11.0.x-dev" + "dev-main": "10.1.x-dev" } }, "autoload": { @@ -1080,7 +1080,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.7" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.16" }, "funding": [ { @@ -1088,32 +1088,32 @@ "type": "github" } ], - "time": "2024-10-09T06:21:38+00:00" + "time": "2024-08-22T04:31:57+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "5.1.0", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6" + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/118cfaaa8bc5aef3287bf315b6060b1174754af6", - "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1141,7 +1141,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.0" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { @@ -1149,28 +1149,28 @@ "type": "github" } ], - "time": "2024-08-27T05:02:59+00:00" + "time": "2023-08-31T06:24:48+00:00" }, { "name": "phpunit/php-invoker", - "version": "5.0.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", - "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-pcntl": "*" @@ -1178,7 +1178,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1204,8 +1204,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" }, "funding": [ { @@ -1213,32 +1212,32 @@ "type": "github" } ], - "time": "2024-07-03T05:07:44+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { "name": "phpunit/php-text-template", - "version": "4.0.1", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", - "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1265,7 +1264,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" }, "funding": [ { @@ -1273,32 +1272,32 @@ "type": "github" } ], - "time": "2024-07-03T05:08:43+00:00" + "time": "2023-08-31T14:07:24+00:00" }, { "name": "phpunit/php-timer", - "version": "7.0.1", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", - "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1324,8 +1323,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "security": "https://github.com/sebastianbergmann/php-timer/security/policy", - "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" }, "funding": [ { @@ -1333,20 +1331,20 @@ "type": "github" } ], - "time": "2024-07-03T05:09:35+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpunit", - "version": "11.4.3", + "version": "10.5.38", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e8e8ed1854de5d36c088ec1833beae40d2dedd76" + "reference": "a86773b9e887a67bc53efa9da9ad6e3f2498c132" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e8e8ed1854de5d36c088ec1833beae40d2dedd76", - "reference": "e8e8ed1854de5d36c088ec1833beae40d2dedd76", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a86773b9e887a67bc53efa9da9ad6e3f2498c132", + "reference": "a86773b9e887a67bc53efa9da9ad6e3f2498c132", "shasum": "" }, "require": { @@ -1359,22 +1357,23 @@ "myclabs/deep-copy": "^1.12.0", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", - "php": ">=8.2", - "phpunit/php-code-coverage": "^11.0.7", - "phpunit/php-file-iterator": "^5.1.0", - "phpunit/php-invoker": "^5.0.1", - "phpunit/php-text-template": "^4.0.1", - "phpunit/php-timer": "^7.0.1", - "sebastian/cli-parser": "^3.0.2", - "sebastian/code-unit": "^3.0.1", - "sebastian/comparator": "^6.1.1", - "sebastian/diff": "^6.0.2", - "sebastian/environment": "^7.2.0", - "sebastian/exporter": "^6.1.3", - "sebastian/global-state": "^7.0.2", - "sebastian/object-enumerator": "^6.0.1", - "sebastian/type": "^5.1.0", - "sebastian/version": "^5.0.2" + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.16", + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-invoker": "^4.0.0", + "phpunit/php-text-template": "^3.0.1", + "phpunit/php-timer": "^6.0.0", + "sebastian/cli-parser": "^2.0.1", + "sebastian/code-unit": "^2.0.0", + "sebastian/comparator": "^5.0.3", + "sebastian/diff": "^5.1.1", + "sebastian/environment": "^6.1.0", + "sebastian/exporter": "^5.1.2", + "sebastian/global-state": "^6.0.2", + "sebastian/object-enumerator": "^5.0.0", + "sebastian/recursion-context": "^5.0.0", + "sebastian/type": "^4.0.0", + "sebastian/version": "^4.0.1" }, "suggest": { "ext-soap": "To be able to generate mocks based on WSDL files" @@ -1385,7 +1384,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "11.4-dev" + "dev-main": "10.5-dev" } }, "autoload": { @@ -1417,7 +1416,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.4.3" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.38" }, "funding": [ { @@ -1433,7 +1432,7 @@ "type": "tidelift" } ], - "time": "2024-10-28T13:07:50+00:00" + "time": "2024-10-28T13:06:21+00:00" }, { "name": "rector/rector", @@ -1498,28 +1497,28 @@ }, { "name": "sebastian/cli-parser", - "version": "3.0.2", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", - "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -1543,7 +1542,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" }, "funding": [ { @@ -1551,32 +1550,32 @@ "type": "github" } ], - "time": "2024-07-03T04:41:36+00:00" + "time": "2024-03-02T07:12:49+00:00" }, { "name": "sebastian/code-unit", - "version": "3.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "6bb7d09d6623567178cf54126afa9c2310114268" + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/6bb7d09d6623567178cf54126afa9c2310114268", - "reference": "6bb7d09d6623567178cf54126afa9c2310114268", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -1599,8 +1598,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "security": "https://github.com/sebastianbergmann/code-unit/security/policy", - "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ { @@ -1608,32 +1606,32 @@ "type": "github" } ], - "time": "2024-07-03T04:44:28+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "4.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "183a9b2632194febd219bb9246eee421dad8d45e" + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", - "reference": "183a9b2632194febd219bb9246eee421dad8d45e", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1655,8 +1653,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -1664,36 +1661,36 @@ "type": "github" } ], - "time": "2024-07-03T04:45:54+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { "name": "sebastian/comparator", - "version": "6.2.1", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739" + "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/43d129d6a0f81c78bee378b46688293eb7ea3739", - "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e", + "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e", "shasum": "" }, "require": { "ext-dom": "*", "ext-mbstring": "*", - "php": ">=8.2", - "sebastian/diff": "^6.0", - "sebastian/exporter": "^6.0" + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^11.4" + "phpunit/phpunit": "^10.5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.2-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1733,7 +1730,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/6.2.1" + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.3" }, "funding": [ { @@ -1741,33 +1738,33 @@ "type": "github" } ], - "time": "2024-10-31T05:30:08+00:00" + "time": "2024-10-18T14:56:07+00:00" }, { "name": "sebastian/complexity", - "version": "4.0.1", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" + "reference": "68ff824baeae169ec9f2137158ee529584553799" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", - "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", + "reference": "68ff824baeae169ec9f2137158ee529584553799", "shasum": "" }, "require": { - "nikic/php-parser": "^5.0", - "php": ">=8.2" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "3.2-dev" } }, "autoload": { @@ -1791,7 +1788,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" + "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" }, "funding": [ { @@ -1799,33 +1796,33 @@ "type": "github" } ], - "time": "2024-07-03T04:49:50+00:00" + "time": "2023-12-21T08:37:17+00:00" }, { "name": "sebastian/diff", - "version": "6.0.2", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", - "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^11.0", - "symfony/process": "^4.2 || ^5" + "phpunit/phpunit": "^10.0", + "symfony/process": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -1858,7 +1855,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" }, "funding": [ { @@ -1866,27 +1863,27 @@ "type": "github" } ], - "time": "2024-07-03T04:53:05+00:00" + "time": "2024-03-02T07:15:17+00:00" }, { "name": "sebastian/environment", - "version": "7.2.0", + "version": "6.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5" + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", - "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -1894,7 +1891,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "7.2-dev" + "dev-main": "6.1-dev" } }, "autoload": { @@ -1922,7 +1919,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/7.2.0" + "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" }, "funding": [ { @@ -1930,34 +1927,34 @@ "type": "github" } ], - "time": "2024-07-03T04:54:44+00:00" + "time": "2024-03-23T08:47:14+00:00" }, { "name": "sebastian/exporter", - "version": "6.1.3", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e" + "reference": "955288482d97c19a372d3f31006ab3f37da47adf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e", - "reference": "c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", + "reference": "955288482d97c19a372d3f31006ab3f37da47adf", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": ">=8.2", - "sebastian/recursion-context": "^6.0" + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^11.2" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.1-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -2000,7 +1997,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/6.1.3" + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" }, "funding": [ { @@ -2008,35 +2005,35 @@ "type": "github" } ], - "time": "2024-07-03T04:56:19+00:00" + "time": "2024-03-02T07:17:12+00:00" }, { "name": "sebastian/global-state", - "version": "7.0.2", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "3be331570a721f9a4b5917f4209773de17f747d7" + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", - "reference": "3be331570a721f9a4b5917f4209773de17f747d7", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", "shasum": "" }, "require": { - "php": ">=8.2", - "sebastian/object-reflector": "^4.0", - "sebastian/recursion-context": "^6.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2062,7 +2059,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" }, "funding": [ { @@ -2070,33 +2067,33 @@ "type": "github" } ], - "time": "2024-07-03T04:57:36+00:00" + "time": "2024-03-02T07:19:19+00:00" }, { "name": "sebastian/lines-of-code", - "version": "3.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", - "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", "shasum": "" }, "require": { - "nikic/php-parser": "^5.0", - "php": ">=8.2" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -2120,7 +2117,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" }, "funding": [ { @@ -2128,34 +2125,34 @@ "type": "github" } ], - "time": "2024-07-03T04:58:38+00:00" + "time": "2023-12-21T08:38:20+00:00" }, { "name": "sebastian/object-enumerator", - "version": "6.0.1", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "f5b498e631a74204185071eb41f33f38d64608aa" + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", - "reference": "f5b498e631a74204185071eb41f33f38d64608aa", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": ">=8.2", - "sebastian/object-reflector": "^4.0", - "sebastian/recursion-context": "^6.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2177,8 +2174,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" }, "funding": [ { @@ -2186,32 +2182,32 @@ "type": "github" } ], - "time": "2024-07-03T05:00:13+00:00" + "time": "2023-02-03T07:08:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "4.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", - "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2233,8 +2229,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" }, "funding": [ { @@ -2242,32 +2237,32 @@ "type": "github" } ], - "time": "2024-07-03T05:01:32+00:00" + "time": "2023-02-03T07:06:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "6.0.2", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "694d156164372abbd149a4b85ccda2e4670c0e16" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/694d156164372abbd149a4b85ccda2e4670c0e16", - "reference": "694d156164372abbd149a4b85ccda2e4670c0e16", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2297,8 +2292,7 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.2" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" }, "funding": [ { @@ -2306,32 +2300,32 @@ "type": "github" } ], - "time": "2024-07-03T05:10:34+00:00" + "time": "2023-02-03T07:05:40+00:00" }, { "name": "sebastian/type", - "version": "5.1.0", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac" + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/461b9c5da241511a2a0e8f240814fb23ce5c0aac", - "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^11.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2354,8 +2348,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "security": "https://github.com/sebastianbergmann/type/security/policy", - "source": "https://github.com/sebastianbergmann/type/tree/5.1.0" + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -2363,29 +2356,29 @@ "type": "github" } ], - "time": "2024-09-17T13:12:04+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { "name": "sebastian/version", - "version": "5.0.2", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", - "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2408,8 +2401,7 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "security": "https://github.com/sebastianbergmann/version/security/policy", - "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, "funding": [ { @@ -2417,7 +2409,7 @@ "type": "github" } ], - "time": "2024-10-09T05:16:32+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { "name": "squizlabs/php_codesniffer", From 5888ae58df10c3a227a94ddd18bd6228896af931 Mon Sep 17 00:00:00 2001 From: "daan.rijpkema" Date: Sun, 10 Nov 2024 14:35:48 +0100 Subject: [PATCH 09/11] chore: Add PHPCS & PHPCBF to the makefile & CI --- .github/workflows/ci.yml | 3 +++ Makefile | 33 +++++++++++++++++++++++++-------- composer.json | 2 +- composer.lock | 16 ++++++++-------- phpcs.xml | 13 +++++++++++++ 5 files changed, 50 insertions(+), 17 deletions(-) create mode 100755 phpcs.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a65876..042f54e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,9 @@ jobs: - name: Run composer uses: php-actions/composer@v5 + - name: PHP CodeSniffer + run: ./vendor/bin/phpcs --standard=PSR12 --exclude=Generic.NamingConventions.UpperCaseConstantName,PSR1.Methods.CamelCapsMethodName,PSR2.Methods.MethodDeclaration /src + - name: PHPUnit Tests uses: php-actions/phpunit@v3 with: diff --git a/Makefile b/Makefile index fffc356..d4fbc7e 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,12 @@ PHP := php PHPUNIT := ./vendor/bin/phpunit RECTOR := ./vendor/bin/rector +PHPCS := ./vendor/bin/phpcs +PHPCBF := ./vendor/bin/phpcbf +PHPCSARGS := --standard=PSR12 --exclude=Generic.NamingConventions.UpperCaseConstantName,PSR1.Methods.CamelCapsMethodName,PSR2.Methods.MethodDeclaration # Default target -all: test +all: help # PHPUnit target test: @@ -20,14 +23,26 @@ rector-fix: @echo "Applying Rector refactoring..." $(RECTOR) process src --clear-cache --config rector.php -# Clean up cache generated by Rector and PHPUnit +# PHPCS target for linting +lint: + @echo "Running PHP CodeSniffer (PHPCS) for linting..." + $(PHPCS) $(PHPCSARGS) src/ + + +# PHPCBF target for auto-fixing code style issues +lint-fix: + @echo "Running PHP Code Beautifier and Fixer (PHPCBF) for auto-fixing..." + $(PHPCBF) $(PHPCSARGS) src/ + +# Clean up cache generated by Rector, PHPUnit, and PHPCS clean: - @echo "Cleaning Rector and PHPUnit caches..." + @echo "Cleaning caches for Rector, PHPUnit, and PHPCS..." rm -rf .rector/cache rm -rf .phpunit.result.cache + rm -rf .phpcs.cache -# Run both test and rector targets -check: test rector +# Run both test and lint targets +check: test lint # Help menu help: @@ -35,8 +50,10 @@ help: @echo " test - Run PHPUnit tests with default configuration" @echo " rector - Run Rector in dry-run mode" @echo " rector-fix - Apply Rector refactoring" - @echo " clean - Remove cache for Rector and PHPUnit" - @echo " check - Run both tests and Rector in dry-run mode" + @echo " lint - Run PHP CodeSniffer (PHPCS) for code style checks" + @echo " lint-fix - Auto-fix code style issues with PHP Code Beautifier (PHPCBF)" + @echo " clean - Remove cache for Rector, PHPUnit, and PHPCS" + @echo " check - Run both tests and linting in dry-run mode" # Phony targets to prevent issues with files named like targets -.PHONY: all test rector rector-fix clean check help +.PHONY: all test rector rector-fix lint lint-fix clean check help diff --git a/composer.json b/composer.json index d2144ef..8d4eef9 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "phpspec/prophecy": "~1.0", "vlucas/phpdotenv": "^5.4", "rector/rector": "^0.15.10", - "squizlabs/php_codesniffer": "^3.7", + "squizlabs/php_codesniffer": "^3.10", "magento/magento-coding-standard": "^31.0", "phpcompatibility/php-compatibility": "^9.3" }, diff --git a/composer.lock b/composer.lock index 19b297c..63cbdc3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9837f25c8d4bff61df968159326f6b8e", + "content-hash": "011c87bd78c2c9262143647643365eee", "packages": [ { "name": "selective/xmldsig", @@ -2413,16 +2413,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.9.1", + "version": "3.10.3", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909" + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/267a4405fff1d9c847134db3a3c92f1ab7f77909", - "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c", "shasum": "" }, "require": { @@ -2489,7 +2489,7 @@ "type": "open_collective" } ], - "time": "2024-03-31T21:03:09+00:00" + "time": "2024-09-18T10:38:58+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2999,7 +2999,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { @@ -3011,6 +3011,6 @@ "ext-json": "*", "ext-openssl": "*" }, - "platform-dev": {}, + "platform-dev": [], "plugin-api-version": "2.6.0" } diff --git a/phpcs.xml b/phpcs.xml new file mode 100755 index 0000000..cee5f74 --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + From 9c194164805ddda77e1a267b7c5ef4234609f1a3 Mon Sep 17 00:00:00 2001 From: "daan.rijpkema" Date: Sun, 10 Nov 2024 15:01:19 +0100 Subject: [PATCH 10/11] chore: Run linter --- src/Bluem.php | 111 +++++++++++------- src/Contexts/BluemContext.php | 2 +- src/Contexts/IBANCheckContext.php | 1 + src/Contexts/IdentityContext.php | 4 +- src/Contexts/MandatesContext.php | 3 +- src/Contexts/PaymentsContext.php | 4 +- .../InvalidBluemConfigurationException.php | 3 +- .../InvalidBluemRequestException.php | 3 +- src/Exceptions/InvalidContextException.php | 2 +- src/Extensions/IPAPI.php | 4 +- src/Helpers/BIC.php | 1 + src/Helpers/BluemConfiguration.php | 8 +- src/Helpers/BluemCurrency.php | 3 +- src/Helpers/BluemIdentityCategoryList.php | 3 +- src/Helpers/BluemMaxAmount.php | 4 +- src/Helpers/Now.php | 2 +- src/Interfaces/BluemContextInterface.php | 2 +- src/Interfaces/BluemRequestInterface.php | 2 +- src/Interfaces/BluemResponseInterface.php | 2 +- src/Interfaces/WebhookInterface.php | 3 +- src/Requests/BluemRequest.php | 32 ++--- src/Requests/EmandateBluemRequest.php | 2 +- src/Requests/EmandateStatusBluemRequest.php | 1 + src/Requests/IBANBluemRequest.php | 1 + src/Requests/IdentityBluemRequest.php | 1 + src/Requests/IdentityStatusBluemRequest.php | 4 +- src/Requests/PaymentBluemRequest.php | 22 ++-- src/Requests/PaymentStatusBluemRequest.php | 10 +- src/Responses/BluemResponse.php | 3 +- src/Responses/ErrorBluemResponse.php | 1 + src/Responses/IBANNameCheckBluemResponse.php | 1 + src/Responses/IdentityStatusBluemResponse.php | 1 + .../IdentityTransactionBluemResponse.php | 1 + src/Responses/MandateStatusBluemResponse.php | 1 + .../MandateTransactionBluemResponse.php | 1 + src/Responses/PaymentStatusBluemResponse.php | 4 +- .../PaymentTransactionBluemResponse.php | 1 + src/Responses/StatusBluemResponse.php | 1 + src/Responses/TransactionBluemResponse.php | 2 +- .../BluemConfigurationValidator.php | 41 ++++--- src/Validators/BluemXMLValidator.php | 1 + src/Validators/WebhookSignatureValidation.php | 21 +++- src/Validators/WebhookValidator.php | 1 + src/Validators/WebhookValidatorInterface.php | 1 + src/Validators/WebhookXMLValidator.php | 1 + src/Validators/WebhookXmlValidation.php | 1 + src/Webhook.php | 48 ++++---- 47 files changed, 212 insertions(+), 160 deletions(-) diff --git a/src/Bluem.php b/src/Bluem.php index 6288ab2..13fc700 100644 --- a/src/Bluem.php +++ b/src/Bluem.php @@ -79,7 +79,7 @@ class Bluem */ public function __construct(mixed $rawConfig) { - if ($rawConfig ===null) { + if ($rawConfig === null) { throw new InvalidBluemConfigurationException('No configuration given'); } @@ -97,7 +97,7 @@ public function __construct(mixed $rawConfig) public function setConfig(string $key, $value): bool { - if (! isset($this->configuration->$key)) { + if (!isset($this->configuration->$key)) { throw new RuntimeException("Key '$key' does not exist in configuration"); } @@ -171,9 +171,9 @@ public function CreateMandateRequest( $customer_id, $order_id, $mandate_id, - ( $this->configuration->environment === "test" && - $this->configuration->expectedReturnStatus !== null ? - $this->configuration->expectedReturnStatus : "" ) + ($this->configuration->environment === "test" && + $this->configuration->expectedReturnStatus !== null ? + $this->configuration->expectedReturnStatus : "") ); } @@ -206,10 +206,11 @@ public function CreateMandateID(string $order_id, string $customer_id): string public function PerformRequest(BluemRequestInterface $transaction_request): BluemResponseInterface { $validator = new BluemXMLValidator(); - if (! $validator->validate( - $transaction_request->RequestContext(), - $transaction_request->XmlString() - ) + if ( + !$validator->validate( + $transaction_request->RequestContext(), + $transaction_request->XmlString() + ) ) { return new ErrorBluemResponse( "Error: Request is not formed correctly. More details: " . @@ -223,7 +224,11 @@ public function PerformRequest(BluemRequestInterface $transaction_request): Blue $now = new Now('UTC'); // set timezone to UTC to let the transaction xttrs timestamp work; 8-9-2021 - $xttrs_filename = $transaction_request->transaction_code . "-{$this->configuration->senderID}-BSP1-" . $now->format('YmdHis') . "000.xml"; + $xttrs_filename = sprintf( + "%s-{$this->configuration->senderID}-BSP1-%s000.xml", + $transaction_request->transaction_code, + $now->format('YmdHis') + ); // conform Rfc1123 standard in GMT time // Since v2.0.5 : use preset format instead of @@ -271,39 +276,46 @@ public function PerformRequest(BluemRequestInterface $transaction_request): Blue curl_close($curl); + if (empty($response_status)) { + return new ErrorBluemResponse("Error: Empty response status returned"); + } + switch ($response_status) { case 200: - { if (empty($response)) { return new ErrorBluemResponse("Error: Empty response returned"); } try { - $response = $this->fabricateResponseObject($transaction_request->transaction_code, $response); + $response = $this->fabricateResponseObject( + $transaction_request->transaction_code, + $response + ); } catch (Throwable $th) { - return new ErrorBluemResponse("Error: Could not create Bluem Response object. More details: " . $th->getMessage()); + return new ErrorBluemResponse( + "Error: Could not create Bluem Response object. More details: " . + $th->getMessage() + ); } if ($array_data['@attributes']['type'] === "ErrorResponse") { - $errorMessage = match ((string) $transaction_request->transaction_code) { - 'SRX', 'SUD', 'TRX', 'TRS' => (string) $response->EMandateErrorResponse->Error->ErrorMessage, - 'PSU', 'PSX', 'PTS', 'PTX' => (string) $response->PaymentErrorResponse->Error->ErrorMessage, - 'ITS', 'ITX', 'ISU', 'ISX' => (string) $response->IdentityErrorResponse->Error->ErrorMessage, - 'INS', 'INX' => (string) $response->IBANCheckErrorResponse->Error->ErrorMessage, + $errorMessage = match ((string)$transaction_request->transaction_code) { + 'SRX', 'SUD', 'TRX', 'TRS' => (string)$response->EMandateErrorResponse->Error->ErrorMessage, + 'PSU', 'PSX', 'PTS', 'PTX' => (string)$response->PaymentErrorResponse->Error->ErrorMessage, + 'ITS', 'ITX', 'ISU', 'ISX' => (string)$response->IdentityErrorResponse->Error->ErrorMessage, + 'INS', 'INX' => (string)$response->IBANCheckErrorResponse->Error->ErrorMessage, default => throw new RuntimeException("Invalid transaction type requested"), }; // @todo: move into a separate function - return new ErrorBluemResponse("Error: " . ( $errorMessage )); + return new ErrorBluemResponse("Error: " . ($errorMessage)); } - if (! $response->Status()) { - return new ErrorBluemResponse("Error: " . ( $response->Error->ErrorMessage )); + if (!$response->Status()) { + return new ErrorBluemResponse("Error: " . ($response->Error->ErrorMessage)); } return $response; - - } case 400: return new ErrorBluemResponse('Your request was not formed correctly.'); case 401: @@ -314,7 +326,7 @@ public function PerformRequest(BluemRequestInterface $transaction_request): Blue return new ErrorBluemResponse('Unexpected / erroneous response (code ' . $response_status . ')'); } } catch (Throwable $th) { - return new ErrorBluemResponse('HTTP Request Error'. $th->getMessage()); + return new ErrorBluemResponse('HTTP Request Error' . $th->getMessage()); // @todo improve request return exceptions; add our own exception type } } @@ -359,9 +371,9 @@ public function MandateStatus($mandateID, $entranceCode): BluemResponseInterface $this->configuration, $mandateID, $entranceCode, - ( $this->configuration->environment === BLUEM_ENVIRONMENT_TESTING && - $this->configuration->expectedReturnStatus !== null ? - $this->configuration->expectedReturnStatus : "" ) + ($this->configuration->environment === BLUEM_ENVIRONMENT_TESTING && + $this->configuration->expectedReturnStatus !== null ? + $this->configuration->expectedReturnStatus : "") ); return $this->PerformRequest($r); @@ -407,7 +419,7 @@ public function Payment( $amount, $dueDateTime, $currency, - $entranceCode ?? $this->CreateEntranceCode() + $entranceCode ?? $this->CreateEntranceCode() ); } catch (Exception $e) { throw new RuntimeException("Could not create request: " . $e->getMessage(), $e->getCode(), $e); @@ -468,9 +480,9 @@ public function CreatePaymentRequest( $currency, $this->CreatePaymentTransactionID($debtorReference), $entranceCode, - ( $this->configuration->environment === BLUEM_ENVIRONMENT_TESTING && - $this->configuration->expectedReturnStatus !== null ? - $this->configuration->expectedReturnStatus : "" ), + ($this->configuration->environment === BLUEM_ENVIRONMENT_TESTING && + $this->configuration->expectedReturnStatus !== null ? + $this->configuration->expectedReturnStatus : ""), $debtorReturnURL, $paymentReference ); @@ -488,6 +500,7 @@ public function CreatePaymentTransactionID(string $debtorReference): string // @todo: Create Identity shorthand function + /** * Retrieve the status of a payment request, based on transactionID and Entrance Code * @@ -496,14 +509,16 @@ public function CreatePaymentTransactionID(string $debtorReference): string * * @throws Exception */ - public function PaymentStatus($transactionID, $entranceCode): ErrorBluemResponse|IBANNameCheckBluemResponse|IdentityStatusBluemResponse|IdentityTransactionBluemResponse|MandateStatusBluemResponse|MandateTransactionBluemResponse|PaymentStatusBluemResponse|PaymentTransactionBluemResponse - { + public function PaymentStatus( + $transactionID, + $entranceCode + ): ErrorBluemResponse|IBANNameCheckBluemResponse|IdentityStatusBluemResponse|IdentityTransactionBluemResponse|MandateStatusBluemResponse|MandateTransactionBluemResponse|PaymentStatusBluemResponse|PaymentTransactionBluemResponse { $r = new PaymentStatusBluemRequest( $this->configuration, $transactionID, - ( $this->configuration->environment === BLUEM_ENVIRONMENT_TESTING && - $this->configuration->expectedReturnStatus !== null ? - $this->configuration->expectedReturnStatus : "" ), + $this->configuration->environment === BLUEM_ENVIRONMENT_TESTING && + $this->configuration->expectedReturnStatus !== null ? + $this->configuration->expectedReturnStatus : "", $entranceCode ); @@ -534,7 +549,7 @@ public function CreateIdentityRequest( $this->configuration, $entranceCode, $this->configuration->environment === BLUEM_ENVIRONMENT_TESTING && - $this->configuration->expectedReturnStatus !== null ? + $this->configuration->expectedReturnStatus !== null ? $this->configuration->expectedReturnStatus : "", $requestCategory, $description, @@ -556,9 +571,9 @@ public function IdentityStatus($transactionID, $entranceCode): ErrorBluemRespons $r = new IdentityStatusBluemRequest( $this->configuration, $entranceCode, - ( $this->configuration->environment === BLUEM_ENVIRONMENT_TESTING && - $this->configuration->expectedReturnStatus !== null ? - $this->configuration->expectedReturnStatus : "" ), + ($this->configuration->environment === BLUEM_ENVIRONMENT_TESTING && + $this->configuration->expectedReturnStatus !== null ? + $this->configuration->expectedReturnStatus : ""), $transactionID ); @@ -634,8 +649,11 @@ public function GetIdentityRequestTypes(): array * @throws HTTP_Request2_LogicException * @throws Exception */ - public function IBANNameCheck(string $iban, string $name, string $debtorReference = ""): ErrorBluemResponse|IBANNameCheckBluemResponse|IdentityStatusBluemResponse|IdentityTransactionBluemResponse|MandateStatusBluemResponse|MandateTransactionBluemResponse|PaymentStatusBluemResponse|PaymentTransactionBluemResponse - { + public function IBANNameCheck( + string $iban, + string $name, + string $debtorReference = "" + ): ErrorBluemResponse|IBANNameCheckBluemResponse|IdentityStatusBluemResponse|IdentityTransactionBluemResponse|MandateStatusBluemResponse|MandateTransactionBluemResponse|PaymentStatusBluemResponse|PaymentTransactionBluemResponse { $r = $this->CreateIBANNameCheckRequest($iban, $name, $debtorReference); return $this->PerformRequest($r); @@ -651,8 +669,11 @@ public function IBANNameCheck(string $iban, string $name, string $debtorReferenc * * @throws Exception */ - public function CreateIBANNameCheckRequest(string $iban, string $name, string $debtorReference = ""): IBANBluemRequest - { + public function CreateIBANNameCheckRequest( + string $iban, + string $name, + string $debtorReference = "" + ): IBANBluemRequest { $entranceCode = $this->CreateEntranceCode(); return new IBANBluemRequest( @@ -697,7 +718,7 @@ public function _retrieveContext($context): BluemContextInterface $context = new IdentityContext(); break; default: - $contexts = [ "Mandates", "Payments", "Identity" ]; + $contexts = ["Mandates", "Payments", "Identity"]; throw new RuntimeException( "Invalid Context requested, should be one of the following: " . diff --git a/src/Contexts/BluemContext.php b/src/Contexts/BluemContext.php index 77d85da..d8806e7 100644 --- a/src/Contexts/BluemContext.php +++ b/src/Contexts/BluemContext.php @@ -1,4 +1,5 @@ * @@ -12,7 +13,6 @@ abstract class BluemContext implements BluemContextInterface { - public function __construct(public array $BICs = []) { } diff --git a/src/Contexts/IBANCheckContext.php b/src/Contexts/IBANCheckContext.php index e0731cb..ce995e4 100644 --- a/src/Contexts/IBANCheckContext.php +++ b/src/Contexts/IBANCheckContext.php @@ -1,4 +1,5 @@ * diff --git a/src/Contexts/IdentityContext.php b/src/Contexts/IdentityContext.php index 06209e1..df40afa 100644 --- a/src/Contexts/IdentityContext.php +++ b/src/Contexts/IdentityContext.php @@ -1,4 +1,5 @@ * @@ -6,7 +7,6 @@ * with this source code in the file LICENSE. */ - namespace Bluem\BluemPHP\Contexts; use Bluem\BluemPHP\Helpers\BIC; @@ -57,7 +57,7 @@ public function addPaymentMethodDetails(array $details = []): void { $validationErrors = $this->validateDetails($details); if ($validationErrors !== []) { - throw new RuntimeException('Invalid details given: '. implode(', ', $validationErrors)); + throw new RuntimeException('Invalid details given: ' . implode(', ', $validationErrors)); } $this->paymentMethodDetails = $details; diff --git a/src/Contexts/MandatesContext.php b/src/Contexts/MandatesContext.php index 597c156..d0c45a4 100644 --- a/src/Contexts/MandatesContext.php +++ b/src/Contexts/MandatesContext.php @@ -1,4 +1,5 @@ * @@ -77,7 +78,7 @@ public function addPaymentMethodDetails(array $details = []): void { $validationErrors = $this->validateDetails($details); if ($validationErrors !== []) { - throw new RuntimeException('Invalid details given: '. implode(', ', $validationErrors)); + throw new RuntimeException('Invalid details given: ' . implode(', ', $validationErrors)); } $this->paymentMethodDetails = $details; diff --git a/src/Contexts/PaymentsContext.php b/src/Contexts/PaymentsContext.php index b7d2d12..44bd2bc 100644 --- a/src/Contexts/PaymentsContext.php +++ b/src/Contexts/PaymentsContext.php @@ -1,4 +1,5 @@ * @@ -6,7 +7,6 @@ * with this source code in the file LICENSE. */ - namespace Bluem\BluemPHP\Contexts; use Bluem\BluemPHP\Helpers\BIC; @@ -69,7 +69,7 @@ public function addPaymentMethodDetails(array $details = []): void { $validationErrors = $this->validateDetails(); if ($validationErrors !== []) { - throw new RuntimeException('Invalid details given: '. implode(', ', $validationErrors)); + throw new RuntimeException('Invalid details given: ' . implode(', ', $validationErrors)); } $this->paymentMethodDetails = $details; diff --git a/src/Exceptions/InvalidBluemConfigurationException.php b/src/Exceptions/InvalidBluemConfigurationException.php index 519d5fd..88f12c3 100644 --- a/src/Exceptions/InvalidBluemConfigurationException.php +++ b/src/Exceptions/InvalidBluemConfigurationException.php @@ -1,4 +1,5 @@ * @@ -6,12 +7,10 @@ * with this source code in the file LICENSE. */ - namespace Bluem\BluemPHP\Exceptions; use Exception; class InvalidBluemConfigurationException extends Exception { - } diff --git a/src/Exceptions/InvalidBluemRequestException.php b/src/Exceptions/InvalidBluemRequestException.php index 81d6689..acf1924 100644 --- a/src/Exceptions/InvalidBluemRequestException.php +++ b/src/Exceptions/InvalidBluemRequestException.php @@ -1,4 +1,5 @@ * @@ -6,12 +7,10 @@ * with this source code in the file LICENSE. */ - namespace Bluem\BluemPHP\Exceptions; use Exception; class InvalidBluemRequestException extends Exception { - } diff --git a/src/Exceptions/InvalidContextException.php b/src/Exceptions/InvalidContextException.php index d749460..bd6a131 100644 --- a/src/Exceptions/InvalidContextException.php +++ b/src/Exceptions/InvalidContextException.php @@ -1,4 +1,5 @@ * @@ -6,7 +7,6 @@ * with this source code in the file LICENSE. */ - namespace Bluem\BluemPHP\Exceptions; use Exception; diff --git a/src/Extensions/IPAPI.php b/src/Extensions/IPAPI.php index c5eb7af..e8071a6 100644 --- a/src/Extensions/IPAPI.php +++ b/src/Extensions/IPAPI.php @@ -1,4 +1,5 @@ * @@ -45,7 +46,8 @@ public function CheckIsNetherlands(string $ip = ""): bool $result = $this->QueryIP($ip); // if we encountered an error, return true for now - if (isset($result['success']) + if ( + isset($result['success']) && $result['success'] === false ) { return true; diff --git a/src/Helpers/BIC.php b/src/Helpers/BIC.php index c5ea997..ecbdbaa 100644 --- a/src/Helpers/BIC.php +++ b/src/Helpers/BIC.php @@ -1,4 +1,5 @@ * diff --git a/src/Helpers/BluemConfiguration.php b/src/Helpers/BluemConfiguration.php index 3b85e13..b25f965 100644 --- a/src/Helpers/BluemConfiguration.php +++ b/src/Helpers/BluemConfiguration.php @@ -1,4 +1,5 @@ * @@ -6,7 +7,6 @@ * with this source code in the file LICENSE. */ - namespace Bluem\BluemPHP\Helpers; use Bluem\BluemPHP\Exceptions\InvalidBluemConfigurationException; @@ -66,7 +66,9 @@ public function __construct(object|array $raw) $validated = $this->validator->validate($raw); if ($validated === false) { - throw new InvalidBluemConfigurationException('Bluem Configuration is not valid: ' . $this->errorsAsString()); + throw new InvalidBluemConfigurationException( + 'Bluem Configuration is not valid: ' . $this->errorsAsString() + ); } $this->environment = $validated->environment ?? self::TESTING_ENVIRONMENT; @@ -120,7 +122,7 @@ private function _assumeBrandID(string $service, string $brandID): string } $prefix = str_replace($available_services, '', $brandID); - return $prefix.ucfirst($service); + return $prefix . ucfirst($service); } /** diff --git a/src/Helpers/BluemCurrency.php b/src/Helpers/BluemCurrency.php index 0c1228b..dc85710 100644 --- a/src/Helpers/BluemCurrency.php +++ b/src/Helpers/BluemCurrency.php @@ -1,4 +1,5 @@ * @@ -6,7 +7,6 @@ * with this source code in the file LICENSE. */ - namespace Bluem\BluemPHP\Helpers; use RuntimeException; @@ -14,7 +14,6 @@ class BluemCurrency implements Stringable { - private const EURO_CURRENCY = 'EUR'; private const US_DOLLAR_CURRENCY = 'USD'; diff --git a/src/Helpers/BluemIdentityCategoryList.php b/src/Helpers/BluemIdentityCategoryList.php index 5de1dc1..2d8f574 100644 --- a/src/Helpers/BluemIdentityCategoryList.php +++ b/src/Helpers/BluemIdentityCategoryList.php @@ -1,4 +1,5 @@ * @@ -6,12 +7,10 @@ * with this source code in the file LICENSE. */ - namespace Bluem\BluemPHP\Helpers; class BluemIdentityCategoryList { - /** * @var string[] $categories */ diff --git a/src/Helpers/BluemMaxAmount.php b/src/Helpers/BluemMaxAmount.php index b334551..79d660b 100644 --- a/src/Helpers/BluemMaxAmount.php +++ b/src/Helpers/BluemMaxAmount.php @@ -1,4 +1,5 @@ * @@ -6,12 +7,10 @@ * with this source code in the file LICENSE. */ - namespace Bluem\BluemPHP\Helpers; class BluemMaxAmount implements \Stringable { - public BluemCurrency $currency; public float $amount; @@ -23,7 +22,6 @@ public function __construct( $this->amount = $amount; try { - $this->currency = new BluemCurrency($currencyCode); } catch (\Exception $e) { $this->currency = new BluemCurrency(); diff --git a/src/Helpers/Now.php b/src/Helpers/Now.php index e9f9228..5a26a6f 100644 --- a/src/Helpers/Now.php +++ b/src/Helpers/Now.php @@ -54,7 +54,7 @@ public function addDay(int $days): static $this->dateTime = $this->dateTime->add(new DateInterval("P{$days}D")); return $this; } - + /** * @throws Exception */ diff --git a/src/Interfaces/BluemContextInterface.php b/src/Interfaces/BluemContextInterface.php index 37e69c0..adf7150 100644 --- a/src/Interfaces/BluemContextInterface.php +++ b/src/Interfaces/BluemContextInterface.php @@ -1,4 +1,5 @@ * @@ -6,7 +7,6 @@ * with this source code in the file LICENSE. */ - namespace Bluem\BluemPHP\Interfaces; interface BluemContextInterface diff --git a/src/Interfaces/BluemRequestInterface.php b/src/Interfaces/BluemRequestInterface.php index cdd8937..c6d34e6 100644 --- a/src/Interfaces/BluemRequestInterface.php +++ b/src/Interfaces/BluemRequestInterface.php @@ -1,4 +1,5 @@ * @@ -6,7 +7,6 @@ * with this source code in the file LICENSE. */ - namespace Bluem\BluemPHP\Interfaces; use Bluem\BluemPHP\Requests\BluemRequest; diff --git a/src/Interfaces/BluemResponseInterface.php b/src/Interfaces/BluemResponseInterface.php index 45c3ac3..8b5e192 100644 --- a/src/Interfaces/BluemResponseInterface.php +++ b/src/Interfaces/BluemResponseInterface.php @@ -1,4 +1,5 @@ * @@ -6,7 +7,6 @@ * with this source code in the file LICENSE. */ - namespace Bluem\BluemPHP\Interfaces; interface BluemResponseInterface diff --git a/src/Interfaces/WebhookInterface.php b/src/Interfaces/WebhookInterface.php index 111a9d4..bb647b3 100644 --- a/src/Interfaces/WebhookInterface.php +++ b/src/Interfaces/WebhookInterface.php @@ -1,4 +1,5 @@ * @@ -6,10 +7,8 @@ * with this source code in the file LICENSE. */ - namespace Bluem\BluemPHP\Interfaces; interface WebhookInterface { - } diff --git a/src/Requests/BluemRequest.php b/src/Requests/BluemRequest.php index 6e02817..a199303 100644 --- a/src/Requests/BluemRequest.php +++ b/src/Requests/BluemRequest.php @@ -1,4 +1,5 @@ * @@ -82,7 +83,7 @@ class BluemRequest implements BluemRequestInterface private array $_debtorAdditionalData = []; - private const TYPE_IDENTIFIERS = [ 'createTransaction', 'requestStatus' ]; + private const TYPE_IDENTIFIERS = ['createTransaction', 'requestStatus']; /** * @var string[] */ @@ -124,8 +125,8 @@ public function __construct( $this->environment = $config->environment; - $this->brandID = $config->brandID; - $this->senderID = $config->senderID; + $this->brandID = $config->brandID; + $this->senderID = $config->senderID; $this->accessToken = $config->accessToken; // @todo just use the config directly instead of copying all configuration elements @@ -142,6 +143,7 @@ public function __construct( } // @todo remove this? + /** * Generate an entranceCode, including test entranceCode substrings for certain types of return responses * @@ -157,41 +159,27 @@ private function entranceCode(string $expectedReturn = 'none'): string if ($this->environment === BLUEM_ENVIRONMENT_TESTING) { switch ($expectedReturn) { case 'success': - { $prefix = "HIO100OIH"; break; - } case 'cancelled': - { $prefix = "HIO200OIH"; break; - } case 'expired': - { $prefix = "HIO300OIH"; break; - } case 'failure': - { $prefix = "HIO500OIH"; break; - } case 'open': - { $prefix = "HIO400OIH"; break; - } case 'pending': - { $prefix = "HIO600OIH"; break; - } case '': case 'none': default: - { break; - } } } @@ -278,7 +266,7 @@ public function selectDebtorWallet($BIC) { $possibleBICs = $this->context->getBICCodes(); - if (! in_array($BIC, $possibleBICs)) { + if (!in_array($BIC, $possibleBICs)) { throw new Exception("Invalid BIC code given, should be a valid BIC of a supported bank."); } $this->debtorWallet = $BIC; @@ -298,7 +286,7 @@ public function XmlWrapDebtorWallet(): string return ""; } - if (! isset($this->context->debtorWalletElementName) || $this->context->debtorWalletElementName === "") { + if (!isset($this->context->debtorWalletElementName) || $this->context->debtorWalletElementName === "") { return ''; } @@ -319,7 +307,7 @@ public function XmlWrapDebtorAdditionalData(): string $res = PHP_EOL . "" . PHP_EOL; foreach ($this->_debtorAdditionalData as $key => $value) { - if (! in_array($key, $this->_possibleDebtorAdditionalDataKeys)) { + if (!in_array($key, $this->_possibleDebtorAdditionalDataKeys)) { continue; } @@ -338,14 +326,14 @@ public function XmlWrapDebtorAdditionalData(): string */ public function addAdditionalData($key, $value): BluemRequest { - if (! in_array($key, $this->_possibleDebtorAdditionalDataKeys)) { + if (!in_array($key, $this->_possibleDebtorAdditionalDataKeys)) { throw new Exception( "Incorrect key added as DebtorAdditionalData to request." ); } - $this->_debtorAdditionalData[ $key ] = $value; + $this->_debtorAdditionalData[$key] = $value; return $this; // allow function chaining } diff --git a/src/Requests/EmandateBluemRequest.php b/src/Requests/EmandateBluemRequest.php index 70e9989..a968dee 100644 --- a/src/Requests/EmandateBluemRequest.php +++ b/src/Requests/EmandateBluemRequest.php @@ -1,4 +1,5 @@ * @@ -6,7 +7,6 @@ * with this source code in the file LICENSE. */ - namespace Bluem\BluemPHP\Requests; use Bluem\BluemPHP\Contexts\MandatesContext; diff --git a/src/Requests/EmandateStatusBluemRequest.php b/src/Requests/EmandateStatusBluemRequest.php index 02c93fc..f2fb413 100644 --- a/src/Requests/EmandateStatusBluemRequest.php +++ b/src/Requests/EmandateStatusBluemRequest.php @@ -1,4 +1,5 @@ * diff --git a/src/Requests/IBANBluemRequest.php b/src/Requests/IBANBluemRequest.php index 7b9292c..3a55d29 100644 --- a/src/Requests/IBANBluemRequest.php +++ b/src/Requests/IBANBluemRequest.php @@ -1,4 +1,5 @@ * diff --git a/src/Requests/IdentityBluemRequest.php b/src/Requests/IdentityBluemRequest.php index e4df817..6a980f1 100644 --- a/src/Requests/IdentityBluemRequest.php +++ b/src/Requests/IdentityBluemRequest.php @@ -1,4 +1,5 @@ * diff --git a/src/Requests/IdentityStatusBluemRequest.php b/src/Requests/IdentityStatusBluemRequest.php index 9b3e226..338fe77 100644 --- a/src/Requests/IdentityStatusBluemRequest.php +++ b/src/Requests/IdentityStatusBluemRequest.php @@ -1,4 +1,6 @@ - * * This source file is subject to the license that is bundled diff --git a/src/Requests/PaymentBluemRequest.php b/src/Requests/PaymentBluemRequest.php index 535ae3d..10bf12e 100644 --- a/src/Requests/PaymentBluemRequest.php +++ b/src/Requests/PaymentBluemRequest.php @@ -1,4 +1,5 @@ * @@ -193,7 +194,7 @@ public function setPaymentMethodToIDEAL($BIC = ""): self if (!empty($BIC)) { $this->context->addPaymentMethodDetails( [ - 'BIC'=>$BIC + 'BIC' => $BIC ] ); } @@ -211,7 +212,7 @@ public function setPaymentMethodToPayPal($payPalAccount = ""): self if (!empty($payPalAccount)) { $this->context->addPaymentMethodDetails( [ - 'PayPalAccount'=>$payPalAccount + 'PayPalAccount' => $payPalAccount ] ); } @@ -231,16 +232,17 @@ public function setPaymentMethodToCreditCard( /** * Prepared for future use. */ - if (!empty($cardNumber) || !empty($name) || !empty($securityCode) + if ( + !empty($cardNumber) || !empty($name) || !empty($securityCode) || !empty($expirationDateMonth) || !empty($expirationDateYear) ) { $this->context->addPaymentMethodDetails( [ - 'CardNumber'=>$cardNumber, - 'Name'=>$name, - 'SecurityCode'=>$securityCode, - 'ExpirationDateMonth'=>$expirationDateMonth, - 'ExpirationDateYear'=>$expirationDateYear, + 'CardNumber' => $cardNumber, + 'Name' => $name, + 'SecurityCode' => $securityCode, + 'ExpirationDateMonth' => $expirationDateMonth, + 'ExpirationDateYear' => $expirationDateYear, ] ); } @@ -284,8 +286,8 @@ public function getDueDateTime(mixed $dueDateTime): string private function addZeroPrefix($number) { - if (strlen($number.'') === 1) { - return (int) '0'.$number; + if (strlen($number . '') === 1) { + return (int) '0' . $number; } } diff --git a/src/Requests/PaymentStatusBluemRequest.php b/src/Requests/PaymentStatusBluemRequest.php index e341b55..92006e5 100644 --- a/src/Requests/PaymentStatusBluemRequest.php +++ b/src/Requests/PaymentStatusBluemRequest.php @@ -1,4 +1,5 @@ * @@ -27,15 +28,18 @@ public function __construct( parent::__construct($config, $entranceCode, $expected_return); if ($config instanceof BluemConfiguration) { - if (isset($config->paymentBrandID) + if ( + isset($config->paymentBrandID) && $config->paymentBrandID !== "" ) { $config->setBrandID($config->paymentBrandID); } else { $config->setBrandID($config->brandID); } - } elseif ($config instanceof \stdClass && isset($config->paymentBrandID) - && $config->paymentBrandID !== "") { + } elseif ( + $config instanceof \stdClass && isset($config->paymentBrandID) + && $config->paymentBrandID !== "" + ) { $config->brandID = $config->paymentBrandID; } diff --git a/src/Responses/BluemResponse.php b/src/Responses/BluemResponse.php index 7b7e2a1..a3f1fee 100644 --- a/src/Responses/BluemResponse.php +++ b/src/Responses/BluemResponse.php @@ -19,7 +19,6 @@ */ class BluemResponse extends SimpleXMLElement implements BluemResponseInterface { - public static string $response_primary_key; public static string $transaction_type; public static ?string $error_response_type = null; @@ -76,7 +75,7 @@ protected function getChildXmlElement(): string return self::$response_primary_key; } - protected function getParentStringVariable(string $variable) : string + protected function getParentStringVariable(string $variable): string { return ( isset($this->{$this->getParentXmlElement()}->$variable) ) ? $this->{$this->getParentXmlElement()}->$variable . '' : ''; } diff --git a/src/Responses/ErrorBluemResponse.php b/src/Responses/ErrorBluemResponse.php index b21d48b..a8b6709 100644 --- a/src/Responses/ErrorBluemResponse.php +++ b/src/Responses/ErrorBluemResponse.php @@ -1,4 +1,5 @@ * diff --git a/src/Responses/IBANNameCheckBluemResponse.php b/src/Responses/IBANNameCheckBluemResponse.php index c05b3d8..78aaa78 100644 --- a/src/Responses/IBANNameCheckBluemResponse.php +++ b/src/Responses/IBANNameCheckBluemResponse.php @@ -1,4 +1,5 @@ * diff --git a/src/Responses/IdentityStatusBluemResponse.php b/src/Responses/IdentityStatusBluemResponse.php index 675a1e7..2e02fb4 100644 --- a/src/Responses/IdentityStatusBluemResponse.php +++ b/src/Responses/IdentityStatusBluemResponse.php @@ -1,4 +1,5 @@ * diff --git a/src/Responses/IdentityTransactionBluemResponse.php b/src/Responses/IdentityTransactionBluemResponse.php index da18231..45fdb46 100644 --- a/src/Responses/IdentityTransactionBluemResponse.php +++ b/src/Responses/IdentityTransactionBluemResponse.php @@ -1,4 +1,5 @@ * diff --git a/src/Responses/MandateStatusBluemResponse.php b/src/Responses/MandateStatusBluemResponse.php index 6f4dbaa..bdbf833 100644 --- a/src/Responses/MandateStatusBluemResponse.php +++ b/src/Responses/MandateStatusBluemResponse.php @@ -1,4 +1,5 @@ * diff --git a/src/Responses/MandateTransactionBluemResponse.php b/src/Responses/MandateTransactionBluemResponse.php index d7ff32d..8b78597 100644 --- a/src/Responses/MandateTransactionBluemResponse.php +++ b/src/Responses/MandateTransactionBluemResponse.php @@ -1,4 +1,5 @@ * diff --git a/src/Responses/PaymentStatusBluemResponse.php b/src/Responses/PaymentStatusBluemResponse.php index bc7ca38..c08367f 100644 --- a/src/Responses/PaymentStatusBluemResponse.php +++ b/src/Responses/PaymentStatusBluemResponse.php @@ -1,4 +1,5 @@ * @@ -12,6 +13,5 @@ class PaymentStatusBluemResponse extends StatusBluemResponse { public static string $transaction_type = "Payment"; public static string $response_primary_key = 'PaymentStatus'; - public static ? - string $error_response_type = 'PaymentErrorResponse'; + public static ?string $error_response_type = 'PaymentErrorResponse'; } diff --git a/src/Responses/PaymentTransactionBluemResponse.php b/src/Responses/PaymentTransactionBluemResponse.php index 3f20e9e..ce2a913 100644 --- a/src/Responses/PaymentTransactionBluemResponse.php +++ b/src/Responses/PaymentTransactionBluemResponse.php @@ -1,4 +1,5 @@ * diff --git a/src/Responses/StatusBluemResponse.php b/src/Responses/StatusBluemResponse.php index ad099c8..df5b8e9 100644 --- a/src/Responses/StatusBluemResponse.php +++ b/src/Responses/StatusBluemResponse.php @@ -1,4 +1,5 @@ * diff --git a/src/Responses/TransactionBluemResponse.php b/src/Responses/TransactionBluemResponse.php index 012f45e..704cf62 100644 --- a/src/Responses/TransactionBluemResponse.php +++ b/src/Responses/TransactionBluemResponse.php @@ -1,4 +1,5 @@ * @@ -10,7 +11,6 @@ class TransactionBluemResponse extends BluemResponse { - public function GetTransactionURL(): string { return $this->getParentStringVariable("TransactionURL"); diff --git a/src/Validators/BluemConfigurationValidator.php b/src/Validators/BluemConfigurationValidator.php index 0009926..399828a 100644 --- a/src/Validators/BluemConfigurationValidator.php +++ b/src/Validators/BluemConfigurationValidator.php @@ -1,4 +1,5 @@ * @@ -8,6 +9,7 @@ namespace Bluem\BluemPHP\Validators; +use Bluem\BluemPHP\Exceptions\InvalidBluemConfigurationException; use Exception; use Throwable; @@ -24,7 +26,7 @@ class BluemConfigurationValidator { private ?array $errors = null; - function validate($config) + public function validate($config) { // essential validation @@ -44,7 +46,6 @@ function validate($config) $config = $this->_validateEMandateReason($config); $config = $this->_validateLocalInstrumentCode($config); $config = $this->_validateMerchantReturnURLBase($config); - } catch (Throwable $th) { $this->errors[] = $th->getMessage(); @@ -56,15 +57,16 @@ function validate($config) private function _validateEnvironment($config) { - if (!in_array( - $config->environment, - [ - BLUEM_ENVIRONMENT_TESTING, - BLUEM_ENVIRONMENT_ACCEPTANCE, - BLUEM_ENVIRONMENT_PRODUCTION - ], - true - ) + if ( + !in_array( + $config->environment, + [ + BLUEM_ENVIRONMENT_TESTING, + BLUEM_ENVIRONMENT_ACCEPTANCE, + BLUEM_ENVIRONMENT_PRODUCTION + ], + true + ) ) { throw new Exception( "Invalid environment setting, should be either @@ -101,7 +103,8 @@ private function _validateSenderID($config) private function _validateTest_accessToken($config) { - if ($config->environment === BLUEM_ENVIRONMENT_TESTING + if ( + $config->environment === BLUEM_ENVIRONMENT_TESTING && ( ! isset($config->test_accessToken) || $config->test_accessToken === "" ) ) { @@ -118,7 +121,8 @@ private function _validateProduction_accessToken($config) { // only required if mode is set to PROD // production_accessToken - if ($config->environment === BLUEM_ENVIRONMENT_PRODUCTION + if ( + $config->environment === BLUEM_ENVIRONMENT_PRODUCTION && ( ! isset($config->production_accessToken) || $config->production_accessToken === "" ) ) { @@ -135,7 +139,10 @@ private function _validateProduction_accessToken($config) private function _validateBrandID($config) { if (! isset($config->brandID)) { - throw new Exception("brandID not set; please add this to your configuration when instantiating the Bluem integration"); + throw new InvalidBluemConfigurationException( + "brandID not set; please add this to your configuration " . + "when instantiating the Bluem integration" + ); } return $config; @@ -180,7 +187,8 @@ private function _validateThanksPage($config) private function _validateExpectedReturnStatus($config): mixed { if ($config->environment === BLUEM_ENVIRONMENT_TESTING) { - if (! isset($config->expectedReturnStatus) + if ( + ! isset($config->expectedReturnStatus) || ( $config->expectedReturnStatus !== "" && !in_array($config->expectedReturnStatus, $this->getPossibleReturnStatuses(), true)) ) { @@ -219,7 +227,8 @@ private function _validateEMandateReason($config) private function _validateLocalInstrumentCode($config) { - if (! isset($config->localInstrumentCode) + if ( + ! isset($config->localInstrumentCode) || ! in_array( $config->localInstrumentCode, [ 'B2B', 'CORE' ] diff --git a/src/Validators/BluemXMLValidator.php b/src/Validators/BluemXMLValidator.php index f3bf2b5..d994147 100644 --- a/src/Validators/BluemXMLValidator.php +++ b/src/Validators/BluemXMLValidator.php @@ -1,4 +1,5 @@ * @@ -46,7 +47,7 @@ public function validate(string $data): self // Verify a XML file $xmlVerified = $xmlSignatureVerifier->verifyXml(file_get_contents($temp_file_path)); - if (! $xmlVerified) { + if (!$xmlVerified) { $this->addError("Invalid signature"); } } catch (Exception $e) { @@ -72,12 +73,22 @@ private function getKeyFileName(): string $prefix = 'webhook_bluem_nl_'; // Check the datetime for certificates - if ( ( $current_date === "2024-07-01" && $current_time >= "12:00" ) || $current_date > "2024-07-01") - { + if ( + ($current_date === "2024-07-01" && $current_time >= "12:00") + || $current_date > "2024-07-01" + ) { $timestamp = '20240701'; - } elseif ($this->env === BLUEM_ENVIRONMENT_TESTING && ( ( $current_date === "2023-06-28" && $current_time >= "08:00" ) || $current_date > "2023-06-28")) { + } elseif ( + $this->env === BLUEM_ENVIRONMENT_TESTING + && (($current_date === "2023-06-28" && $current_time >= "08:00") + || $current_date > "2023-06-28") + ) { $timestamp = '202306140200-202407050159'; - } elseif ($this->env === BLUEM_ENVIRONMENT_PRODUCTION && ( ( $current_date === "2023-07-04" && $current_time >= "08:00" ) || $current_date > "2023-07-04")) { + } elseif ( + $this->env === BLUEM_ENVIRONMENT_PRODUCTION + && (($current_date === "2023-07-04" && $current_time >= "08:00") + || $current_date > "2023-07-04") + ) { $timestamp = '202306140200-202407050159'; } else { $timestamp = '202206090200-202307110159'; diff --git a/src/Validators/WebhookValidator.php b/src/Validators/WebhookValidator.php index d857f9e..5ba5c6f 100644 --- a/src/Validators/WebhookValidator.php +++ b/src/Validators/WebhookValidator.php @@ -1,4 +1,5 @@ * diff --git a/src/Validators/WebhookValidatorInterface.php b/src/Validators/WebhookValidatorInterface.php index e9639ee..9eda059 100644 --- a/src/Validators/WebhookValidatorInterface.php +++ b/src/Validators/WebhookValidatorInterface.php @@ -1,4 +1,5 @@ * diff --git a/src/Validators/WebhookXMLValidator.php b/src/Validators/WebhookXMLValidator.php index d4f2ef2..6f3a2a6 100644 --- a/src/Validators/WebhookXMLValidator.php +++ b/src/Validators/WebhookXMLValidator.php @@ -1,4 +1,5 @@ * diff --git a/src/Validators/WebhookXmlValidation.php b/src/Validators/WebhookXmlValidation.php index b5af32c..3c41fc6 100644 --- a/src/Validators/WebhookXmlValidation.php +++ b/src/Validators/WebhookXmlValidation.php @@ -1,4 +1,5 @@ * diff --git a/src/Webhook.php b/src/Webhook.php index 5714fde..d489265 100644 --- a/src/Webhook.php +++ b/src/Webhook.php @@ -1,4 +1,5 @@ * @@ -40,8 +41,7 @@ public function __construct( private function parse($xmlData = ''): void { - if (empty($xmlData)) - { + if (empty($xmlData)) { if (!$this->isHttpsRequest()) { $this->exitWithError('Not HTTPS'); return; @@ -272,7 +272,7 @@ public function getDebtorAccountName(): ?string if (!$details instanceof \SimpleXMLElement) { return ""; } - return $details->DebtorAccountName."" ?? ""; + return $details->DebtorAccountName . "" ?? ""; } public function getDebtorIBAN(): ?string { @@ -280,7 +280,7 @@ public function getDebtorIBAN(): ?string if (!$details instanceof \SimpleXMLElement) { return ""; } - return $details->DebtorIBAN."" ?? ""; + return $details->DebtorIBAN . "" ?? ""; } public function getDebtorBankID(): ?string { @@ -288,7 +288,7 @@ public function getDebtorBankID(): ?string if (!$details instanceof \SimpleXMLElement) { return ""; } - return $details->DebtorBankID."" ?? ""; + return $details->DebtorBankID . "" ?? ""; } @@ -341,17 +341,17 @@ public function getAcceptanceReportArray(): array public function getRequestType(): string { - return $this->getPayload()->RequestType .""; + return $this->getPayload()->RequestType . ""; } public function getAuthenticationAuthorityID(): string { - return $this->getPayload()->AuthenticationAuthorityID.''; + return $this->getPayload()->AuthenticationAuthorityID . ''; } public function getAuthenticationAuthorityName(): string { - return $this->getPayload()->AuthenticationAuthorityName.''; + return $this->getPayload()->AuthenticationAuthorityName . ''; } public function getIdentityReportArray(): array @@ -363,29 +363,29 @@ public function getIdentityReportArray(): array } return [ - 'DateTime' => $report->DateTime.'', - 'CustomerIDResponse' => $report->CustomerIDResponse.'', + 'DateTime' => $report->DateTime . '', + 'CustomerIDResponse' => $report->CustomerIDResponse . '', 'NameResponse' => [ - 'Initials'=>$report->NameResponse->Initials. '', - 'LegalLastName'=>$report->NameResponse->LegalLastName. '', - 'LegalLastNamePrefix'=>$report->NameResponse->LegalLastNamePrefix. '', - 'PreferredLastName'=>$report->NameResponse->PreferredLastName. '', - 'PreferredLastNamePrefix'=>$report->NameResponse->PreferredLastNamePrefix. '', - 'PartnerLastName'=>$report->NameResponse->PartnerLastName. '', - 'PartnerLastNamePrefix'=>$report->NameResponse->PartnerLastNamePrefix. '', + 'Initials' => $report->NameResponse->Initials . '', + 'LegalLastName' => $report->NameResponse->LegalLastName . '', + 'LegalLastNamePrefix' => $report->NameResponse->LegalLastNamePrefix . '', + 'PreferredLastName' => $report->NameResponse->PreferredLastName . '', + 'PreferredLastNamePrefix' => $report->NameResponse->PreferredLastNamePrefix . '', + 'PartnerLastName' => $report->NameResponse->PartnerLastName . '', + 'PartnerLastNamePrefix' => $report->NameResponse->PartnerLastNamePrefix . '', ], 'AddressResponse' => [ - 'Street'=>$report->AddressResponse->Street. '', - 'HouseNumber'=>$report->AddressResponse->HouseNumber. '', - 'HouseNumberSuffix'=>$report->AddressResponse->HouseNumberSuffix. '' ?? '', - 'PostalCode'=>$report->AddressResponse->PostalCode. '', - 'City'=>$report->AddressResponse->City. '', - 'CountryCode'=>$report->AddressResponse->CountryCode. '', + 'Street' => $report->AddressResponse->Street . '', + 'HouseNumber' => $report->AddressResponse->HouseNumber . '', + 'HouseNumberSuffix' => $report->AddressResponse->HouseNumberSuffix . '' ?? '', + 'PostalCode' => $report->AddressResponse->PostalCode . '', + 'City' => $report->AddressResponse->City . '', + 'CountryCode' => $report->AddressResponse->CountryCode . '', ], 'BirthDateResponse' => $report->BirthDateResponse . '', 'GenderResponse' => $report->GenderResponse . '', 'TelephoneResponse1' => $report->TelephoneResponse1 . '', - 'EmailResponse' => $report->EmailResponse .'' + 'EmailResponse' => $report->EmailResponse . '' ]; } } From dd5587fd5746cd2fe4d35a07dd321513b1abe1b1 Mon Sep 17 00:00:00 2001 From: "daan.rijpkema" Date: Sun, 10 Nov 2024 15:02:16 +0100 Subject: [PATCH 11/11] chore: Fix ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 042f54e..f5ea2b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: uses: php-actions/composer@v5 - name: PHP CodeSniffer - run: ./vendor/bin/phpcs --standard=PSR12 --exclude=Generic.NamingConventions.UpperCaseConstantName,PSR1.Methods.CamelCapsMethodName,PSR2.Methods.MethodDeclaration /src + run: ./vendor/bin/phpcs --runtime-set ignore_warnings_on_exit 1 --standard=PSR12 --exclude=Generic.NamingConventions.UpperCaseConstantName,PSR1.Methods.CamelCapsMethodName,PSR2.Methods.MethodDeclaration ./src - name: PHPUnit Tests uses: php-actions/phpunit@v3