Skip to content

Commit

Permalink
Merge pull request #500 from caciobanu/master
Browse files Browse the repository at this point in the history
Fixes for Symfony 4
  • Loading branch information
stloyd authored Dec 7, 2017
2 parents 58eb517 + f8834aa commit 8d715e9
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
1 change: 1 addition & 0 deletions DependencyInjection/OldSoundRabbitMqExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ protected function loadProducers()
if ($this->config['sandbox'] == false) {
foreach ($this->config['producers'] as $key => $producer) {
$definition = new Definition($producer['class']);
$definition->setPublic(true);
$definition->addTag('old_sound_rabbit_mq.base_amqp');
$definition->addTag('old_sound_rabbit_mq.producer');
//this producer doesn't define an exchange -> using AMQP Default
Expand Down
42 changes: 41 additions & 1 deletion Resources/config/rabbitmq.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,48 @@
<argument type="collection" />
<tag name="data_collector" template="OldSoundRabbitMqBundle:Collector:collector.html.twig" id="rabbit_mq" />
</service>

<service id="old_sound_rabbit_mq.parts_holder" class="%old_sound_rabbit_mq.parts_holder.class%" />

<service id="old_sound_rabbit_mq.anon_consumer_command" class="OldSound\RabbitMqBundle\Command\AnonConsumerCommand">
<tag name="console.command" command="rabbitmq:anon-consumer" />
</service>

<service id="old_sound_rabbit_mq.batch_consumer_command" class="OldSound\RabbitMqBundle\Command\BatchConsumerCommand">
<tag name="console.command" command="rabbitmq:batch:consumer" />
</service>

<service id="old_sound_rabbit_mq.consumer_command" class="OldSound\RabbitMqBundle\Command\ConsumerCommand">
<tag name="console.command" command="rabbitmq:consumer" />
</service>

<service id="old_sound_rabbit_mq.delete_command" class="OldSound\RabbitMqBundle\Command\DeleteCommand">
<tag name="console.command" command="rabbitmq:delete" />
</service>

<service id="old_sound_rabbit_mq.dynamic_consumer_command" class="OldSound\RabbitMqBundle\Command\DynamicConsumerCommand">
<tag name="console.command" command="rabbitmq:dynamic-consumer" />
</service>

<service id="old_sound_rabbit_mq.multiple_consumer_command" class="OldSound\RabbitMqBundle\Command\MultipleConsumerCommand">
<tag name="console.command" command="rabbitmq:multiple-consumer" />
</service>

<service id="old_sound_rabbit_mq.purge_consumer_command" class="OldSound\RabbitMqBundle\Command\PurgeConsumerCommand">
<tag name="console.command" command="rabbitmq:multiple-consumer" />
</service>

<service id="old_sound_rabbit_mq.command.rpc_server_command" class="OldSound\RabbitMqBundle\Command\RpcServerCommand">
<tag name="console.command" command="rabbitmq:rpc-server" />
</service>

<service id="old_sound_rabbit_mq.command.setup_fabric_command" class="OldSound\RabbitMqBundle\Command\SetupFabricCommand">
<tag name="console.command" command="rabbitmq:setup-fabric" />
</service>

<service id="old_sound_rabbit_mq.command.std_in_producer_command" class="OldSound\RabbitMqBundle\Command\StdInProducerCommand">
<tag name="console.command" command="rabbitmq:stdin-producer" />
</service>
</services>

</container>
2 changes: 1 addition & 1 deletion Tests/DependencyInjection/Fixtures/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ old_sound_rabbit_mq:
queue_options_provider: bar.dynamic.provider
bindings:
- {exchange: foo, destination: bar, routing_key: baz}
- {exchange: moo, connection: default2, destination: cow, nowait: true, destination_is_exchange: true, arguments: {moo:cow}}
- {exchange: moo, connection: default2, destination: cow, nowait: true, destination_is_exchange: true, arguments: {moo: cow}}
anon_consumers:
foo_anon_consumer:
connection: foo_connection
Expand Down

0 comments on commit 8d715e9

Please sign in to comment.