Skip to content

Commit

Permalink
Merge branch 'b-7.0.x-split_namespace-OXDEV-7661' into b-7.0.x-protot…
Browse files Browse the repository at this point in the history
…ype-OXDEV-7325

# Conflicts:
#	services.yaml
#	src/Shared/services.yaml
#	tests/Unit/Theme/Infrastructure/ThemeSettingRepositorySettersTest.php
  • Loading branch information
MarcelOxid committed Dec 7, 2023
2 parents b38427e + 1bb22fd commit 97d1014
Show file tree
Hide file tree
Showing 70 changed files with 311 additions and 270 deletions.
5 changes: 4 additions & 1 deletion services.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
imports:
- { resource: src/Setting/services.yaml }
- { resource: src/Shared/services.yaml }
- { resource: src/Module/services.yaml }
- { resource: src/Shop/services.yaml }
- { resource: src/Theme/services.yaml }

parameters:
oxidesales.graphqlconfigurationaccess.depends_on_modules: [ 'oe_graphql_base' ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

declare(strict_types=1);

namespace OxidEsales\GraphQL\ConfigurationAccess\Setting\Controller;

use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\BooleanSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\FloatSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\IntegerSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\SettingType;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\StringSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Service\ModuleSettingServiceInterface;
namespace OxidEsales\GraphQL\ConfigurationAccess\Module\Controller;

use OxidEsales\GraphQL\ConfigurationAccess\Module\Service\ModuleSettingServiceInterface;
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 TheCodingMachine\GraphQLite\Annotations\HideIfUnauthorized;
use TheCodingMachine\GraphQLite\Annotations\Logged;
use TheCodingMachine\GraphQLite\Annotations\Mutation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@

declare(strict_types=1);

namespace OxidEsales\GraphQL\ConfigurationAccess\Setting\Service;
namespace OxidEsales\GraphQL\ConfigurationAccess\Module\Service;

use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Dao\ModuleConfigurationDaoInterface;
use OxidEsales\EshopCommunity\Internal\Framework\Module\Facade\{
ModuleSettingServiceInterface as ShopModuleSettingServiceInterface
};
ModuleSettingServiceInterface as ShopModuleSettingServiceInterface};
use OxidEsales\EshopCommunity\Internal\Framework\Module\Setting\Setting;
use OxidEsales\EshopCommunity\Internal\Transition\Utility\BasicContextInterface;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\BooleanSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\FloatSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\IntegerSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\SettingType;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\StringSetting;
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;

final class ModuleSettingService implements ModuleSettingServiceInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
* See LICENSE file for license details.
*/

namespace OxidEsales\GraphQL\ConfigurationAccess\Setting\Service;
namespace OxidEsales\GraphQL\ConfigurationAccess\Module\Service;

use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\BooleanSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\FloatSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\IntegerSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\SettingType;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\StringSetting;
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;

