From cc421f58eb18c993ff18404c22a4f418010b4016 Mon Sep 17 00:00:00 2001 From: token Date: Mon, 20 May 2024 17:03:31 +0200 Subject: [PATCH 1/3] Fix imoje notification resolving --- composer.json | 1 - src/Controller/NotifyController.php | 2 +- tests/Application/.env | 2 -- tests/Application/composer.json | 5 +---- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 6ef64b8..54881a3 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,6 @@ "license": "MIT", "require": { "php": "^8.1", - "doctrine/annotations": "^1.14", "sylius/sylius": ">=1.12.13 || ~1.13.0", "sylius/mailer-bundle": "^1.8 || ^2.0@beta", "symfony/webpack-encore-bundle": "^1.15" diff --git a/src/Controller/NotifyController.php b/src/Controller/NotifyController.php index 550c837..128accb 100644 --- a/src/Controller/NotifyController.php +++ b/src/Controller/NotifyController.php @@ -29,7 +29,7 @@ public function __construct( public function verifyImojeNotification(Request $request): Response { - if ('' !== $request->getContent()) { + if ('' === $request->getContent()) { return new Response('', Response::HTTP_NO_CONTENT); } diff --git a/tests/Application/.env b/tests/Application/.env index f4085ce..c78ac22 100644 --- a/tests/Application/.env +++ b/tests/Application/.env @@ -31,5 +31,3 @@ SYLIUS_MESSENGER_TRANSPORT_MAIN_FAILED_DSN=doctrine://default?queue_name=main_fa SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_DSN=doctrine://default?queue_name=catalog_promotion_removal SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_FAILED_DSN=doctrine://default?queue_name=catalog_promotion_removal_failed ###< symfony/messenger ### - -MESSENGER_TRANSPORT_DSN=doctrine://default diff --git a/tests/Application/composer.json b/tests/Application/composer.json index eb3d48e..326735f 100644 --- a/tests/Application/composer.json +++ b/tests/Application/composer.json @@ -1,8 +1,5 @@ { "name": "sylius/plugin-skeleton-test-application", "description": "Sylius application for plugin testing purposes (composer.json needed for project dir resolving)", - "license": "MIT", - "require": { - "doctrine/annotations": "^1.14" - } + "license": "MIT" } From 578f773e235360192be5bf5ce2bee48f2d6b9f51 Mon Sep 17 00:00:00 2001 From: token Date: Mon, 20 May 2024 17:10:20 +0200 Subject: [PATCH 2/3] Add mising doctrine/annotations package --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 54881a3..6ef64b8 100644 --- a/composer.json +++ b/composer.json @@ -9,6 +9,7 @@ "license": "MIT", "require": { "php": "^8.1", + "doctrine/annotations": "^1.14", "sylius/sylius": ">=1.12.13 || ~1.13.0", "sylius/mailer-bundle": "^1.8 || ^2.0@beta", "symfony/webpack-encore-bundle": "^1.15" From 5a3476fc470b3c017f2d3cc72a9b2626382d3c16 Mon Sep 17 00:00:00 2001 From: token Date: Mon, 20 May 2024 17:15:43 +0200 Subject: [PATCH 3/3] Add missing MESSENGER_TRANSPORT_DSN env variable --- tests/Application/.env | 1 + tests/Application/.env.test | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/Application/.env b/tests/Application/.env index c78ac22..a3e5589 100644 --- a/tests/Application/.env +++ b/tests/Application/.env @@ -26,6 +26,7 @@ MAILER_DSN=null://null ###< symfony/mailer ### ###> symfony/messenger ### +MESSENGER_TRANSPORT_DSN=doctrine://default SYLIUS_MESSENGER_TRANSPORT_MAIN_DSN=doctrine://default SYLIUS_MESSENGER_TRANSPORT_MAIN_FAILED_DSN=doctrine://default?queue_name=main_failed SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_DSN=doctrine://default?queue_name=catalog_promotion_removal diff --git a/tests/Application/.env.test b/tests/Application/.env.test index 99b6185..44fee52 100644 --- a/tests/Application/.env.test +++ b/tests/Application/.env.test @@ -4,6 +4,7 @@ KERNEL_CLASS='Tests\BitBag\SyliusImojePlugin\Application\Kernel' ###> symfony/messenger ### # Sync transport turned for testing env for the ease of testing +MESSENGER_TRANSPORT_DSN=sync:// SYLIUS_MESSENGER_TRANSPORT_MAIN_DSN=sync:// SYLIUS_MESSENGER_TRANSPORT_MAIN_FAILED_DSN=sync:// SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_DSN=sync://