services:
    nordmind_system_foundation.query.query_handler:
        class: Nordmind\SystemFoundation\Application\Query\QueryHandler
        arguments:
            - '@security.authorization_checker'
            - '@security.token_storage'
    Nordmind\SystemFoundation\Application\Query\QueryHandler:
        alias: nordmind_system_foundation.query.query_handler

    nordmind_system_foundation.middleware.roles_middleware:
        class: Nordmind\SystemFoundation\Application\CommandBus\RolesMiddleware
        arguments:
            - '@security.authorization_checker'

    nordmind_system_foundation.middleware.doctrine_middleware:
        class: Nordmind\SystemFoundation\Application\CommandBus\DoctrineMiddleware
        arguments:
            - '@doctrine.orm.default_entity_manager'

    nordmind_system_foundation.middleware.caller_aware_middleware:
        class: Nordmind\SystemFoundation\Application\CommandBus\CallerAwareMiddleware
        arguments:
            - '@security.token_storage'
