Skip to content

Commit

Permalink
Merge pull request #382 from php-enqueue/bundle-aliases-for-producer
Browse files Browse the repository at this point in the history
[bundle] add producer interface alias.
  • Loading branch information
makasim authored Feb 28, 2018
2 parents cc8e579 + 10454ea commit e2a950c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/enqueue-bundle/Resources/config/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ services:
- '@enqueue.client.rpc_factory'
- '@enqueue.client.extensions'

Enqueue\Client\ProducerInterface:
public: true
alias: 'Enqueue\Client\Producer'

# Deprecated. To be removed in 0.10.
enqueue.client.producer:
public: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Enqueue\Bundle\Tests\Unit\Mocks\FooTransportFactory;
use Enqueue\Bundle\Tests\Unit\Mocks\TransportFactoryWithoutDriverFactory;
use Enqueue\Client\Producer;
use Enqueue\Client\ProducerInterface;
use Enqueue\Client\TraceableProducer;
use Enqueue\Consumption\QueueConsumer;
use Enqueue\JobQueue\JobRunner;
Expand Down Expand Up @@ -189,6 +190,7 @@ public function testShouldLoadClientServicesWhenEnabled()
self::assertTrue($container->hasDefinition('foo.driver'));
self::assertTrue($container->hasDefinition('enqueue.client.config'));
self::assertTrue($container->hasDefinition(Producer::class));
self::assertTrue($container->hasAlias(ProducerInterface::class));
}

public function testShouldNotCreateDriverIfFactoryDoesNotImplementDriverFactoryInterface()
Expand Down

0 comments on commit e2a950c

Please sign in to comment.