Skip to content

Commit 4b1347a

Browse files
authored
[UPMERGE] 1.6 -> 1.7 (Sylius#351)
This PR has been generated automatically. For more details see [upmerge_pr.yaml](/Sylius/PayPalPlugin/blob/1.7/.github/workflows/upmerge_pr.yaml). **Remember!** The upmerge should always be merged with using `Merge pull request` button. In case of conflicts, please resolve them manually with usign the following commands: ``` git fetch upstream gh pr checkout <this-pr-number> git merge upstream/1.7 -m "Resolve conflicts between 1.6 and 1.7" ``` If you use other name for the upstream remote, please replace `upstream` with the name of your remote pointing to the `Sylius/PayPalPlugin` repository. Once the conflicts are resolved, please run `git merge --continue` and push the changes to this PR.
2 parents d88f436 + 0b75505 commit 4b1347a

File tree

3 files changed

+38
-38
lines changed

3 files changed

+38
-38
lines changed

UPGRADE.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -240,34 +240,34 @@ public function __construct(
240240
```
241241

242242
`Sylius\PayPalPlugin\Controller\ProcessPayPalOrderAction`:
243-
```diff
244-
public function __construct(
245-
private readonly OrderRepositoryInterface $orderRepository,
246-
private readonly CustomerRepositoryInterface $customerRepository,
247-
private readonly FactoryInterface $customerFactory,
248-
private readonly AddressFactoryInterface $addressFactory,
249-
private readonly ObjectManager $orderManager,
250-
private readonly StateMachineFactoryInterface|StateMachineInterface $stateMachineFactory,
251-
private readonly PaymentStateManagerInterface $paymentStateManager,
252-
private readonly CacheAuthorizeClientApiInterface $authorizeClientApi,
253-
private readonly OrderDetailsApiInterface $orderDetailsApi,
254-
private readonly OrderProviderInterface $orderProvider,
255-
+ private readonly ?PaymentAmountVerifierInterface $paymentAmountVerifier = null,
256-
)
257-
```
258-
243+
```diff
244+
public function __construct(
245+
private readonly OrderRepositoryInterface $orderRepository,
246+
private readonly CustomerRepositoryInterface $customerRepository,
247+
private readonly FactoryInterface $customerFactory,
248+
private readonly AddressFactoryInterface $addressFactory,
249+
private readonly ObjectManager $orderManager,
250+
private readonly StateMachineFactoryInterface|StateMachineInterface $stateMachineFactory,
251+
private readonly PaymentStateManagerInterface $paymentStateManager,
252+
private readonly CacheAuthorizeClientApiInterface $authorizeClientApi,
253+
private readonly OrderDetailsApiInterface $orderDetailsApi,
254+
private readonly OrderProviderInterface $orderProvider,
255+
+ private readonly ?PaymentAmountVerifierInterface $paymentAmountVerifier = null,
256+
)
257+
```
258+
259259
`Sylius\PayPalPlugin\Controller\CompletePayPalOrderFromPaymentPageAction`:
260-
```diff
261-
public function __construct(
262-
private readonly PaymentStateManagerInterface $paymentStateManager,
263-
private readonly UrlGeneratorInterface $router,
264-
private readonly OrderProviderInterface $orderProvider,
265-
private readonly FactoryInterface|StateMachineInterface $stateMachine,
266-
private readonly ObjectManager $orderManager,
267-
+ private readonly ?PaymentAmountVerifierInterface $paymentAmountVerifier = null,
268-
+ private readonly ?OrderProcessorInterface $orderProcessor = null,
269-
)
270-
```
260+
```diff
261+
public function __construct(
262+
private readonly PaymentStateManagerInterface $paymentStateManager,
263+
private readonly UrlGeneratorInterface $router,
264+
private readonly OrderProviderInterface $orderProvider,
265+
private readonly FactoryInterface|StateMachineInterface $stateMachine,
266+
private readonly ObjectManager $orderManager,
267+
+ private readonly ?PaymentAmountVerifierInterface $paymentAmountVerifier = null,
268+
+ private readonly ?OrderProcessorInterface $orderProcessor = null,
269+
)
270+
```
271271

272272
### UPGRADE FROM 1.5.1 to 1.6.0
273273

src/Controller/ProcessPayPalOrderAction.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,6 @@ public function __construct(
6161
),
6262
);
6363
}
64-
if (null !== $this->orderRepository) {
65-
trigger_deprecation(
66-
'sylius/paypal-plugin',
67-
'1.7',
68-
sprintf(
69-
'Passing an instance of "%s" as the first argument is deprecated and will be prohibited in 2.0',
70-
OrderRepositoryInterface::class,
71-
),
72-
);
73-
}
7464
if (null === $this->paymentAmountVerifier) {
7565
trigger_deprecation(
7666
'sylius/paypal-plugin',
@@ -81,6 +71,16 @@ public function __construct(
8171
),
8272
);
8373
}
74+
if (null !== $this->orderRepository) {
75+
trigger_deprecation(
76+
'sylius/paypal-plugin',
77+
'1.7',
78+
sprintf(
79+
'Passing an instance of "%s" as the first argument is deprecated and will be prohibited in 2.0',
80+
OrderRepositoryInterface::class,
81+
),
82+
);
83+
}
8484
}
8585

8686
public function __invoke(Request $request): Response

src/Resources/config/services.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@
317317
<tag name="twig.extension" />
318318
</service>
319319
<service id="sylius_paypal.twig.extension.order_address" alias="Sylius\PayPalPlugin\Twig\OrderAddressExtension" />
320-
320+
321321
<service id="sylius_paypal.verifier.payment_amount" class="Sylius\PayPalPlugin\Verifier\PaymentAmountVerifier" />
322322
<service id="Sylius\PayPalPlugin\Verifier\PaymentAmountVerifierInterface" alias="sylius_paypal.verifier.payment_amount" />
323323
</services>

0 commit comments

Comments
 (0)