Skip to content

Commit

Permalink
OXDEV-7661 Split repositories by namespaces
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Fedurtsya <anton@fedurtsya.com>
  • Loading branch information
Sieg committed Dec 6, 2023
1 parent 9579c49 commit a4ce013
Show file tree
Hide file tree
Showing 20 changed files with 25 additions and 30 deletions.
1 change: 0 additions & 1 deletion services.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
imports:
- { resource: src/Setting/services.yaml }
- { resource: src/Shared/services.yaml }
- { resource: src/Module/services.yaml }
- { resource: src/Shop/services.yaml }
Expand Down
10 changes: 0 additions & 10 deletions src/Setting/services.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

declare(strict_types=1);

namespace OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure;
namespace OxidEsales\GraphQL\ConfigurationAccess\Shop\Infrastructure;

use Doctrine\DBAL\Result;
use OxidEsales\EshopCommunity\Internal\Framework\Config\Dao\ShopConfigurationSettingDaoInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* See LICENSE file for license details.
*/

namespace OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure;
namespace OxidEsales\GraphQL\ConfigurationAccess\Shop\Infrastructure;

interface ShopSettingRepositoryInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Shop/Service/ShopSettingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

namespace OxidEsales\GraphQL\ConfigurationAccess\Shop\Service;

use OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure\ShopSettingRepositoryInterface;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\BooleanSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\FloatSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\IntegerSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\SettingType;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\StringSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\CollectionEncodingServiceInterface;
use OxidEsales\GraphQL\ConfigurationAccess\Shop\Infrastructure\ShopSettingRepositoryInterface;

