diff --git a/services.yaml b/services.yaml index eff4dda..9f9ecc1 100644 --- a/services.yaml +++ b/services.yaml @@ -1,6 +1,5 @@ imports: - { resource: src/Setting/services.yaml } - - { resource: src/Shared/services.yaml } parameters: oxidesales.graphqlconfigurationaccess.depends_on_modules: [ 'oe_graphql_base' ] @@ -19,11 +18,13 @@ services: class: OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\PermissionProvider tags: [ 'graphql_permission_provider' ] - OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\Authorization: - class: OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\Authorization + OxidEsales\GraphQL\ConfigurationAccess\DependencyCheckTrigger: + alias: OxidEsales\GraphQL\Base\Framework\GraphQLQueryHandler + public: true OxidEsales\GraphQL\ConfigurationAccess\Shared\Subscriber\BeforeModuleDeactivation: class: OxidEsales\GraphQL\ConfigurationAccess\Shared\Subscriber\BeforeModuleDeactivation - arguments: [ '%oxidesales.graphqlconfigurationaccess.depends_on_modules%' ] + arguments: + $dependencies: '%oxidesales.graphqlconfigurationaccess.depends_on_modules%' tags: [ 'kernel.event_subscriber' ] public: true diff --git a/src/Shared/Exception/GraphQLServiceNotFound.php b/src/Shared/Exception/GraphQLServiceNotFound.php deleted file mode 100644 index 92cf471..0000000 --- a/src/Shared/Exception/GraphQLServiceNotFound.php +++ /dev/null @@ -1,20 +0,0 @@ -authorization = $authorization; - } - - public function isAllowed(string $right, $subject = null): bool - { - if (null === $this->authorization) { - throw new GraphQLServiceNotFound(BaseAuthorization::class); - } - - return $this->authorization->isAllowed($right, $subject); - } -} diff --git a/src/Shared/Subscriber/BeforeModuleDeactivation.php b/src/Shared/Subscriber/BeforeModuleDeactivation.php index 7ee33db..2d5cf78 100644 --- a/src/Shared/Subscriber/BeforeModuleDeactivation.php +++ b/src/Shared/Subscriber/BeforeModuleDeactivation.php @@ -16,11 +16,9 @@ final class BeforeModuleDeactivation implements EventSubscriberInterface { - private array $dependencies; - - public function __construct(array $dependencies) - { - $this->dependencies = $dependencies; + public function __construct( + private array $dependencies + ) { } public function handle(OriginalEvent $event): OriginalEvent diff --git a/src/Shared/services.yaml b/src/Shared/services.yaml deleted file mode 100644 index 8b000a6..0000000 --- a/src/Shared/services.yaml +++ /dev/null @@ -1,8 +0,0 @@ -services: - _defaults: - public: false - autowire: true - - OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\: - resource: 'Service/' - public: true