From 5fd4b0f1875c71a5ea8fc52069b5af3f52c1f679 Mon Sep 17 00:00:00 2001 From: Melech Mizrachi Date: Mon, 10 Jun 2024 09:28:43 -0700 Subject: [PATCH 1/7] Updating all dependencies, including omnipay/common to ^3.0 --- composer.json | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index ae7c073..f6aebe5 100644 --- a/composer.json +++ b/composer.json @@ -24,12 +24,26 @@ } }, "require": { - "vimeo/payment-gateway-logger": "^1.0", - "omnipay/common": "~2.0", + "php": "^7.4|^8.0", "composer/ca-bundle": "^1.1", - "ext-soap": "*" + "ext-soap": "*", + "guzzle/common": "^3.9.2", + "guzzle/http": "^3.9.2", + "guzzle/parser": "^3.9.2", + "guzzle/plugin-mock": "^3.9.2", + "guzzle/stream": "^3.9.2", + "omnipay/common": "^3.0", + "php-http/guzzle7-adapter": "^1.0.0", + "symfony/event-dispatcher": ">=2.1", + "vimeo/payment-gateway-logger": "^1.1.1" }, "require-dev": { - "omnipay/tests": "~2.0" + "http-interop/http-factory-guzzle": "^1.2", + "omnipay/tests": "^4.0" + }, + "config": { + "allow-plugins": { + "php-http/discovery": true + } } } From 33ce199f4336ab9d09b1a2ea925325176a922ed1 Mon Sep 17 00:00:00 2001 From: Melech Mizrachi Date: Mon, 10 Jun 2024 09:41:45 -0700 Subject: [PATCH 2/7] Removing old guzzle/guzzle dependency. --- composer.json | 5 ----- src/Message/AbstractHOARequest.php | 2 +- src/Message/AbstractRequest.php | 5 +++-- tests/EventEmitterTest.php | 6 +++--- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index f6aebe5..119b3da 100644 --- a/composer.json +++ b/composer.json @@ -27,11 +27,6 @@ "php": "^7.4|^8.0", "composer/ca-bundle": "^1.1", "ext-soap": "*", - "guzzle/common": "^3.9.2", - "guzzle/http": "^3.9.2", - "guzzle/parser": "^3.9.2", - "guzzle/plugin-mock": "^3.9.2", - "guzzle/stream": "^3.9.2", "omnipay/common": "^3.0", "php-http/guzzle7-adapter": "^1.0.0", "symfony/event-dispatcher": ">=2.1", diff --git a/src/Message/AbstractHOARequest.php b/src/Message/AbstractHOARequest.php index 0d03a01..e60555e 100644 --- a/src/Message/AbstractHOARequest.php +++ b/src/Message/AbstractHOARequest.php @@ -6,7 +6,7 @@ use ReflectionClass; use ReflectionMethod; use Omnipay\Vindicia\NameValue; -use Guzzle\Http\ClientInterface; +use Omnipay\Common\Http\ClientInterface; use Symfony\Component\HttpFoundation\Request as HttpRequest; use Omnipay\Vindicia\AttributeBag; diff --git a/src/Message/AbstractRequest.php b/src/Message/AbstractRequest.php index 8a644d1..50b21bc 100644 --- a/src/Message/AbstractRequest.php +++ b/src/Message/AbstractRequest.php @@ -16,9 +16,10 @@ use PaymentGatewayLogger\Event\ResponseEvent; use SoapFault; use stdClass; +use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\HttpFoundation\Request as HttpRequest; -use Guzzle\Http\ClientInterface; +use Omnipay\Common\Http\ClientInterface; use InvalidArgumentException; use Omnipay\Common\CreditCard; use Omnipay\Vindicia\NonStrippingCreditCard; @@ -142,7 +143,7 @@ public function __construct(ClientInterface $httpClient, HttpRequest $httpReques $this->isUpdate = $isUpdate; // Used to fire events before and after executing a request. - $this->eventDispatcher = $httpClient->getEventDispatcher(); + $this->eventDispatcher = new EventDispatcher(); } /** diff --git a/tests/EventEmitterTest.php b/tests/EventEmitterTest.php index 3ca3aec..1070ba9 100644 --- a/tests/EventEmitterTest.php +++ b/tests/EventEmitterTest.php @@ -3,8 +3,8 @@ namespace Omnipay\Vindicia; use Exception; -use Guzzle\Http\Client; -use Guzzle\Http\ClientInterface; +use Omnipay\Common\Http\Client; +use Omnipay\Common\Http\ClientInterface; use Omnipay\Vindicia\TestFramework\DataFaker; use Omnipay\Vindicia\TestFramework\SoapTestCase; use Omnipay\Vindicia\TestFramework\TestSubscriber; @@ -45,7 +45,7 @@ public function setUp() $this->transactionReference = $this->faker->transactionReference(); $this->riskScore = $this->faker->riskScore(); - $this->customHttpClient = new Client('', array('redirect.disable' => true)); + $this->customHttpClient = new Client(); $this->eventDispatcher = $this->customHttpClient->getEventDispatcher(); $this->testSubscriber = new TestSubscriber($this->faker->name(), new TestLogger()); From 9e782b990a0edc963faf68ad0cbd3ab8368be52c Mon Sep 17 00:00:00 2001 From: Melech Mizrachi Date: Mon, 10 Jun 2024 09:43:31 -0700 Subject: [PATCH 3/7] Back to PHP 7.1. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 119b3da..9294d97 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ } }, "require": { - "php": "^7.4|^8.0", + "php": "^7.1|^8.0", "composer/ca-bundle": "^1.1", "ext-soap": "*", "omnipay/common": "^3.0", From 0f288fecd5cd2fd14ed9a4b354bccb49686d9985 Mon Sep 17 00:00:00 2001 From: Melech Mizrachi Date: Mon, 10 Jun 2024 09:47:33 -0700 Subject: [PATCH 4/7] Fix declaration of `setUp()` must be compatible with `Omnipay\Tests\TestCase::setUp(): void` errors. --- tests/ApplePayGatewayTest.php | 2 +- tests/AttributeBagTest.php | 2 +- tests/AttributeTest.php | 2 +- tests/ChargebackTest.php | 2 +- tests/CustomerTest.php | 2 +- tests/EventEmitterTest.php | 2 +- tests/GatewayTest.php | 2 +- tests/HOAGatewayTest.php | 2 +- tests/Message/AbstractHOARequestTest.php | 2 +- tests/Message/AbstractRequestTest.php | 2 +- tests/Message/ApplePayAuthorizeRequestTest.php | 2 +- tests/Message/ApplePayCompleteAuthorizeRequestTest.php | 2 +- tests/Message/AuthorizeRequestTest.php | 2 +- tests/Message/CalculateSalesTaxRequestTest.php | 2 +- tests/Message/CancelSubscriptionRequestTest.php | 2 +- tests/Message/CancelSubscriptionsRequestTest.php | 2 +- tests/Message/CaptureRequestTest.php | 2 +- tests/Message/CompleteCreatePayPalSubscriptionRequestTest.php | 2 +- tests/Message/CompleteHOARequestTest.php | 2 +- tests/Message/CompletePayPalPurchaseRequestTest.php | 2 +- tests/Message/CreateCustomerRequestTest.php | 2 +- tests/Message/CreatePayPalSubscriptionRequestTest.php | 2 +- tests/Message/CreatePaymentMethodRequestTest.php | 2 +- tests/Message/CreatePlanRequestTest.php | 2 +- tests/Message/CreateProductRequestTest.php | 2 +- tests/Message/CreateSubscriptionRequestTest.php | 2 +- tests/Message/FetchChargebacksRequestTest.php | 2 +- tests/Message/FetchCustomerRequestTest.php | 2 +- tests/Message/FetchPaymentMethodRequestTest.php | 2 +- tests/Message/FetchPaymentMethodsRequestTest.php | 2 +- tests/Message/FetchPlanRequestTest.php | 2 +- tests/Message/FetchProductRequestTest.php | 2 +- tests/Message/FetchRefundsRequestTest.php | 2 +- tests/Message/FetchSubscriptionInvoiceReferencesRequestTest.php | 2 +- tests/Message/FetchSubscriptionInvoiceRequestTest.php | 2 +- tests/Message/FetchSubscriptionRequestTest.php | 2 +- tests/Message/FetchSubscriptionsRequestTest.php | 2 +- tests/Message/FetchTransactionRequestTest.php | 2 +- tests/Message/FetchTransactionsRequestTest.php | 2 +- tests/Message/HOAAuthorizeRequestTest.php | 2 +- tests/Message/HOACreatePaymentMethodRequestTest.php | 2 +- tests/Message/HOACreateSubscriptionRequestTest.php | 2 +- tests/Message/HOAPurchaseRequestTest.php | 2 +- tests/Message/MakePaymentRequestTest.php | 2 +- tests/Message/PayPalAuthorizeRequestTest.php | 2 +- tests/Message/PayPalPurchaseRequestTest.php | 2 +- tests/Message/PurchaseRequestTest.php | 2 +- tests/Message/RefundRequestTest.php | 2 +- tests/Message/ResponseTest.php | 2 +- tests/Message/VoidRequestTest.php | 2 +- tests/NameValueTest.php | 2 +- tests/NonStrippingCreditCardTest.php | 2 +- tests/PayPalGatewayTest.php | 2 +- tests/PaymentMethodTest.php | 2 +- tests/PlanTest.php | 2 +- tests/PriceBagTest.php | 2 +- tests/PriceTest.php | 2 +- tests/ProductTest.php | 2 +- tests/RefundTest.php | 2 +- tests/SubscriptionTest.php | 2 +- tests/TaxExemptionBagTest.php | 2 +- tests/TaxExemptionTest.php | 2 +- tests/TestFramework/DataFakerTest.php | 2 +- tests/TransactionStatusTest.php | 2 +- tests/TransactionTest.php | 2 +- tests/VindiciaItemBagTest.php | 2 +- tests/VindiciaItemTest.php | 2 +- tests/VindiciaRefundItemBagTest.php | 2 +- tests/VindiciaRefundItemTest.php | 2 +- 69 files changed, 69 insertions(+), 69 deletions(-) diff --git a/tests/ApplePayGatewayTest.php b/tests/ApplePayGatewayTest.php index ab8dfde..ba3b664 100644 --- a/tests/ApplePayGatewayTest.php +++ b/tests/ApplePayGatewayTest.php @@ -11,7 +11,7 @@ class ApplePayGatewayTest extends GatewayTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->gateway = new ApplePayGateway($this->getHttpClient(), $this->getHttpRequest()); $this->gateway->setTestMode(true); diff --git a/tests/AttributeBagTest.php b/tests/AttributeBagTest.php index 28de826..0700c5b 100644 --- a/tests/AttributeBagTest.php +++ b/tests/AttributeBagTest.php @@ -10,7 +10,7 @@ class AttributeBagTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->bag = new AttributeBag(); $this->faker = new DataFaker(); diff --git a/tests/AttributeTest.php b/tests/AttributeTest.php index d5338e6..f46975c 100644 --- a/tests/AttributeTest.php +++ b/tests/AttributeTest.php @@ -10,7 +10,7 @@ class AttributeTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->attribute = new Attribute(); $this->faker = new DataFaker(); diff --git a/tests/ChargebackTest.php b/tests/ChargebackTest.php index 704245f..9b99543 100644 --- a/tests/ChargebackTest.php +++ b/tests/ChargebackTest.php @@ -10,7 +10,7 @@ class ChargebackTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); $this->chargeback = new Chargeback(); diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index 2ca9c19..2d34b69 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -10,7 +10,7 @@ class CustomerTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); $this->customer = new Customer(); diff --git a/tests/EventEmitterTest.php b/tests/EventEmitterTest.php index 1070ba9..c65a3ac 100644 --- a/tests/EventEmitterTest.php +++ b/tests/EventEmitterTest.php @@ -30,7 +30,7 @@ class EventEmitterTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { date_default_timezone_set('Europe/London'); diff --git a/tests/GatewayTest.php b/tests/GatewayTest.php index cfdaa1b..eab39f8 100644 --- a/tests/GatewayTest.php +++ b/tests/GatewayTest.php @@ -12,7 +12,7 @@ class GatewayTest extends GatewayTestCase /** * @return void */ - public function setUp() + public function setUp(): void { date_default_timezone_set('Europe/London'); $this->gateway = new Gateway($this->getHttpClient(), $this->getHttpRequest()); diff --git a/tests/HOAGatewayTest.php b/tests/HOAGatewayTest.php index 42e94fd..b1f2d31 100644 --- a/tests/HOAGatewayTest.php +++ b/tests/HOAGatewayTest.php @@ -11,7 +11,7 @@ class HOAGatewayTest extends GatewayTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->gateway = new HOAGateway($this->getHttpClient(), $this->getHttpRequest()); $this->gateway->setTestMode(true); diff --git a/tests/Message/AbstractHOARequestTest.php b/tests/Message/AbstractHOARequestTest.php index 416521d..2211d32 100644 --- a/tests/Message/AbstractHOARequestTest.php +++ b/tests/Message/AbstractHOARequestTest.php @@ -13,7 +13,7 @@ class AbstractHOARequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->request = Mocker::mockHOARequest('\Omnipay\Vindicia\Message\AbstractHOARequest')->shouldAllowMockingProtectedMethods(); $this->request->initialize(); diff --git a/tests/Message/AbstractRequestTest.php b/tests/Message/AbstractRequestTest.php index c0140e0..b4c2e0a 100644 --- a/tests/Message/AbstractRequestTest.php +++ b/tests/Message/AbstractRequestTest.php @@ -16,7 +16,7 @@ class AbstractRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { date_default_timezone_set('Europe/London'); $this->request = Mocker::mock('\Omnipay\Vindicia\Message\AbstractRequest')->makePartial()->shouldAllowMockingProtectedMethods(); diff --git a/tests/Message/ApplePayAuthorizeRequestTest.php b/tests/Message/ApplePayAuthorizeRequestTest.php index 57081b4..9275a1d 100644 --- a/tests/Message/ApplePayAuthorizeRequestTest.php +++ b/tests/Message/ApplePayAuthorizeRequestTest.php @@ -11,7 +11,7 @@ class ApplePayAuthorizeRequestTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { // Gateway parameters. $this->faker = new DataFaker(); diff --git a/tests/Message/ApplePayCompleteAuthorizeRequestTest.php b/tests/Message/ApplePayCompleteAuthorizeRequestTest.php index 8d3841a..26c543a 100644 --- a/tests/Message/ApplePayCompleteAuthorizeRequestTest.php +++ b/tests/Message/ApplePayCompleteAuthorizeRequestTest.php @@ -10,7 +10,7 @@ class ApplePayCompleteAuthorizeRequestTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { // Gateway parameters. $this->faker = new DataFaker(); diff --git a/tests/Message/AuthorizeRequestTest.php b/tests/Message/AuthorizeRequestTest.php index d06e9b5..7df5489 100644 --- a/tests/Message/AuthorizeRequestTest.php +++ b/tests/Message/AuthorizeRequestTest.php @@ -15,7 +15,7 @@ class AuthorizeRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { date_default_timezone_set('Europe/London'); $this->faker = new DataFaker(); diff --git a/tests/Message/CalculateSalesTaxRequestTest.php b/tests/Message/CalculateSalesTaxRequestTest.php index 04fd155..8463a9e 100644 --- a/tests/Message/CalculateSalesTaxRequestTest.php +++ b/tests/Message/CalculateSalesTaxRequestTest.php @@ -13,7 +13,7 @@ class CalculateSalesTaxRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/CancelSubscriptionRequestTest.php b/tests/Message/CancelSubscriptionRequestTest.php index 374f624..13f83ed 100644 --- a/tests/Message/CancelSubscriptionRequestTest.php +++ b/tests/Message/CancelSubscriptionRequestTest.php @@ -11,7 +11,7 @@ class CancelSubscriptionRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { date_default_timezone_set('Europe/London'); $this->faker = new DataFaker(); diff --git a/tests/Message/CancelSubscriptionsRequestTest.php b/tests/Message/CancelSubscriptionsRequestTest.php index cd7fcc3..cf401dd 100644 --- a/tests/Message/CancelSubscriptionsRequestTest.php +++ b/tests/Message/CancelSubscriptionsRequestTest.php @@ -12,7 +12,7 @@ class CancelSubscriptionsRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/CaptureRequestTest.php b/tests/Message/CaptureRequestTest.php index 03acbe6..61b9bbf 100644 --- a/tests/Message/CaptureRequestTest.php +++ b/tests/Message/CaptureRequestTest.php @@ -11,7 +11,7 @@ class CaptureRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); $this->transactionId = $this->faker->transactionId(); diff --git a/tests/Message/CompleteCreatePayPalSubscriptionRequestTest.php b/tests/Message/CompleteCreatePayPalSubscriptionRequestTest.php index a089229..8715f9e 100644 --- a/tests/Message/CompleteCreatePayPalSubscriptionRequestTest.php +++ b/tests/Message/CompleteCreatePayPalSubscriptionRequestTest.php @@ -11,7 +11,7 @@ class CompleteCreatePayPalSubscriptionRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/CompleteHOARequestTest.php b/tests/Message/CompleteHOARequestTest.php index 365b673..575bf99 100644 --- a/tests/Message/CompleteHOARequestTest.php +++ b/tests/Message/CompleteHOARequestTest.php @@ -13,7 +13,7 @@ class CompleteHOARequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { date_default_timezone_set('Europe/London'); $this->faker = new DataFaker(); diff --git a/tests/Message/CompletePayPalPurchaseRequestTest.php b/tests/Message/CompletePayPalPurchaseRequestTest.php index 4074b63..954e5df 100644 --- a/tests/Message/CompletePayPalPurchaseRequestTest.php +++ b/tests/Message/CompletePayPalPurchaseRequestTest.php @@ -11,7 +11,7 @@ class CompletePayPalPurchaseRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/CreateCustomerRequestTest.php b/tests/Message/CreateCustomerRequestTest.php index 665345c..7c211dd 100644 --- a/tests/Message/CreateCustomerRequestTest.php +++ b/tests/Message/CreateCustomerRequestTest.php @@ -14,7 +14,7 @@ class CreateCustomerRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { date_default_timezone_set('Europe/London'); $this->faker = new DataFaker(); diff --git a/tests/Message/CreatePayPalSubscriptionRequestTest.php b/tests/Message/CreatePayPalSubscriptionRequestTest.php index f33bb09..c6d066d 100644 --- a/tests/Message/CreatePayPalSubscriptionRequestTest.php +++ b/tests/Message/CreatePayPalSubscriptionRequestTest.php @@ -11,7 +11,7 @@ class CreatePayPalSubscriptionRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/CreatePaymentMethodRequestTest.php b/tests/Message/CreatePaymentMethodRequestTest.php index 5137542..ea10737 100644 --- a/tests/Message/CreatePaymentMethodRequestTest.php +++ b/tests/Message/CreatePaymentMethodRequestTest.php @@ -14,7 +14,7 @@ class CreatePaymentMethodRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/CreatePlanRequestTest.php b/tests/Message/CreatePlanRequestTest.php index e171be6..0c7aacc 100644 --- a/tests/Message/CreatePlanRequestTest.php +++ b/tests/Message/CreatePlanRequestTest.php @@ -13,7 +13,7 @@ class CreatePlanRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/CreateProductRequestTest.php b/tests/Message/CreateProductRequestTest.php index 1defba7..6bcd676 100644 --- a/tests/Message/CreateProductRequestTest.php +++ b/tests/Message/CreateProductRequestTest.php @@ -13,7 +13,7 @@ class CreateProductRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/CreateSubscriptionRequestTest.php b/tests/Message/CreateSubscriptionRequestTest.php index 19dc2c9..24df0df 100644 --- a/tests/Message/CreateSubscriptionRequestTest.php +++ b/tests/Message/CreateSubscriptionRequestTest.php @@ -13,7 +13,7 @@ class CreateSubscriptionRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { date_default_timezone_set('Europe/London'); $this->faker = new DataFaker(); diff --git a/tests/Message/FetchChargebacksRequestTest.php b/tests/Message/FetchChargebacksRequestTest.php index 6f2c363..6ce2e7f 100644 --- a/tests/Message/FetchChargebacksRequestTest.php +++ b/tests/Message/FetchChargebacksRequestTest.php @@ -11,7 +11,7 @@ class FetchChargebacksRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/FetchCustomerRequestTest.php b/tests/Message/FetchCustomerRequestTest.php index b036956..86a9c3e 100644 --- a/tests/Message/FetchCustomerRequestTest.php +++ b/tests/Message/FetchCustomerRequestTest.php @@ -11,7 +11,7 @@ class FetchCustomerRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/FetchPaymentMethodRequestTest.php b/tests/Message/FetchPaymentMethodRequestTest.php index 7ee1f56..c2b68dc 100644 --- a/tests/Message/FetchPaymentMethodRequestTest.php +++ b/tests/Message/FetchPaymentMethodRequestTest.php @@ -11,7 +11,7 @@ class FetchPaymentMethodRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { date_default_timezone_set('Europe/London'); $this->faker = new DataFaker(); diff --git a/tests/Message/FetchPaymentMethodsRequestTest.php b/tests/Message/FetchPaymentMethodsRequestTest.php index 39c50c4..53b3d16 100644 --- a/tests/Message/FetchPaymentMethodsRequestTest.php +++ b/tests/Message/FetchPaymentMethodsRequestTest.php @@ -11,7 +11,7 @@ class FetchPaymentMethodsRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/FetchPlanRequestTest.php b/tests/Message/FetchPlanRequestTest.php index fee5f81..ea21113 100644 --- a/tests/Message/FetchPlanRequestTest.php +++ b/tests/Message/FetchPlanRequestTest.php @@ -11,7 +11,7 @@ class FetchPlanRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/FetchProductRequestTest.php b/tests/Message/FetchProductRequestTest.php index 74579f2..3594d55 100644 --- a/tests/Message/FetchProductRequestTest.php +++ b/tests/Message/FetchProductRequestTest.php @@ -11,7 +11,7 @@ class FetchProductRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/FetchRefundsRequestTest.php b/tests/Message/FetchRefundsRequestTest.php index 916107b..10e2996 100644 --- a/tests/Message/FetchRefundsRequestTest.php +++ b/tests/Message/FetchRefundsRequestTest.php @@ -11,7 +11,7 @@ class FetchRefundsRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/FetchSubscriptionInvoiceReferencesRequestTest.php b/tests/Message/FetchSubscriptionInvoiceReferencesRequestTest.php index cbb3c38..adc9ad1 100644 --- a/tests/Message/FetchSubscriptionInvoiceReferencesRequestTest.php +++ b/tests/Message/FetchSubscriptionInvoiceReferencesRequestTest.php @@ -11,7 +11,7 @@ class FetchSubscriptionInvoiceReferencesRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/FetchSubscriptionInvoiceRequestTest.php b/tests/Message/FetchSubscriptionInvoiceRequestTest.php index b3c374d..1d57264 100644 --- a/tests/Message/FetchSubscriptionInvoiceRequestTest.php +++ b/tests/Message/FetchSubscriptionInvoiceRequestTest.php @@ -11,7 +11,7 @@ class FetchSubscriptionInvoiceRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/FetchSubscriptionRequestTest.php b/tests/Message/FetchSubscriptionRequestTest.php index 1c3a601..3df3f94 100644 --- a/tests/Message/FetchSubscriptionRequestTest.php +++ b/tests/Message/FetchSubscriptionRequestTest.php @@ -11,7 +11,7 @@ class FetchSubscriptionRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/FetchSubscriptionsRequestTest.php b/tests/Message/FetchSubscriptionsRequestTest.php index 7fcd31d..e2d5c98 100644 --- a/tests/Message/FetchSubscriptionsRequestTest.php +++ b/tests/Message/FetchSubscriptionsRequestTest.php @@ -11,7 +11,7 @@ class FetchSubscriptionsRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/FetchTransactionRequestTest.php b/tests/Message/FetchTransactionRequestTest.php index 09f4eba..bec4aec 100644 --- a/tests/Message/FetchTransactionRequestTest.php +++ b/tests/Message/FetchTransactionRequestTest.php @@ -11,7 +11,7 @@ class FetchTransactionRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/FetchTransactionsRequestTest.php b/tests/Message/FetchTransactionsRequestTest.php index d26cf30..7014065 100644 --- a/tests/Message/FetchTransactionsRequestTest.php +++ b/tests/Message/FetchTransactionsRequestTest.php @@ -11,7 +11,7 @@ class FetchTransactionsRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/HOAAuthorizeRequestTest.php b/tests/Message/HOAAuthorizeRequestTest.php index 06503ca..a763718 100644 --- a/tests/Message/HOAAuthorizeRequestTest.php +++ b/tests/Message/HOAAuthorizeRequestTest.php @@ -14,7 +14,7 @@ class HOAAuthorizeRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/HOACreatePaymentMethodRequestTest.php b/tests/Message/HOACreatePaymentMethodRequestTest.php index 7c9d2bf..4c6886b 100644 --- a/tests/Message/HOACreatePaymentMethodRequestTest.php +++ b/tests/Message/HOACreatePaymentMethodRequestTest.php @@ -13,7 +13,7 @@ class HOACreatePaymentMethodRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/HOACreateSubscriptionRequestTest.php b/tests/Message/HOACreateSubscriptionRequestTest.php index 227d9b5..8ca28d3 100644 --- a/tests/Message/HOACreateSubscriptionRequestTest.php +++ b/tests/Message/HOACreateSubscriptionRequestTest.php @@ -13,7 +13,7 @@ class HOACreateSubscriptionRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/HOAPurchaseRequestTest.php b/tests/Message/HOAPurchaseRequestTest.php index bff8779..b17f74c 100644 --- a/tests/Message/HOAPurchaseRequestTest.php +++ b/tests/Message/HOAPurchaseRequestTest.php @@ -14,7 +14,7 @@ class HOAPurchaseRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/MakePaymentRequestTest.php b/tests/Message/MakePaymentRequestTest.php index 1781fc0..60a8f0d 100644 --- a/tests/Message/MakePaymentRequestTest.php +++ b/tests/Message/MakePaymentRequestTest.php @@ -11,7 +11,7 @@ class MakePaymentRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/PayPalAuthorizeRequestTest.php b/tests/Message/PayPalAuthorizeRequestTest.php index 628b973..26ad1d0 100644 --- a/tests/Message/PayPalAuthorizeRequestTest.php +++ b/tests/Message/PayPalAuthorizeRequestTest.php @@ -16,7 +16,7 @@ class PayPalAuthorizeRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/PayPalPurchaseRequestTest.php b/tests/Message/PayPalPurchaseRequestTest.php index acad6d7..23424f7 100644 --- a/tests/Message/PayPalPurchaseRequestTest.php +++ b/tests/Message/PayPalPurchaseRequestTest.php @@ -15,7 +15,7 @@ class PayPalPurchaseRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); diff --git a/tests/Message/PurchaseRequestTest.php b/tests/Message/PurchaseRequestTest.php index 0617efc..a889d5a 100644 --- a/tests/Message/PurchaseRequestTest.php +++ b/tests/Message/PurchaseRequestTest.php @@ -15,7 +15,7 @@ class PurchaseRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { date_default_timezone_set('Europe/London'); $this->faker = new DataFaker(); diff --git a/tests/Message/RefundRequestTest.php b/tests/Message/RefundRequestTest.php index 07684fe..9fd316e 100644 --- a/tests/Message/RefundRequestTest.php +++ b/tests/Message/RefundRequestTest.php @@ -14,7 +14,7 @@ class RefundRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { date_default_timezone_set('Europe/London'); $this->faker = new DataFaker(); diff --git a/tests/Message/ResponseTest.php b/tests/Message/ResponseTest.php index b85ae43..9d479ca 100644 --- a/tests/Message/ResponseTest.php +++ b/tests/Message/ResponseTest.php @@ -10,7 +10,7 @@ class ResponseTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { date_default_timezone_set('Europe/London'); $this->response = Mocker::mock('\Omnipay\Vindicia\Message\Response')->makePartial(); diff --git a/tests/Message/VoidRequestTest.php b/tests/Message/VoidRequestTest.php index a29f250..bd9b373 100644 --- a/tests/Message/VoidRequestTest.php +++ b/tests/Message/VoidRequestTest.php @@ -11,7 +11,7 @@ class VoidRequestTest extends SoapTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); $this->transactionId = $this->faker->transactionId(); diff --git a/tests/NameValueTest.php b/tests/NameValueTest.php index 5071682..9a80b52 100644 --- a/tests/NameValueTest.php +++ b/tests/NameValueTest.php @@ -11,7 +11,7 @@ class NameValueTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); } diff --git a/tests/NonStrippingCreditCardTest.php b/tests/NonStrippingCreditCardTest.php index b7913d8..edf1225 100644 --- a/tests/NonStrippingCreditCardTest.php +++ b/tests/NonStrippingCreditCardTest.php @@ -10,7 +10,7 @@ class NonStrippingCreditCardTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->card = new NonStrippingCreditCard(); $this->faker = new DataFaker(); diff --git a/tests/PayPalGatewayTest.php b/tests/PayPalGatewayTest.php index 2ddd84f..7521190 100644 --- a/tests/PayPalGatewayTest.php +++ b/tests/PayPalGatewayTest.php @@ -11,7 +11,7 @@ class PayPalGatewayTest extends GatewayTestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->gateway = new PayPalGateway($this->getHttpClient(), $this->getHttpRequest()); $this->gateway->setTestMode(true); diff --git a/tests/PaymentMethodTest.php b/tests/PaymentMethodTest.php index 33f2aa3..0fe70d9 100644 --- a/tests/PaymentMethodTest.php +++ b/tests/PaymentMethodTest.php @@ -12,7 +12,7 @@ class PaymentMethodTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); $this->paymentMethod = new PaymentMethod(); diff --git a/tests/PlanTest.php b/tests/PlanTest.php index 890a5f7..8c2bed0 100644 --- a/tests/PlanTest.php +++ b/tests/PlanTest.php @@ -10,7 +10,7 @@ class PlanTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); $this->plan = new Plan(); diff --git a/tests/PriceBagTest.php b/tests/PriceBagTest.php index dd13d90..2d60b06 100644 --- a/tests/PriceBagTest.php +++ b/tests/PriceBagTest.php @@ -11,7 +11,7 @@ class PriceBagTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->bag = new PriceBag(); $this->faker = new DataFaker(); diff --git a/tests/PriceTest.php b/tests/PriceTest.php index ddaf72c..bd639c1 100644 --- a/tests/PriceTest.php +++ b/tests/PriceTest.php @@ -10,7 +10,7 @@ class PriceTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->price = new Price(); $this->faker = new DataFaker(); diff --git a/tests/ProductTest.php b/tests/ProductTest.php index 1653085..0daba7e 100644 --- a/tests/ProductTest.php +++ b/tests/ProductTest.php @@ -10,7 +10,7 @@ class ProductTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); $this->product = new Product(); diff --git a/tests/RefundTest.php b/tests/RefundTest.php index bd11698..4bc3672 100644 --- a/tests/RefundTest.php +++ b/tests/RefundTest.php @@ -13,7 +13,7 @@ class RefundTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); $this->refund = new Refund(); diff --git a/tests/SubscriptionTest.php b/tests/SubscriptionTest.php index 06297a0..228d910 100644 --- a/tests/SubscriptionTest.php +++ b/tests/SubscriptionTest.php @@ -13,7 +13,7 @@ class SubscriptionTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); $this->subscription = new Subscription(); diff --git a/tests/TaxExemptionBagTest.php b/tests/TaxExemptionBagTest.php index 83b6d80..1f732fa 100644 --- a/tests/TaxExemptionBagTest.php +++ b/tests/TaxExemptionBagTest.php @@ -10,7 +10,7 @@ class TaxExemptionBagTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->bag = new TaxExemptionBag(); $this->faker = new DataFaker(); diff --git a/tests/TaxExemptionTest.php b/tests/TaxExemptionTest.php index 533765c..0086b60 100644 --- a/tests/TaxExemptionTest.php +++ b/tests/TaxExemptionTest.php @@ -10,7 +10,7 @@ class TaxExemptionTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->exemption = new TaxExemption(); $this->faker = new DataFaker(); diff --git a/tests/TestFramework/DataFakerTest.php b/tests/TestFramework/DataFakerTest.php index c1da6bb..9974ef1 100644 --- a/tests/TestFramework/DataFakerTest.php +++ b/tests/TestFramework/DataFakerTest.php @@ -21,7 +21,7 @@ class DataFakerTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { date_default_timezone_set('Europe/London'); $this->faker = new DataFaker(); diff --git a/tests/TransactionStatusTest.php b/tests/TransactionStatusTest.php index dcef8ab..e0c4098 100644 --- a/tests/TransactionStatusTest.php +++ b/tests/TransactionStatusTest.php @@ -10,7 +10,7 @@ class TransactionStatusTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); $this->transactionStatus = new TransactionStatus(); diff --git a/tests/TransactionTest.php b/tests/TransactionTest.php index 6a08db8..01d9961 100644 --- a/tests/TransactionTest.php +++ b/tests/TransactionTest.php @@ -13,7 +13,7 @@ class TransactionTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); $this->transaction = new Transaction(); diff --git a/tests/VindiciaItemBagTest.php b/tests/VindiciaItemBagTest.php index d46f752..867a514 100644 --- a/tests/VindiciaItemBagTest.php +++ b/tests/VindiciaItemBagTest.php @@ -10,7 +10,7 @@ class VindiciaItemBagTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->bag = new VindiciaItemBag(); $this->faker = new DataFaker(); diff --git a/tests/VindiciaItemTest.php b/tests/VindiciaItemTest.php index 8d223ac..db6b02e 100644 --- a/tests/VindiciaItemTest.php +++ b/tests/VindiciaItemTest.php @@ -10,7 +10,7 @@ class VindiciaItemTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); $this->name = $this->faker->randomCharacters( diff --git a/tests/VindiciaRefundItemBagTest.php b/tests/VindiciaRefundItemBagTest.php index 9501c82..1756ca6 100644 --- a/tests/VindiciaRefundItemBagTest.php +++ b/tests/VindiciaRefundItemBagTest.php @@ -10,7 +10,7 @@ class VindiciaRefundItemBagTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->bag = new VindiciaRefundItemBag(); $this->faker = new DataFaker(); diff --git a/tests/VindiciaRefundItemTest.php b/tests/VindiciaRefundItemTest.php index e4e6260..28b87dc 100644 --- a/tests/VindiciaRefundItemTest.php +++ b/tests/VindiciaRefundItemTest.php @@ -10,7 +10,7 @@ class VindiciaRefundItemTest extends TestCase /** * @return void */ - public function setUp() + public function setUp(): void { $this->faker = new DataFaker(); $this->sku = $this->faker->randomCharacters( From d769ad67fc674f8c373ec5c268fa004465f29d40 Mon Sep 17 00:00:00 2001 From: Melech Mizrachi Date: Mon, 10 Jun 2024 09:51:48 -0700 Subject: [PATCH 5/7] Update `http-interop/http-factory-guzzle` to ^1.1 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9294d97..30c2a35 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "vimeo/payment-gateway-logger": "^1.1.1" }, "require-dev": { - "http-interop/http-factory-guzzle": "^1.2", + "http-interop/http-factory-guzzle": "^1.1", "omnipay/tests": "^4.0" }, "config": { From 4b9fbf3a8c77167ed75ff0602bb1d64cc2399005 Mon Sep 17 00:00:00 2001 From: Melech Mizrachi Date: Mon, 10 Jun 2024 09:59:52 -0700 Subject: [PATCH 6/7] Update AbstractRequest::validate to match signature of parent method. --- src/Message/AbstractRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Message/AbstractRequest.php b/src/Message/AbstractRequest.php index 50b21bc..d63bdd3 100644 --- a/src/Message/AbstractRequest.php +++ b/src/Message/AbstractRequest.php @@ -1332,7 +1332,7 @@ abstract public function getData(); * @return bool * @psalm-variadic */ - public function validate() + public function validate(...$args) { return call_user_func_array('parent::validate', func_get_args()); } From b4101713dc53d7f2a2f70a87bd61cce2912c0301 Mon Sep 17 00:00:00 2001 From: Melech Mizrachi Date: Mon, 10 Jun 2024 16:38:42 -0700 Subject: [PATCH 7/7] Update dependencies. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 30c2a35..bb6c3c8 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "omnipay/common": "^3.0", "php-http/guzzle7-adapter": "^1.0.0", "symfony/event-dispatcher": ">=2.1", - "vimeo/payment-gateway-logger": "^1.1.1" + "vimeo/payment-gateway-logger": "dev-update-dependencies" }, "require-dev": { "http-interop/http-factory-guzzle": "^1.1",