final class ShopSettingService implements ShopSettingServiceInterface
{
Expand Down
3 changes: 3 additions & 0 deletions src/Shop/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ services:

OxidEsales\GraphQL\ConfigurationAccess\Shop\Service\ShopSettingServiceInterface:
class: OxidEsales\GraphQL\ConfigurationAccess\Shop\Service\ShopSettingService

OxidEsales\GraphQL\ConfigurationAccess\Shop\Infrastructure\ShopSettingRepositoryInterface:
class: OxidEsales\GraphQL\ConfigurationAccess\Shop\Infrastructure\ShopSettingRepository
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

declare(strict_types=1);

namespace OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure;
namespace OxidEsales\GraphQL\ConfigurationAccess\Theme\Infrastructure;

use Doctrine\DBAL\ForwardCompatibility\Result;
use OxidEsales\EshopCommunity\Internal\Framework\Config\Utility\ShopSettingEncoderInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* See LICENSE file for license details.
*/

namespace OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure;
namespace OxidEsales\GraphQL\ConfigurationAccess\Theme\Infrastructure;

interface ThemeSettingRepositoryInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Theme/Service/ThemeSettingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@

namespace OxidEsales\GraphQL\ConfigurationAccess\Theme\Service;

use OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure\ThemeSettingRepositoryInterface;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\BooleanSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\FloatSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\IntegerSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\SettingType;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\StringSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception\InvalidCollectionException;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\CollectionEncodingServiceInterface;
use OxidEsales\GraphQL\ConfigurationAccess\Theme\Infrastructure\ThemeSettingRepositoryInterface;

final class ThemeSettingService implements ThemeSettingServiceInterface
{
Expand Down
3 changes: 3 additions & 0 deletions src/Theme/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ services:

OxidEsales\GraphQL\ConfigurationAccess\Theme\Service\ThemeSettingServiceInterface:
class: OxidEsales\GraphQL\ConfigurationAccess\Theme\Service\ThemeSettingService

OxidEsales\GraphQL\ConfigurationAccess\Theme\Infrastructure\ThemeSettingRepositoryInterface:
class: OxidEsales\GraphQL\ConfigurationAccess\Theme\Infrastructure\ThemeSettingRepository
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
use OxidEsales\EshopCommunity\Internal\Framework\Database\QueryBuilderFactoryInterface;
use OxidEsales\EshopCommunity\Internal\Transition\Utility\BasicContextInterface;
use OxidEsales\EshopCommunity\Tests\Integration\IntegrationTestCase;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure\ShopSettingRepository;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception\NoSettingsFoundForShopException;
use OxidEsales\GraphQL\ConfigurationAccess\Shop\Infrastructure\ShopSettingRepository;

/**
* @covers \OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure\ShopSettingRepository
* @covers \OxidEsales\GraphQL\ConfigurationAccess\Shop\Infrastructure\ShopSettingRepository
*/
class ShopSettingRepositoryTest extends IntegrationTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
use OxidEsales\EshopCommunity\Internal\Framework\Theme\Event\ThemeSettingChangedEvent;
use OxidEsales\EshopCommunity\Internal\Transition\Utility\BasicContextInterface;
use OxidEsales\EshopCommunity\Tests\Integration\IntegrationTestCase;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure\ThemeSettingRepository;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Enum\FieldType;
use OxidEsales\GraphQL\ConfigurationAccess\Theme\Infrastructure\ThemeSettingRepository;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;

/**
* @covers \OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure\ThemeSettingRepository
* @covers \OxidEsales\GraphQL\ConfigurationAccess\Theme\Infrastructure\ThemeSettingRepository
*/
class ThemeSettingRepositoryTest extends IntegrationTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
use OxidEsales\EshopCommunity\Internal\Framework\Config\Utility\ShopSettingEncoderInterface;
use OxidEsales\EshopCommunity\Internal\Framework\Database\QueryBuilderFactoryInterface;
use OxidEsales\EshopCommunity\Internal\Transition\Utility\BasicContextInterface;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure\ShopSettingRepository;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure\ShopSettingRepositoryInterface;
use OxidEsales\GraphQL\ConfigurationAccess\Shop\Infrastructure\ShopSettingRepository;
use OxidEsales\GraphQL\ConfigurationAccess\Shop\Infrastructure\ShopSettingRepositoryInterface;

abstract class AbstractShopSettingRepositoryTestCase extends AbstractDatabaseSettingsRepositoryTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use OxidEsales\EshopCommunity\Internal\Framework\Config\Utility\ShopSettingEncoderInterface;
use OxidEsales\EshopCommunity\Internal\Framework\Database\QueryBuilderFactoryInterface;
use OxidEsales\EshopCommunity\Internal\Transition\Utility\BasicContextInterface;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure\ThemeSettingRepository;
use OxidEsales\GraphQL\ConfigurationAccess\Theme\Infrastructure\ThemeSettingRepository;
use PHPUnit\Framework\MockObject\MockObject;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception\WrongSettingTypeException;

/**
* @covers \OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure\ShopSettingRepository
* @covers \OxidEsales\GraphQL\ConfigurationAccess\Shop\Infrastructure\ShopSettingRepository
*/
class ShopSettingRepositoryGettersTest extends AbstractShopSettingRepositoryTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception\WrongSettingTypeException;

/**
* @covers \OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure\ShopSettingRepository
* @covers \OxidEsales\GraphQL\ConfigurationAccess\Shop\Infrastructure\ShopSettingRepository
*/
class ShopSettingRepositorySettersTest extends AbstractShopSettingRepositoryTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception\NoSettingsFoundForThemeException;

/**
* @covers \OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure\ThemeSettingRepository
* @covers \OxidEsales\GraphQL\ConfigurationAccess\Theme\Infrastructure\ThemeSettingRepository
*/
class ThemeSettingRepositoryGettersTest extends AbstractThemeSettingRepositoryTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception\NoSettingsFoundForThemeException;

/**
* @covers \OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure\ThemeSettingRepository
* @covers \OxidEsales\GraphQL\ConfigurationAccess\Theme\Infrastructure\ThemeSettingRepository
*/
class ThemeSettingRepositorySettersTest extends AbstractThemeSettingRepositoryTestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Shop/Service/ShopSettingServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

namespace OxidEsales\GraphQL\ConfigurationAccess\Tests\Unit\Shop\Service;

use OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure\ShopSettingRepositoryInterface;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\BooleanSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\FloatSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\IntegerSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\StringSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Enum\FieldType;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\CollectionEncodingServiceInterface;
use OxidEsales\GraphQL\ConfigurationAccess\Shop\Infrastructure\ShopSettingRepositoryInterface;
use OxidEsales\GraphQL\ConfigurationAccess\Shop\Service\ShopSettingService;
use OxidEsales\GraphQL\ConfigurationAccess\Tests\Unit\UnitTestCase;

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Theme/Service/ThemeSettingServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace OxidEsales\GraphQL\ConfigurationAccess\Tests\Unit\Theme\Service;

use OxidEsales\GraphQL\ConfigurationAccess\Setting\Infrastructure\ThemeSettingRepositoryInterface;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\BooleanSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\FloatSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType\IntegerSetting;
Expand All @@ -18,6 +17,7 @@
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception\InvalidCollectionException;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\CollectionEncodingServiceInterface;
use OxidEsales\GraphQL\ConfigurationAccess\Tests\Unit\UnitTestCase;
use OxidEsales\GraphQL\ConfigurationAccess\Theme\Infrastructure\ThemeSettingRepositoryInterface;
use OxidEsales\GraphQL\ConfigurationAccess\Theme\Service\ThemeSettingService;
use PHPUnit\Framework\MockObject\MockObject;

Expand Down

0 comments on commit a4ce013

Please sign in to comment.