Skip to content

Commit a3159f7

Browse files
authored
Revert BC break changes (#343)
| Q | A | --------------- | ----- | Branch? | 1.6 | Bug fix? | yes | New feature? | no | Related tickets |
2 parents 9e97a9b + 5af1fa9 commit a3159f7

File tree

4 files changed

+8
-35
lines changed

4 files changed

+8
-35
lines changed

UPGRADE.md

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
### UPGRADE FROM 1.6.1 to 1.6.2
1+
### UPGRADE FROM 1.6.0 to 1.6.1
22

33
1. The following constructor signatures have been changed:
44

5-
`Sylius\PayPalPlugin\Controller\CreatePayPalOrderFromCartAction`:
5+
`Sylius\PayPalPlugin\Controller\CreatePayPalOrderFromCartAction`:
66
```diff
77
public function __construct(
88
private readonly ?Payum $payum,
@@ -16,23 +16,7 @@
1616
)
1717
```
1818

19-
### UPGRADE FROM 1.6.0 to 1.6.1
20-
21-
1. The following constructor signatures have been changed:
22-
23-
`Sylius\PayPalPlugin\Controller\UpdatePayPalOrderAction`:
24-
```diff
25-
public function __construct(
26-
private readonly PaymentProviderInterface $paymentProvider,
27-
private readonly CacheAuthorizeClientApiInterface $authorizeClientApi,
28-
- private readonly OrderDetailsApiInterface $orderDetailsApi,
29-
private readonly UpdateOrderApiInterface $updateOrderApi,
30-
private readonly AddressFactoryInterface $addressFactory,
31-
private readonly OrderProcessorInterface $orderProcessor,
32-
)
33-
```
34-
35-
`Sylius\PayPalPlugin\Model\PayPalPurchaseUnit`:
19+
`Sylius\PayPalPlugin\Model\PayPalPurchaseUnit`:
3620
```diff
3721
public function __construct(
3822
private readonly string $referenceId,
@@ -52,22 +36,6 @@
5236
)
5337
```
5438

55-
`Sylius\PayPalPlugin\Controller\ProcessPayPalOrderAction`:
56-
```diff
57-
public function __construct(
58-
- private readonly OrderRepositoryInterface $orderRepository,
59-
private readonly CustomerRepositoryInterface $customerRepository,
60-
private readonly FactoryInterface $customerFactory,
61-
private readonly AddressFactoryInterface $addressFactory,
62-
private readonly ObjectManager $orderManager,
63-
private readonly StateMachineFactoryInterface|StateMachineInterface $stateMachineFactory,
64-
private readonly PaymentStateManagerInterface $paymentStateManager,
65-
private readonly CacheAuthorizeClientApiInterface $authorizeClientApi,
66-
private readonly OrderDetailsApiInterface $orderDetailsApi,
67-
private readonly OrderProviderInterface $orderProvider,
68-
)
69-
```
70-
7139
### UPGRADE FROM 1.5.1 to 1.6.0
7240

7341
1. Support for Sylius 1.13 has been added, it is now the recommended Sylius version to use.

src/Controller/ProcessPayPalOrderAction.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use Sylius\Component\Core\Model\PaymentMethodInterface;
2424
use Sylius\Component\Core\OrderCheckoutTransitions;
2525
use Sylius\Component\Core\Repository\CustomerRepositoryInterface;
26+
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
2627
use Sylius\Component\Resource\Factory\FactoryInterface;
2728
use Sylius\PayPalPlugin\Api\CacheAuthorizeClientApiInterface;
2829
use Sylius\PayPalPlugin\Api\OrderDetailsApiInterface;
@@ -35,6 +36,7 @@
3536
final class ProcessPayPalOrderAction
3637
{
3738
public function __construct(
39+
private readonly OrderRepositoryInterface $orderRepository,
3840
private readonly CustomerRepositoryInterface $customerRepository,
3941
private readonly FactoryInterface $customerFactory,
4042
private readonly AddressFactoryInterface $addressFactory,

src/Controller/UpdatePayPalOrderAction.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use Sylius\Component\Core\Model\PaymentMethodInterface;
2121
use Sylius\Component\Order\Processor\OrderProcessorInterface;
2222
use Sylius\PayPalPlugin\Api\CacheAuthorizeClientApiInterface;
23+
use Sylius\PayPalPlugin\Api\OrderDetailsApiInterface;
2324
use Sylius\PayPalPlugin\Api\UpdateOrderApiInterface;
2425
use Sylius\PayPalPlugin\Provider\PaymentProviderInterface;
2526
use Symfony\Component\HttpFoundation\JsonResponse;
@@ -31,6 +32,7 @@ final class UpdatePayPalOrderAction
3132
public function __construct(
3233
private readonly PaymentProviderInterface $paymentProvider,
3334
private readonly CacheAuthorizeClientApiInterface $authorizeClientApi,
35+
private readonly OrderDetailsApiInterface $orderDetailsApi,
3436
private readonly UpdateOrderApiInterface $updateOrderApi,
3537
private readonly AddressFactoryInterface $addressFactory,
3638
private readonly OrderProcessorInterface $orderProcessor,

src/Resources/config/services/controller.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
<service id="Sylius\PayPalPlugin\Controller\UpdatePayPalOrderAction">
120120
<argument type="service" id="Sylius\PayPalPlugin\Provider\PaymentProviderInterface" />
121121
<argument type="service" id="Sylius\PayPalPlugin\Api\CacheAuthorizeClientApiInterface" />
122+
<argument type="service" id="Sylius\PayPalPlugin\Api\OrderDetailsApiInterface" />
122123
<argument type="service" id="Sylius\PayPalPlugin\Api\UpdateOrderApiInterface" />
123124
<argument type="service" id="sylius.factory.address" />
124125
<argument type="service" id="sylius.order_processing.order_processor" />

0 commit comments

Comments
 (0)