Skip to content

Commit

Permalink
Merge branch '1.5' into oallain-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
GSadee authored Apr 15, 2024
2 parents 250c404 + e91c804 commit a88d022
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 93 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
if: matrix.symfony != ''
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:1.18.5"
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.4"
composer config --no-plugins allow-plugins.symfony/thanks true
composer config extra.symfony.require "${{ matrix.symfony }}"
Expand Down
10 changes: 10 additions & 0 deletions CONFLICTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# CONFLICTS

This document explains why certain conflicts were added to `composer.json` and
references related issues.

- `behat/mink-selenium2-driver:>=1.7.0`:

This version adds strict type to the `Behat\Mink\Driver\Selenium2Driver::visit($url)` method
which causes a fatal error because the method signature is no longer compatible with the parent class:
`PHP Fatal error: Declaration of Behat\Mink\Driver\Selenium2Driver::visit(string $url) must be compatible with Behat\Mink\Driver\CoreDriver::visit($url) in /home/runner/work/Sylius-Standard/Sylius-Standard/vendor/behat/mink-selenium2-driver/src/Selenium2Driver.php on line 401`
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<p align="center">
<a href="https://sylius.com" target="_blank">
<img src="https://demo.sylius.com/assets/shop/img/logo.png" width="200" />
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://media.sylius.com/sylius-logo-800-dark.png">
<source media="(prefers-color-scheme: light)" srcset="https://media.sylius.com/sylius-logo-800.png">
<img alt="Sylius Logo." src="https://media.sylius.com/sylius-logo-800.png">
</picture>
</a>
</p>
<br/>
Expand Down
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
"symfony/dotenv": "^5.4 || ^6.0",
"symfony/intl": "^5.4 || ^6.0",
"symfony/web-profiler-bundle": "^5.4 || ^6.0",
"symfony/webpack-encore-bundle": "^1.15",
"vimeo/psalm": "4.27.0"
"symfony/webpack-encore-bundle": "^1.15"
},
"autoload": {
"psr-4": {
Expand All @@ -51,6 +50,9 @@
"autoload-dev": {
"classmap": ["tests/Application/Kernel.php"]
},
"conflict": {
"behat/mink-selenium2-driver": ">=1.7.0"
},
"config": {
"sort-packages": true,
"allow-plugins": {
Expand All @@ -68,8 +70,7 @@
"scripts": {
"analyse": [
"@composer validate --strict",
"vendor/bin/phpstan.phar analyse",
"vendor/bin/psalm"
"vendor/bin/phpstan.phar analyse"
],
"fix": [
"vendor/bin/ecs check src/ spec/ --fix"
Expand Down
82 changes: 0 additions & 82 deletions psalm.xml

This file was deleted.

8 changes: 8 additions & 0 deletions src/Controller/CancelLastPayPalPaymentAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ public function __invoke(Request $request): Response
$paymentStateMachine = $this->stateMachineFactory->get($payment, PaymentTransitions::GRAPH);
$paymentStateMachine->apply(PaymentTransitions::TRANSITION_CANCEL);

/** @var PaymentInterface $lastPayment */
$lastPayment = $order->getLastPayment();
if ($lastPayment->getState() === PaymentInterface::STATE_NEW) {
$this->objectManager->flush();

return new Response('', Response::HTTP_NO_CONTENT);
}

$this->orderPaymentProcessor->process($order);
$this->objectManager->flush();

Expand Down
1 change: 0 additions & 1 deletion src/Controller/CancelPayPalCheckoutPaymentAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public function __invoke(Request $request): Response
{
/**
* @var string $content
* @psalm-suppress UnnecessaryVarAnnotation
*/
$content = $request->getContent();

Expand Down
1 change: 0 additions & 1 deletion src/Controller/CancelPayPalOrderAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public function __invoke(Request $request): Response
{
/**
* @var string $content
* @psalm-suppress UnnecessaryVarAnnotation
*/
$content = $request->getContent();

Expand Down
1 change: 0 additions & 1 deletion src/Controller/CancelPayPalPaymentAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public function __invoke(Request $request): Response
{
/**
* @var string $content
* @psalm-suppress UnnecessaryVarAnnotation
*/
$content = $request->getContent();

Expand Down
1 change: 0 additions & 1 deletion src/Controller/PayPalPaymentOnErrorAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public function __invoke(Request $request): Response
{
/**
* @var string $content
* @psalm-suppress UnnecessaryVarAnnotation
*/
$content = $request->getContent();

Expand Down
1 change: 0 additions & 1 deletion src/Controller/Webhook/RefundOrderAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ private function getPayPalPaymentUrl(Request $request): string
{
/**
* @var string $content
* @psalm-suppress UnnecessaryVarAnnotation
*/
$content = $request->getContent();

Expand Down

0 comments on commit a88d022

Please sign in to comment.