From 607677135c48ff65e50297673c4395c7d145bbab Mon Sep 17 00:00:00 2001 From: Rafikooo Date: Thu, 18 Jan 2024 10:55:29 +0100 Subject: [PATCH 1/7] [Composer] Remove Psalm --- composer.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 23237a66..6f1c2e35 100644 --- a/composer.json +++ b/composer.json @@ -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": { @@ -68,8 +67,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" From 12ecb5788e3355e078dacd4391927c2d80f3a2d7 Mon Sep 17 00:00:00 2001 From: Rafikooo Date: Thu, 18 Jan 2024 10:56:04 +0100 Subject: [PATCH 2/7] [Psalm] Remove configuration file --- psalm.xml | 82 ------------------------------------------------------- 1 file changed, 82 deletions(-) delete mode 100644 psalm.xml diff --git a/psalm.xml b/psalm.xml deleted file mode 100644 index 5b990dc2..00000000 --- a/psalm.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 2e5bff9e8f81abf8e0fa6cbfc475bb76dc7dfa41 Mon Sep 17 00:00:00 2001 From: Rafikooo Date: Thu, 18 Jan 2024 11:08:45 +0100 Subject: [PATCH 3/7] [Psalm] Remove outdated annotations --- src/Controller/CancelPayPalCheckoutPaymentAction.php | 1 - src/Controller/CancelPayPalOrderAction.php | 1 - src/Controller/CancelPayPalPaymentAction.php | 1 - src/Controller/PayPalPaymentOnErrorAction.php | 1 - src/Controller/Webhook/RefundOrderAction.php | 1 - 5 files changed, 5 deletions(-) diff --git a/src/Controller/CancelPayPalCheckoutPaymentAction.php b/src/Controller/CancelPayPalCheckoutPaymentAction.php index 0020c599..2e864da6 100644 --- a/src/Controller/CancelPayPalCheckoutPaymentAction.php +++ b/src/Controller/CancelPayPalCheckoutPaymentAction.php @@ -28,7 +28,6 @@ public function __invoke(Request $request): Response { /** * @var string $content - * @psalm-suppress UnnecessaryVarAnnotation */ $content = $request->getContent(); diff --git a/src/Controller/CancelPayPalOrderAction.php b/src/Controller/CancelPayPalOrderAction.php index ea5d15bc..d5e5dacb 100644 --- a/src/Controller/CancelPayPalOrderAction.php +++ b/src/Controller/CancelPayPalOrderAction.php @@ -39,7 +39,6 @@ public function __invoke(Request $request): Response { /** * @var string $content - * @psalm-suppress UnnecessaryVarAnnotation */ $content = $request->getContent(); diff --git a/src/Controller/CancelPayPalPaymentAction.php b/src/Controller/CancelPayPalPaymentAction.php index 33c407e8..95a7752f 100644 --- a/src/Controller/CancelPayPalPaymentAction.php +++ b/src/Controller/CancelPayPalPaymentAction.php @@ -50,7 +50,6 @@ public function __invoke(Request $request): Response { /** * @var string $content - * @psalm-suppress UnnecessaryVarAnnotation */ $content = $request->getContent(); diff --git a/src/Controller/PayPalPaymentOnErrorAction.php b/src/Controller/PayPalPaymentOnErrorAction.php index 9c218499..879b13c8 100644 --- a/src/Controller/PayPalPaymentOnErrorAction.php +++ b/src/Controller/PayPalPaymentOnErrorAction.php @@ -31,7 +31,6 @@ public function __invoke(Request $request): Response { /** * @var string $content - * @psalm-suppress UnnecessaryVarAnnotation */ $content = $request->getContent(); diff --git a/src/Controller/Webhook/RefundOrderAction.php b/src/Controller/Webhook/RefundOrderAction.php index 0c9bc9aa..aa214995 100644 --- a/src/Controller/Webhook/RefundOrderAction.php +++ b/src/Controller/Webhook/RefundOrderAction.php @@ -64,7 +64,6 @@ private function getPayPalPaymentUrl(Request $request): string { /** * @var string $content - * @psalm-suppress UnnecessaryVarAnnotation */ $content = $request->getContent(); From e068f7ce0e8c8381b9d9fcfc8485cc225534e48b Mon Sep 17 00:00:00 2001 From: Olivier ALLAIN Date: Fri, 27 Jan 2023 10:27:27 +0100 Subject: [PATCH 4/7] fix cancel payment --- src/Controller/CancelLastPayPalPaymentAction.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Controller/CancelLastPayPalPaymentAction.php b/src/Controller/CancelLastPayPalPaymentAction.php index 9d587293..351b4061 100644 --- a/src/Controller/CancelLastPayPalPaymentAction.php +++ b/src/Controller/CancelLastPayPalPaymentAction.php @@ -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(); From 7347d95b52fc7411585ca75c4f6ad90e9b518864 Mon Sep 17 00:00:00 2001 From: Rafikooo Date: Thu, 8 Feb 2024 11:19:20 +0100 Subject: [PATCH 5/7] [Conflict] Add conflict with behat/mink-selenium2-driver:>=1.7.0 --- CONFLICTS.md | 10 ++++++++++ composer.json | 3 +++ 2 files changed, 13 insertions(+) create mode 100644 CONFLICTS.md diff --git a/CONFLICTS.md b/CONFLICTS.md new file mode 100644 index 00000000..06d5f13a --- /dev/null +++ b/CONFLICTS.md @@ -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` diff --git a/composer.json b/composer.json index 6f1c2e35..2bd8f17f 100644 --- a/composer.json +++ b/composer.json @@ -50,6 +50,9 @@ "autoload-dev": { "classmap": ["tests/Application/Kernel.php"] }, + "conflict": { + "behat/mink-selenium2-driver": ">=1.7.0" + }, "config": { "sort-packages": true, "allow-plugins": { From bea250530e1481c3ad5a121df21f88079e93d739 Mon Sep 17 00:00:00 2001 From: Rafikooo Date: Mon, 12 Feb 2024 17:12:08 +0100 Subject: [PATCH 6/7] [CI] Bump version of symfony/flex to ^2.4 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index faa073c6..53fe8f2a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }}" From 1b91407df072d854c3ca3bd3b0e7279a1803ae8b Mon Sep 17 00:00:00 2001 From: Damian Murawski Date: Thu, 11 Apr 2024 13:27:56 +0200 Subject: [PATCH 7/7] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fe5385fd..af85d5eb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@

- + + + + Sylius Logo. +