services: _defaults: autowire: true # Automatically injects dependencies autoconfigure: true # Automatically registers services as commands, event subscribers, etc. public: false # Services are private by default # 1. Transport Service # The concrete class and DSN are set dynamically by the Extension based on bundle config. Michel\PQueue\Transport\TransportInterface: public : true factory: ['%pqueue.transport.class%', 'create'] arguments: - '%pqueue.transport.options%' # DSN comes from bundle config # 4. PQueueConsumerFactory Service # This factory encapsulates the logic for discovering and resolving handlers. Michel\PQueue\PQueueConsumerFactory: public : true arguments: - '@Michel\PQueueBundle\HandlerResolver\SymfonyHandlerResolver' # Injects the resolver - '%pqueue.handlers.map%' # Injects handler sources from bundle config Michel\PQueue\PQueueDispatcher: public : true arguments: - '@Michel\PQueue\Transport\TransportInterface' # Injects the resolver - Michel\PQueue\PQueueConsumer: public : true factory: ['@Michel\PQueue\PQueueConsumerFactory', 'createConsumer'] # 6. Bundle Command Michel\PQueueBundle\Command\: resource: '../../../src/Command/*' tags: ['console.command'] public: true autowire: true