From d2082b7b1d16bef2d2e92b8f9c64501431738547 Mon Sep 17 00:00:00 2001 From: Jan Goralski Date: Mon, 22 Apr 2024 16:51:47 +0200 Subject: [PATCH] [Maintenance] Move ProductSynchronizationRepositoryInterface --- src/Doctrine/ORM/ProductSynchronizationRepository.php | 1 + src/Handler/SynchronizationEndedHandler.php | 2 +- src/Provider/LastSynchronizationDateProvider.php | 2 +- .../ProductSynchronizationRepositoryInterface.php | 2 +- tests/Unit/Handler/SynchronizationEndedHandlerTest.php | 2 +- tests/Unit/Provider/LastSynchronizationDateProviderTest.php | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) rename src/{Doctrine/ORM => Repository}/ProductSynchronizationRepositoryInterface.php (86%) diff --git a/src/Doctrine/ORM/ProductSynchronizationRepository.php b/src/Doctrine/ORM/ProductSynchronizationRepository.php index 59705a1..0f3e4c7 100644 --- a/src/Doctrine/ORM/ProductSynchronizationRepository.php +++ b/src/Doctrine/ORM/ProductSynchronizationRepository.php @@ -5,6 +5,7 @@ namespace CommerceWeavers\SyliusAlsoBoughtPlugin\Doctrine\ORM; use CommerceWeavers\SyliusAlsoBoughtPlugin\Entity\ProductSynchronizationInterface; +use CommerceWeavers\SyliusAlsoBoughtPlugin\Repository\ProductSynchronizationRepositoryInterface; use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository; final class ProductSynchronizationRepository extends EntityRepository implements ProductSynchronizationRepositoryInterface diff --git a/src/Handler/SynchronizationEndedHandler.php b/src/Handler/SynchronizationEndedHandler.php index 7ac4fde..dbb45cb 100644 --- a/src/Handler/SynchronizationEndedHandler.php +++ b/src/Handler/SynchronizationEndedHandler.php @@ -4,9 +4,9 @@ namespace CommerceWeavers\SyliusAlsoBoughtPlugin\Handler; -use CommerceWeavers\SyliusAlsoBoughtPlugin\Doctrine\ORM\ProductSynchronizationRepositoryInterface; use CommerceWeavers\SyliusAlsoBoughtPlugin\Entity\ProductSynchronization; use CommerceWeavers\SyliusAlsoBoughtPlugin\Event\SynchronizationEnded; +use CommerceWeavers\SyliusAlsoBoughtPlugin\Repository\ProductSynchronizationRepositoryInterface; use Symfony\Component\Messenger\Attribute\AsMessageHandler; #[AsMessageHandler] diff --git a/src/Provider/LastSynchronizationDateProvider.php b/src/Provider/LastSynchronizationDateProvider.php index 9cbfcae..407d473 100644 --- a/src/Provider/LastSynchronizationDateProvider.php +++ b/src/Provider/LastSynchronizationDateProvider.php @@ -4,7 +4,7 @@ namespace CommerceWeavers\SyliusAlsoBoughtPlugin\Provider; -use CommerceWeavers\SyliusAlsoBoughtPlugin\Doctrine\ORM\ProductSynchronizationRepositoryInterface; +use CommerceWeavers\SyliusAlsoBoughtPlugin\Repository\ProductSynchronizationRepositoryInterface; use Webmozart\Assert\Assert; final class LastSynchronizationDateProvider implements LastSynchronizationDateProviderInterface diff --git a/src/Doctrine/ORM/ProductSynchronizationRepositoryInterface.php b/src/Repository/ProductSynchronizationRepositoryInterface.php similarity index 86% rename from src/Doctrine/ORM/ProductSynchronizationRepositoryInterface.php rename to src/Repository/ProductSynchronizationRepositoryInterface.php index 9e7b6f7..b2cc020 100644 --- a/src/Doctrine/ORM/ProductSynchronizationRepositoryInterface.php +++ b/src/Repository/ProductSynchronizationRepositoryInterface.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace CommerceWeavers\SyliusAlsoBoughtPlugin\Doctrine\ORM; +namespace CommerceWeavers\SyliusAlsoBoughtPlugin\Repository; use CommerceWeavers\SyliusAlsoBoughtPlugin\Entity\ProductSynchronizationInterface; use Sylius\Component\Resource\Repository\RepositoryInterface; diff --git a/tests/Unit/Handler/SynchronizationEndedHandlerTest.php b/tests/Unit/Handler/SynchronizationEndedHandlerTest.php index ae6f63b..9b859b2 100644 --- a/tests/Unit/Handler/SynchronizationEndedHandlerTest.php +++ b/tests/Unit/Handler/SynchronizationEndedHandlerTest.php @@ -4,10 +4,10 @@ namespace Tests\CommerceWeavers\SyliusAlsoBoughtPlugin\Unit\Handler; -use CommerceWeavers\SyliusAlsoBoughtPlugin\Doctrine\ORM\ProductSynchronizationRepositoryInterface; use CommerceWeavers\SyliusAlsoBoughtPlugin\Entity\ProductSynchronization; use CommerceWeavers\SyliusAlsoBoughtPlugin\Event\SynchronizationEnded; use CommerceWeavers\SyliusAlsoBoughtPlugin\Handler\SynchronizationEndedHandler; +use CommerceWeavers\SyliusAlsoBoughtPlugin\Repository\ProductSynchronizationRepositoryInterface; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use Symfony\Component\Uid\Uuid; diff --git a/tests/Unit/Provider/LastSynchronizationDateProviderTest.php b/tests/Unit/Provider/LastSynchronizationDateProviderTest.php index 14739a8..1a7ddef 100644 --- a/tests/Unit/Provider/LastSynchronizationDateProviderTest.php +++ b/tests/Unit/Provider/LastSynchronizationDateProviderTest.php @@ -4,9 +4,9 @@ namespace Tests\CommerceWeavers\SyliusAlsoBoughtPlugin\Unit\Provider; -use CommerceWeavers\SyliusAlsoBoughtPlugin\Doctrine\ORM\ProductSynchronizationRepositoryInterface; use CommerceWeavers\SyliusAlsoBoughtPlugin\Entity\ProductSynchronization; use CommerceWeavers\SyliusAlsoBoughtPlugin\Provider\LastSynchronizationDateProvider; +use CommerceWeavers\SyliusAlsoBoughtPlugin\Repository\ProductSynchronizationRepositoryInterface; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use Symfony\Component\Uid\Uuid;