Skip to content

Commit

Permalink
Move OrderRepositoryInterface class to its domain namespace
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Fedurtsya <[email protected]>
  • Loading branch information
Sieg committed Jan 26, 2025
1 parent 17c3528 commit 5458e55
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Order/Service/OrderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
3 changes: 3 additions & 0 deletions src/Order/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions src/Repository/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/Service/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 3 additions & 4 deletions tests/Integration/Repository/OrderRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Order/Service/OrdereServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Service/InvoiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5458e55

Please sign in to comment.