From f12ff2e7a21e6b1db0ffc23effeeb162adf38f9c Mon Sep 17 00:00:00 2001 From: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> Date: Wed, 2 Aug 2023 14:10:27 +0000 Subject: [PATCH 1/3] move deprecation annotations to class level --- src/Adyen/Service/Account.php | 4 ++++ src/Adyen/Service/BinLookup.php | 4 +++- src/Adyen/Service/Checkout.php | 4 +++- src/Adyen/Service/CheckoutUtility.php | 4 +++- src/Adyen/Service/DisputeService.php | 3 +++ src/Adyen/Service/Fund.php | 4 ++++ src/Adyen/Service/Hop.php | 4 ++++ src/Adyen/Service/Management.php | 4 +++- src/Adyen/Service/Modification.php | 4 +++- src/Adyen/Service/Notification.php | 4 ++++ src/Adyen/Service/Payment.php | 4 +++- src/Adyen/Service/Payout.php | 4 +++- src/Adyen/Service/Recurring.php | 4 +++- src/Adyen/Service/RiskManagement.php | 3 +++ 14 files changed, 46 insertions(+), 8 deletions(-) diff --git a/src/Adyen/Service/Account.php b/src/Adyen/Service/Account.php index 3803c4d54..a7307c1bf 100755 --- a/src/Adyen/Service/Account.php +++ b/src/Adyen/Service/Account.php @@ -2,6 +2,9 @@ namespace Adyen\Service; +/** + * @deprecated Please consider using the BalancePlatform services instead + */ class Account extends \Adyen\Service { /** @@ -86,6 +89,7 @@ class Account extends \Adyen\Service /** * Account constructor. + * * @param \Adyen\Client $client * @throws \Adyen\AdyenException */ diff --git a/src/Adyen/Service/BinLookup.php b/src/Adyen/Service/BinLookup.php index 0cb19795a..017124010 100644 --- a/src/Adyen/Service/BinLookup.php +++ b/src/Adyen/Service/BinLookup.php @@ -2,6 +2,9 @@ namespace Adyen\Service; +/** + * @deprecated Please consider using the model based services instead (suffix -Api.php) + */ class BinLookup extends \Adyen\Service { /** @@ -17,7 +20,6 @@ class BinLookup extends \Adyen\Service /** * BinLookup constructor. * - * @deprecated Please consider using the model based services instead (suffix -Api.php) * @param \Adyen\Client $client * @throws \Adyen\AdyenException */ diff --git a/src/Adyen/Service/Checkout.php b/src/Adyen/Service/Checkout.php index 0004a4024..76f4bcff0 100644 --- a/src/Adyen/Service/Checkout.php +++ b/src/Adyen/Service/Checkout.php @@ -4,6 +4,9 @@ use Adyen\Service\ResourceModel\Checkout\Recurring; +/** + * @deprecated Please consider using the model based services instead (suffix -Api.php) + */ class Checkout extends \Adyen\ApiKeyAuthenticatedService { /** @@ -101,7 +104,6 @@ class Checkout extends \Adyen\ApiKeyAuthenticatedService /** * Checkout constructor. * - * @deprecated Please consider using the model based services instead (suffix -Api.php) * @param \Adyen\Client $client * @throws \Adyen\AdyenException */ diff --git a/src/Adyen/Service/CheckoutUtility.php b/src/Adyen/Service/CheckoutUtility.php index 05444247d..216889c6c 100644 --- a/src/Adyen/Service/CheckoutUtility.php +++ b/src/Adyen/Service/CheckoutUtility.php @@ -2,6 +2,9 @@ namespace Adyen\Service; +/** + * @deprecated Please consider using the model based services instead (suffix -Api.php) + */ class CheckoutUtility extends \Adyen\ApiKeyAuthenticatedService { /** @@ -12,7 +15,6 @@ class CheckoutUtility extends \Adyen\ApiKeyAuthenticatedService /** * CheckoutUtility constructor. * - * @deprecated Please consider using the model based services instead (suffix -Api.php) * @param \Adyen\Client $client * @throws \Adyen\AdyenException */ diff --git a/src/Adyen/Service/DisputeService.php b/src/Adyen/Service/DisputeService.php index 3f2b19e7b..80fa5f376 100644 --- a/src/Adyen/Service/DisputeService.php +++ b/src/Adyen/Service/DisputeService.php @@ -7,6 +7,9 @@ use Adyen\Service\ResourceModel\DisputeService\RetrieveApplicableDefenseReasons; use Adyen\Service\ResourceModel\DisputeService\SupplyDefenseDocument; +/** + * @deprecated Please consider using the model based services instead (suffix -Api.php) + */ class DisputeService extends \Adyen\Service { /** diff --git a/src/Adyen/Service/Fund.php b/src/Adyen/Service/Fund.php index 649b735f1..675bd5a7c 100755 --- a/src/Adyen/Service/Fund.php +++ b/src/Adyen/Service/Fund.php @@ -2,6 +2,9 @@ namespace Adyen\Service; +/** + * @deprecated Please consider using the Transfers services instead + */ class Fund extends \Adyen\Service { @@ -37,6 +40,7 @@ class Fund extends \Adyen\Service /** * Fund constructor. + * * @param \Adyen\Client $client * @throws \Adyen\AdyenException */ diff --git a/src/Adyen/Service/Hop.php b/src/Adyen/Service/Hop.php index 24c969d9e..a056cb8bf 100644 --- a/src/Adyen/Service/Hop.php +++ b/src/Adyen/Service/Hop.php @@ -2,6 +2,9 @@ namespace Adyen\Service; +/** + * @deprecated Please consider using the LegalEntityManagement services instead + */ class Hop extends \Adyen\Service { /** @@ -16,6 +19,7 @@ class Hop extends \Adyen\Service /** * Hop constructor. + * * @param \Adyen\Client $client * @throws \Adyen\AdyenException */ diff --git a/src/Adyen/Service/Management.php b/src/Adyen/Service/Management.php index c414f633d..998b67a36 100644 --- a/src/Adyen/Service/Management.php +++ b/src/Adyen/Service/Management.php @@ -11,6 +11,9 @@ use Adyen\Service\ResourceModel\Management\MerchantClientKey; use Adyen\Service\ResourceModel\Management\MerchantWebhooks; +/** + * @deprecated Please consider using the model based services instead (suffix -Api.php) + */ class Management extends \Adyen\Service { /** @@ -52,7 +55,6 @@ class Management extends \Adyen\Service /** * Management constructor. * - * @deprecated Please consider using the model based services instead (suffix -Api.php) * @param \Adyen\Client $client * @throws \Adyen\AdyenException */ diff --git a/src/Adyen/Service/Modification.php b/src/Adyen/Service/Modification.php index 0f4969e06..7439b8820 100644 --- a/src/Adyen/Service/Modification.php +++ b/src/Adyen/Service/Modification.php @@ -2,6 +2,9 @@ namespace Adyen\Service; +/** + * @deprecated Please consider using the model based services instead (suffix -Api.php) + */ class Modification extends \Adyen\Service { /** @@ -37,7 +40,6 @@ class Modification extends \Adyen\Service /** * Modification constructor. * - * @deprecated Please consider using the model based services instead (suffix -Api.php) * @param \Adyen\Client $client * @throws \Adyen\AdyenException */ diff --git a/src/Adyen/Service/Notification.php b/src/Adyen/Service/Notification.php index 00c3b0088..94f82f0c7 100644 --- a/src/Adyen/Service/Notification.php +++ b/src/Adyen/Service/Notification.php @@ -12,6 +12,9 @@ use Adyen\Service\ResourceModel\Notification\TestNotificationConfiguration; use Adyen\Service\ResourceModel\Notification\UpdateNotificationConfiguration; +/** + * @deprecated Please consider using the model based services instead (suffix -Api.php) + */ class Notification extends Service { @@ -47,6 +50,7 @@ class Notification extends Service /** * Notification constructor. + * * @param Client $client * @throws AdyenException */ diff --git a/src/Adyen/Service/Payment.php b/src/Adyen/Service/Payment.php index 35ae11a94..6820256aa 100644 --- a/src/Adyen/Service/Payment.php +++ b/src/Adyen/Service/Payment.php @@ -2,6 +2,9 @@ namespace Adyen\Service; +/** + * @deprecated Please consider using the model based services instead (suffix -Api.php) + */ class Payment extends \Adyen\Service { /** @@ -22,7 +25,6 @@ class Payment extends \Adyen\Service /** * Payment constructor. * - * @deprecated Please consider using the model based services instead (suffix -Api.php) * @param \Adyen\Client $client * @throws \Adyen\AdyenException */ diff --git a/src/Adyen/Service/Payout.php b/src/Adyen/Service/Payout.php index ffd948f7c..207a7e7b6 100644 --- a/src/Adyen/Service/Payout.php +++ b/src/Adyen/Service/Payout.php @@ -15,6 +15,9 @@ use Adyen\Service\ResourceModel\Payout\ThirdParty\StoreDetailsAndSubmitThirdParty; use Adyen\Service\ResourceModel\Payout\ThirdParty\SubmitThirdParty; +/** + * @deprecated Please consider using the model based services instead (suffix -Api.php) + */ class Payout extends Service { /** @@ -65,7 +68,6 @@ class Payout extends Service /** * Payout constructor. * - * @deprecated Please consider using the model based services instead (suffix -Api.php) * @param Client $client * @throws AdyenException */ diff --git a/src/Adyen/Service/Recurring.php b/src/Adyen/Service/Recurring.php index 46b5825fa..6883f242a 100644 --- a/src/Adyen/Service/Recurring.php +++ b/src/Adyen/Service/Recurring.php @@ -2,6 +2,9 @@ namespace Adyen\Service; +/** + * @deprecated Please consider using the model based services instead (suffix -Api.php) + */ class Recurring extends \Adyen\Service { /** @@ -27,7 +30,6 @@ class Recurring extends \Adyen\Service /** * Recurring constructor. * - * @deprecated Please consider using the model based services instead (suffix -Api.php) * @param \Adyen\Client $client * @throws \Adyen\AdyenException */ diff --git a/src/Adyen/Service/RiskManagement.php b/src/Adyen/Service/RiskManagement.php index 4bda6da56..2aed0eaa9 100644 --- a/src/Adyen/Service/RiskManagement.php +++ b/src/Adyen/Service/RiskManagement.php @@ -2,6 +2,9 @@ namespace Adyen\Service; +/** + * @deprecated + */ class RiskManagement extends \Adyen\Service { /** From 21f8b203003f1b0bc623e027da57d56cf25c0a23 Mon Sep 17 00:00:00 2001 From: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> Date: Thu, 3 Aug 2023 07:27:44 +0000 Subject: [PATCH 2/3] remove whitespaces --- src/Adyen/Service/Account.php | 3 ++- src/Adyen/Service/Fund.php | 2 +- src/Adyen/Service/Hop.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Adyen/Service/Account.php b/src/Adyen/Service/Account.php index a7307c1bf..9e96de1a3 100755 --- a/src/Adyen/Service/Account.php +++ b/src/Adyen/Service/Account.php @@ -4,6 +4,7 @@ /** * @deprecated Please consider using the BalancePlatform services instead + * @see Adyen\Service\BalancePlatform\AccountHoldersApi */ class Account extends \Adyen\Service { @@ -89,7 +90,7 @@ class Account extends \Adyen\Service /** * Account constructor. - * + * * @param \Adyen\Client $client * @throws \Adyen\AdyenException */ diff --git a/src/Adyen/Service/Fund.php b/src/Adyen/Service/Fund.php index 675bd5a7c..b36bbd99d 100755 --- a/src/Adyen/Service/Fund.php +++ b/src/Adyen/Service/Fund.php @@ -40,7 +40,7 @@ class Fund extends \Adyen\Service /** * Fund constructor. - * + * * @param \Adyen\Client $client * @throws \Adyen\AdyenException */ diff --git a/src/Adyen/Service/Hop.php b/src/Adyen/Service/Hop.php index a056cb8bf..ba07bbcb9 100644 --- a/src/Adyen/Service/Hop.php +++ b/src/Adyen/Service/Hop.php @@ -19,7 +19,7 @@ class Hop extends \Adyen\Service /** * Hop constructor. - * + * * @param \Adyen\Client $client * @throws \Adyen\AdyenException */ From f8c60ed4dda175f678c16b44d771013280e49fe1 Mon Sep 17 00:00:00 2001 From: Wouter Boereboom Date: Thu, 3 Aug 2023 11:22:39 +0200 Subject: [PATCH 3/3] add reference to new classes in deprecation warnings --- src/Adyen/Service/Account.php | 5 +++-- src/Adyen/Service/BinLookup.php | 1 + src/Adyen/Service/Checkout.php | 1 + src/Adyen/Service/CheckoutUtility.php | 1 + src/Adyen/Service/DisputeService.php | 3 --- src/Adyen/Service/Fund.php | 4 +++- src/Adyen/Service/Hop.php | 1 + src/Adyen/Service/Management.php | 1 + src/Adyen/Service/Modification.php | 1 + src/Adyen/Service/Notification.php | 2 ++ src/Adyen/Service/Payment.php | 1 + src/Adyen/Service/Payout.php | 1 + src/Adyen/Service/Recurring.php | 1 + 13 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/Adyen/Service/Account.php b/src/Adyen/Service/Account.php index 9e96de1a3..fdae84fb5 100755 --- a/src/Adyen/Service/Account.php +++ b/src/Adyen/Service/Account.php @@ -3,8 +3,9 @@ namespace Adyen\Service; /** - * @deprecated Please consider using the BalancePlatform services instead - * @see Adyen\Service\BalancePlatform\AccountHoldersApi + * @deprecated Please consider using the BalancePlatform and LegalEntityManagement services instead + * @see \Adyen\Service\BalancePlatform\ + * @see \Adyen\Service\LegalEntityManagement\ */ class Account extends \Adyen\Service { diff --git a/src/Adyen/Service/BinLookup.php b/src/Adyen/Service/BinLookup.php index 017124010..9d591a15f 100644 --- a/src/Adyen/Service/BinLookup.php +++ b/src/Adyen/Service/BinLookup.php @@ -4,6 +4,7 @@ /** * @deprecated Please consider using the model based services instead (suffix -Api.php) + * @see \Adyen\Service\BinLookupApi */ class BinLookup extends \Adyen\Service { diff --git a/src/Adyen/Service/Checkout.php b/src/Adyen/Service/Checkout.php index 76f4bcff0..98ad5e99f 100644 --- a/src/Adyen/Service/Checkout.php +++ b/src/Adyen/Service/Checkout.php @@ -6,6 +6,7 @@ /** * @deprecated Please consider using the model based services instead (suffix -Api.php) + * @see \Adyen\Service\Checkout\ */ class Checkout extends \Adyen\ApiKeyAuthenticatedService { diff --git a/src/Adyen/Service/CheckoutUtility.php b/src/Adyen/Service/CheckoutUtility.php index 216889c6c..475099514 100644 --- a/src/Adyen/Service/CheckoutUtility.php +++ b/src/Adyen/Service/CheckoutUtility.php @@ -4,6 +4,7 @@ /** * @deprecated Please consider using the model based services instead (suffix -Api.php) + * @see \Adyen\Service\Checkout\UtilityApi */ class CheckoutUtility extends \Adyen\ApiKeyAuthenticatedService { diff --git a/src/Adyen/Service/DisputeService.php b/src/Adyen/Service/DisputeService.php index 80fa5f376..3f2b19e7b 100644 --- a/src/Adyen/Service/DisputeService.php +++ b/src/Adyen/Service/DisputeService.php @@ -7,9 +7,6 @@ use Adyen\Service\ResourceModel\DisputeService\RetrieveApplicableDefenseReasons; use Adyen\Service\ResourceModel\DisputeService\SupplyDefenseDocument; -/** - * @deprecated Please consider using the model based services instead (suffix -Api.php) - */ class DisputeService extends \Adyen\Service { /** diff --git a/src/Adyen/Service/Fund.php b/src/Adyen/Service/Fund.php index b36bbd99d..686cd619e 100755 --- a/src/Adyen/Service/Fund.php +++ b/src/Adyen/Service/Fund.php @@ -3,7 +3,9 @@ namespace Adyen\Service; /** - * @deprecated Please consider using the Transfers services instead + * @deprecated Please consider using the BalancePlatform and Transfers services instead + * @see \Adyen\Service\BalancePlatform\ + * @see \Adyen\Service\Transfers\ */ class Fund extends \Adyen\Service { diff --git a/src/Adyen/Service/Hop.php b/src/Adyen/Service/Hop.php index ba07bbcb9..0cd2a17a4 100644 --- a/src/Adyen/Service/Hop.php +++ b/src/Adyen/Service/Hop.php @@ -4,6 +4,7 @@ /** * @deprecated Please consider using the LegalEntityManagement services instead + * @see \Adyen\Service\LegalEntityManagement\ */ class Hop extends \Adyen\Service { diff --git a/src/Adyen/Service/Management.php b/src/Adyen/Service/Management.php index 998b67a36..fd55f2e6f 100644 --- a/src/Adyen/Service/Management.php +++ b/src/Adyen/Service/Management.php @@ -13,6 +13,7 @@ /** * @deprecated Please consider using the model based services instead (suffix -Api.php) + * @see \Adyen\Service\Management\ */ class Management extends \Adyen\Service { diff --git a/src/Adyen/Service/Modification.php b/src/Adyen/Service/Modification.php index 7439b8820..3346bb75f 100644 --- a/src/Adyen/Service/Modification.php +++ b/src/Adyen/Service/Modification.php @@ -4,6 +4,7 @@ /** * @deprecated Please consider using the model based services instead (suffix -Api.php) + * @see \Adyen\Service\Payments\ModificationsApi */ class Modification extends \Adyen\Service { diff --git a/src/Adyen/Service/Notification.php b/src/Adyen/Service/Notification.php index 94f82f0c7..e2d11ba80 100644 --- a/src/Adyen/Service/Notification.php +++ b/src/Adyen/Service/Notification.php @@ -14,6 +14,8 @@ /** * @deprecated Please consider using the model based services instead (suffix -Api.php) + * @see \Adyen\Service\BalancePlatform\ + * @see \Adyen\Service\Transfers\ */ class Notification extends Service { diff --git a/src/Adyen/Service/Payment.php b/src/Adyen/Service/Payment.php index 6820256aa..fff3d2ff2 100644 --- a/src/Adyen/Service/Payment.php +++ b/src/Adyen/Service/Payment.php @@ -4,6 +4,7 @@ /** * @deprecated Please consider using the model based services instead (suffix -Api.php) + * @see \Adyen\Service\Payments\GeneralApi */ class Payment extends \Adyen\Service { diff --git a/src/Adyen/Service/Payout.php b/src/Adyen/Service/Payout.php index 207a7e7b6..89c034a6e 100644 --- a/src/Adyen/Service/Payout.php +++ b/src/Adyen/Service/Payout.php @@ -17,6 +17,7 @@ /** * @deprecated Please consider using the model based services instead (suffix -Api.php) + * @see \Adyen\Service\Payout\ */ class Payout extends Service { diff --git a/src/Adyen/Service/Recurring.php b/src/Adyen/Service/Recurring.php index 6883f242a..60215f643 100644 --- a/src/Adyen/Service/Recurring.php +++ b/src/Adyen/Service/Recurring.php @@ -4,6 +4,7 @@ /** * @deprecated Please consider using the model based services instead (suffix -Api.php) + * @see \Adyen\Service\RecurringApi */ class Recurring extends \Adyen\Service {