interface ModuleSettingServiceInterface
{
Expand Down
11 changes: 11 additions & 0 deletions src/Module/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
services:
_defaults:
public: false
autowire: true

OxidEsales\GraphQL\ConfigurationAccess\Module\Controller\:
resource: 'Controller/'
public: true

OxidEsales\GraphQL\ConfigurationAccess\Module\Service\ModuleSettingServiceInterface:
class: OxidEsales\GraphQL\ConfigurationAccess\Module\Service\ModuleSettingService
26 changes: 0 additions & 26 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\DataType;
namespace OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType;

use TheCodingMachine\GraphQLite\Annotations\Field;
use TheCodingMachine\GraphQLite\Annotations\Type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@

declare(strict_types=1);

namespace OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType;
namespace OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType;

use TheCodingMachine\GraphQLite\Annotations\Field;
use TheCodingMachine\GraphQLite\Annotations\Type;
use TheCodingMachine\GraphQLite\Types\ID;

#[Type]
final class FloatSetting
Expand Down
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\DataType;
namespace OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType;

use TheCodingMachine\GraphQLite\Annotations\Field;
use TheCodingMachine\GraphQLite\Annotations\Type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

declare(strict_types=1);

namespace OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType;
namespace OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType;

use OxidEsales\GraphQL\ConfigurationAccess\Setting\Enum\FieldType;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Enum\FieldType;
use TheCodingMachine\GraphQLite\Annotations\Field;
use TheCodingMachine\GraphQLite\Annotations\Type;

Expand Down
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\DataType;
namespace OxidEsales\GraphQL\ConfigurationAccess\Shared\DataType;

use TheCodingMachine\GraphQLite\Annotations\Field;
use TheCodingMachine\GraphQLite\Annotations\Type;
Expand Down
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\Enum;
namespace OxidEsales\GraphQL\ConfigurationAccess\Shared\Enum;

final class FieldType
{
Expand Down
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\Exception;
namespace OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception;

final class CollectionEncodingException extends \Exception
{
Expand Down
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\Exception;
namespace OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception;

use Exception;

Expand Down
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\Exception;
namespace OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception;

class NoSettingsFoundException extends \Exception
{
Expand Down
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\Exception;
namespace OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception;

final class WrongSettingValueException extends \Exception
{
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\Service;
namespace OxidEsales\GraphQL\ConfigurationAccess\Shared\Service;

use OxidEsales\GraphQL\ConfigurationAccess\Setting\Exception\CollectionEncodingException;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Exception\InvalidCollectionException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

declare(strict_types=1);

namespace OxidEsales\GraphQL\ConfigurationAccess\Setting\Service;
namespace OxidEsales\GraphQL\ConfigurationAccess\Shared\Service;

use OxidEsales\GraphQL\ConfigurationAccess\Setting\Exception\CollectionEncodingException;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Exception\InvalidCollectionException;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception\CollectionEncodingException;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception\InvalidCollectionException;

class JsonCollectionEncodingService implements CollectionEncodingServiceInterface
{
Expand Down
6 changes: 4 additions & 2 deletions src/Shared/Service/NamespaceMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ final class NamespaceMapper implements NamespaceMapperInterface
public function getControllerNamespaceMapping(): array
{
return [
self::SPACE . 'Setting\\Controller' => __DIR__ . '/../../Setting/Controller/',
self::SPACE . 'Module\\Controller' => __DIR__ . '/../../Module/Controller/',
self::SPACE . 'Shop\\Controller' => __DIR__ . '/../../Shop/Controller/',
self::SPACE . 'Theme\\Controller' => __DIR__ . '/../../Theme/Controller/',
];
}

public function getTypeNamespaceMapping(): array
{
return [
self::SPACE . 'Setting\\DataType' => __DIR__ . '/../../Setting/DataType/',
self::SPACE . 'Shared\\DataType' => __DIR__ . '/../../Shared/DataType/',
];
}
}
11 changes: 11 additions & 0 deletions src/Shared/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
services:
_defaults:
public: false
autowire: true

OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\:
resource: 'Service/'
public: true

OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\CollectionEncodingServiceInterface:
class: OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\JsonCollectionEncodingService
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

declare(strict_types=1);

namespace OxidEsales\GraphQL\ConfigurationAccess\Setting\Controller;

use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\BooleanSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\FloatSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\IntegerSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\SettingType;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\StringSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Service\ShopSettingServiceInterface;
namespace OxidEsales\GraphQL\ConfigurationAccess\Shop\Controller;

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\Shop\Service\ShopSettingServiceInterface;
use TheCodingMachine\GraphQLite\Annotations\HideIfUnauthorized;
use TheCodingMachine\GraphQLite\Annotations\Logged;
use TheCodingMachine\GraphQLite\Annotations\Mutation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

declare(strict_types=1);

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

use OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception\NoSettingsFoundException;

class NoSettingsFoundForShopException extends NoSettingsFoundException
{
Expand Down
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\Exception;
namespace OxidEsales\GraphQL\ConfigurationAccess\Shop\Exception;

final class WrongSettingTypeException extends \Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@

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;
use OxidEsales\EshopCommunity\Internal\Framework\Config\DataObject\ShopConfigurationSetting;
use OxidEsales\EshopCommunity\Internal\Framework\Database\QueryBuilderFactoryInterface;
use OxidEsales\EshopCommunity\Internal\Transition\Utility\BasicContextInterface;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Enum\FieldType;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Exception\NoSettingsFoundForShopException;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Exception\WrongSettingTypeException;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Exception\WrongSettingValueException;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Enum\FieldType;
use OxidEsales\GraphQL\ConfigurationAccess\Shop\Exception\NoSettingsFoundForShopException;
use OxidEsales\GraphQL\ConfigurationAccess\Shop\Exception\WrongSettingTypeException;
use OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception\WrongSettingValueException;

final class ShopSettingRepository implements ShopSettingRepositoryInterface
{
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;

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

declare(strict_types=1);

namespace OxidEsales\GraphQL\ConfigurationAccess\Setting\Service;

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

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
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
* See LICENSE file for license details.
*/

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

use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\BooleanSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\FloatSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\IntegerSetting;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\SettingType;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\StringSetting;
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;

interface ShopSettingServiceInterface
{
Expand Down
Loading

0 comments on commit 97d1014

Please sign in to comment.