diff --git a/UPGRADE.md b/UPGRADE.md index 9ce27408..96868b4f 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,8 +1,8 @@ -### UPGRADE FROM 1.6.1 to 1.6.2 +### UPGRADE FROM 1.6.0 to 1.6.1 1. The following constructor signatures have been changed: - `Sylius\PayPalPlugin\Controller\CreatePayPalOrderFromCartAction`: + `Sylius\PayPalPlugin\Controller\CreatePayPalOrderFromCartAction`: ```diff public function __construct( private readonly ?Payum $payum, @@ -16,23 +16,7 @@ ) ``` -### UPGRADE FROM 1.6.0 to 1.6.1 - -1. The following constructor signatures have been changed: - - `Sylius\PayPalPlugin\Controller\UpdatePayPalOrderAction`: - ```diff - public function __construct( - private readonly PaymentProviderInterface $paymentProvider, - private readonly CacheAuthorizeClientApiInterface $authorizeClientApi, - - private readonly OrderDetailsApiInterface $orderDetailsApi, - private readonly UpdateOrderApiInterface $updateOrderApi, - private readonly AddressFactoryInterface $addressFactory, - private readonly OrderProcessorInterface $orderProcessor, - ) - ``` - - `Sylius\PayPalPlugin\Model\PayPalPurchaseUnit`: + `Sylius\PayPalPlugin\Model\PayPalPurchaseUnit`: ```diff public function __construct( private readonly string $referenceId, @@ -52,22 +36,6 @@ ) ``` - `Sylius\PayPalPlugin\Controller\ProcessPayPalOrderAction`: - ```diff - public function __construct( - - private readonly OrderRepositoryInterface $orderRepository, - private readonly CustomerRepositoryInterface $customerRepository, - private readonly FactoryInterface $customerFactory, - private readonly AddressFactoryInterface $addressFactory, - private readonly ObjectManager $orderManager, - private readonly StateMachineFactoryInterface|StateMachineInterface $stateMachineFactory, - private readonly PaymentStateManagerInterface $paymentStateManager, - private readonly CacheAuthorizeClientApiInterface $authorizeClientApi, - private readonly OrderDetailsApiInterface $orderDetailsApi, - private readonly OrderProviderInterface $orderProvider, - ) - ``` - ### UPGRADE FROM 1.5.1 to 1.6.0 1. Support for Sylius 1.13 has been added, it is now the recommended Sylius version to use. diff --git a/src/Controller/ProcessPayPalOrderAction.php b/src/Controller/ProcessPayPalOrderAction.php index 228276b3..1945fa88 100644 --- a/src/Controller/ProcessPayPalOrderAction.php +++ b/src/Controller/ProcessPayPalOrderAction.php @@ -23,6 +23,7 @@ use Sylius\Component\Core\Model\PaymentMethodInterface; use Sylius\Component\Core\OrderCheckoutTransitions; use Sylius\Component\Core\Repository\CustomerRepositoryInterface; +use Sylius\Component\Core\Repository\OrderRepositoryInterface; use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\PayPalPlugin\Api\CacheAuthorizeClientApiInterface; use Sylius\PayPalPlugin\Api\OrderDetailsApiInterface; @@ -35,6 +36,7 @@ final class ProcessPayPalOrderAction { public function __construct( + private readonly OrderRepositoryInterface $orderRepository, private readonly CustomerRepositoryInterface $customerRepository, private readonly FactoryInterface $customerFactory, private readonly AddressFactoryInterface $addressFactory, diff --git a/src/Controller/UpdatePayPalOrderAction.php b/src/Controller/UpdatePayPalOrderAction.php index d13c7fd2..b8c41bf4 100644 --- a/src/Controller/UpdatePayPalOrderAction.php +++ b/src/Controller/UpdatePayPalOrderAction.php @@ -20,6 +20,7 @@ use Sylius\Component\Core\Model\PaymentMethodInterface; use Sylius\Component\Order\Processor\OrderProcessorInterface; use Sylius\PayPalPlugin\Api\CacheAuthorizeClientApiInterface; +use Sylius\PayPalPlugin\Api\OrderDetailsApiInterface; use Sylius\PayPalPlugin\Api\UpdateOrderApiInterface; use Sylius\PayPalPlugin\Provider\PaymentProviderInterface; use Symfony\Component\HttpFoundation\JsonResponse; @@ -31,6 +32,7 @@ final class UpdatePayPalOrderAction public function __construct( private readonly PaymentProviderInterface $paymentProvider, private readonly CacheAuthorizeClientApiInterface $authorizeClientApi, + private readonly OrderDetailsApiInterface $orderDetailsApi, private readonly UpdateOrderApiInterface $updateOrderApi, private readonly AddressFactoryInterface $addressFactory, private readonly OrderProcessorInterface $orderProcessor, diff --git a/src/Resources/config/services/controller.xml b/src/Resources/config/services/controller.xml index 61b48f17..fe4d94ff 100644 --- a/src/Resources/config/services/controller.xml +++ b/src/Resources/config/services/controller.xml @@ -119,6 +119,7 @@ +