diff --git a/CHANGELOG.md b/CHANGELOG.md index 9046b52..bd6f765 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - `FreshAdvance\Invoice\Transition\Model\OrderArticle` to `FreshAdvance\Invoice\Document\Model\OrderArticleExtension` - `FreshAdvance\Invoice\Transition\Core\Email` to `FreshAdvance\Invoice\Email\Core\EmailExtension` - `FreshAdvance\Invoice\Service\OrderServiceInterface` to `FreshAdvance\Invoice\Order\Service\OrderServiceInterface` + - `FreshAdvance\Invoice\Repository\OrderRepositoryInterface` to `FreshAdvance\Invoice\Order\Repository\OrderRepositoryInterface` ## [v3.1.0] - 2024-10-01 diff --git a/src/Repository/OrderRepository.php b/src/Order/Repository/OrderRepository.php similarity index 97% rename from src/Repository/OrderRepository.php rename to src/Order/Repository/OrderRepository.php index f19e1bb..1c3cb95 100644 --- a/src/Repository/OrderRepository.php +++ b/src/Order/Repository/OrderRepository.php @@ -7,7 +7,7 @@ declare(strict_types=1); -namespace FreshAdvance\Invoice\Repository; +namespace FreshAdvance\Invoice\Order\Repository; use Doctrine\DBAL\ForwardCompatibility\Result; use FreshAdvance\Invoice\Exception\OrderNotFound; diff --git a/src/Repository/OrderRepositoryInterface.php b/src/Order/Repository/OrderRepositoryInterface.php similarity index 91% rename from src/Repository/OrderRepositoryInterface.php rename to src/Order/Repository/OrderRepositoryInterface.php index aabfef5..7a8914b 100644 --- a/src/Repository/OrderRepositoryInterface.php +++ b/src/Order/Repository/OrderRepositoryInterface.php @@ -7,7 +7,7 @@ declare(strict_types=1); -namespace FreshAdvance\Invoice\Repository; +namespace FreshAdvance\Invoice\Order\Repository; use FreshAdvance\Invoice\Exception\OrderNotFound; use OxidEsales\Eshop\Application\Model\Order as OrderModel; diff --git a/src/Order/Service/OrderService.php b/src/Order/Service/OrderService.php index 32de7cd..fc5d1a2 100644 --- a/src/Order/Service/OrderService.php +++ b/src/Order/Service/OrderService.php @@ -10,7 +10,7 @@ namespace FreshAdvance\Invoice\Order\Service; use FreshAdvance\Invoice\DataType\InvoiceDataInterface; -use FreshAdvance\Invoice\Repository\OrderRepositoryInterface; +use FreshAdvance\Invoice\Order\Repository\OrderRepositoryInterface; class OrderService implements OrderServiceInterface { diff --git a/src/Order/services.yaml b/src/Order/services.yaml index c63a320..a2a140b 100644 --- a/src/Order/services.yaml +++ b/src/Order/services.yaml @@ -6,6 +6,9 @@ services: public: false autowire: true + FreshAdvance\Invoice\Order\Repository\OrderRepositoryInterface: + class: FreshAdvance\Invoice\Order\Repository\OrderRepository + FreshAdvance\Invoice\Order\Service\OrderServiceInterface: class: FreshAdvance\Invoice\Order\Service\OrderService diff --git a/src/Repository/services.yaml b/src/Repository/services.yaml index 11f10ef..db46fe2 100644 --- a/src/Repository/services.yaml +++ b/src/Repository/services.yaml @@ -6,8 +6,5 @@ services: FreshAdvance\Invoice\Repository\InvoiceConfigurationRepositoryInterface: class: FreshAdvance\Invoice\Repository\InvoiceConfigurationRepository - FreshAdvance\Invoice\Repository\OrderRepositoryInterface: - class: FreshAdvance\Invoice\Repository\OrderRepository - FreshAdvance\Invoice\Repository\ShopRepositoryInterface: class: FreshAdvance\Invoice\Repository\ShopRepository diff --git a/src/Service/Invoice.php b/src/Service/Invoice.php index 6ddf810..95fb494 100644 --- a/src/Service/Invoice.php +++ b/src/Service/Invoice.php @@ -13,8 +13,8 @@ use FreshAdvance\Invoice\DataType\InvoiceConfigurationInterface; use FreshAdvance\Invoice\DataType\InvoiceData; use FreshAdvance\Invoice\DataType\InvoiceDataInterface; +use FreshAdvance\Invoice\Order\Repository\OrderRepositoryInterface; use FreshAdvance\Invoice\Repository\InvoiceConfigurationRepositoryInterface; -use FreshAdvance\Invoice\Repository\OrderRepositoryInterface; use FreshAdvance\Invoice\Repository\ShopRepositoryInterface; use FreshAdvance\Invoice\Settings\ConfigInterface; use FreshAdvance\Invoice\Settings\ContextInterface; diff --git a/tests/Integration/Repository/OrderRepositoryTest.php b/tests/Integration/Repository/OrderRepositoryTest.php index 3eaeace..7256ae7 100644 --- a/tests/Integration/Repository/OrderRepositoryTest.php +++ b/tests/Integration/Repository/OrderRepositoryTest.php @@ -10,14 +10,13 @@ namespace FreshAdvance\Invoice\Tests\Integration\Repository; use FreshAdvance\Invoice\Exception\OrderNotFound; -use FreshAdvance\Invoice\Repository\OrderRepository; -use FreshAdvance\Invoice\Repository\OrderRepositoryInterface; +use FreshAdvance\Invoice\Order\Repository\OrderRepository; use OxidEsales\Eshop\Application\Model\Order as OrderModel; use OxidEsales\EshopCommunity\Internal\Framework\Database\QueryBuilderFactoryInterface; use OxidEsales\EshopCommunity\Tests\Integration\IntegrationTestCase; /** - * @covers \FreshAdvance\Invoice\Repository\OrderRepository + * @covers \FreshAdvance\Invoice\Order\Repository\OrderRepository */ class OrderRepositoryTest extends IntegrationTestCase { @@ -91,7 +90,7 @@ public function testGetInvoiceNumberThrowsExceptionOnNotExistingOrder(): void $sut->getInvoiceNumberByOrderId(self::TEST_ORDER_ID_WRONG); } - public function getSut(): OrderRepositoryInterface + public function getSut(): \FreshAdvance\Invoice\Order\Repository\OrderRepositoryInterface { return new OrderRepository( queryBuilderFactory: $this->get(QueryBuilderFactoryInterface::class), diff --git a/tests/Unit/Order/Service/OrdereServiceTest.php b/tests/Unit/Order/Service/OrdereServiceTest.php index f9e8494..7bd3003 100644 --- a/tests/Unit/Order/Service/OrdereServiceTest.php +++ b/tests/Unit/Order/Service/OrdereServiceTest.php @@ -10,9 +10,9 @@ namespace FreshAdvance\Invoice\Tests\Unit\Order\Service; use FreshAdvance\Invoice\DataType\InvoiceDataInterface; +use FreshAdvance\Invoice\Order\Repository\OrderRepositoryInterface; use FreshAdvance\Invoice\Order\Service\OrderService; use FreshAdvance\Invoice\Order\Service\OrderServiceInterface; -use FreshAdvance\Invoice\Repository\OrderRepositoryInterface; use OxidEsales\Eshop\Application\Model\Order; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Service/InvoiceTest.php b/tests/Unit/Service/InvoiceTest.php index 344d5ff..57218cc 100644 --- a/tests/Unit/Service/InvoiceTest.php +++ b/tests/Unit/Service/InvoiceTest.php @@ -10,8 +10,8 @@ namespace FreshAdvance\Invoice\Tests\Unit\Service; use FreshAdvance\Invoice\DataType\InvoiceConfigurationInterface; +use FreshAdvance\Invoice\Order\Repository\OrderRepositoryInterface; use FreshAdvance\Invoice\Repository\InvoiceConfigurationRepositoryInterface; -use FreshAdvance\Invoice\Repository\OrderRepositoryInterface; use FreshAdvance\Invoice\Repository\ShopRepositoryInterface; use FreshAdvance\Invoice\Service\Invoice; use FreshAdvance\Invoice\Settings\ConfigInterface;