Skip to content

Commit 64fe6d4

Browse files
mkoprekMaciej Koprek
andauthored
Remove deprecations for Symfony 7.4 - XML is deprecated (#740)
* Remove deprecations for Symfony 7.4 - XML is deprecated * Unused use --------- Co-authored-by: Maciej Koprek <maciej.koprek@fundrbird.com>
1 parent 0efac86 commit 64fe6d4

File tree

3 files changed

+87
-79
lines changed

3 files changed

+87
-79
lines changed

DependencyInjection/OldSoundRabbitMqExtension.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Symfony\Component\DependencyInjection\ContainerInterface;
1212
use Symfony\Component\DependencyInjection\Definition;
1313
use Symfony\Component\DependencyInjection\Extension\Extension;
14-
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
14+
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
1515
use Symfony\Component\DependencyInjection\Reference;
1616

1717
/**
@@ -40,8 +40,11 @@ public function load(array $configs, ContainerBuilder $container): void
4040
{
4141
$this->container = $container;
4242

43-
$loader = new XmlFileLoader($this->container, new FileLocator([__DIR__ . '/../Resources/config']));
44-
$loader->load('rabbitmq.xml');
43+
$loader = new YamlFileLoader(
44+
$container,
45+
new FileLocator(__DIR__ . '/../Resources/config')
46+
);
47+
$loader->load('services.yaml');
4548

4649
$configuration = $this->getConfiguration($configs, $container);
4750
$this->config = $this->processConfiguration($configuration, $configs);

Resources/config/rabbitmq.xml

Lines changed: 0 additions & 76 deletions
This file was deleted.

Resources/config/services.yaml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
parameters:
2+
old_sound_rabbit_mq.connection.class: PhpAmqpLib\Connection\AMQPStreamConnection
3+
old_sound_rabbit_mq.socket_connection.class: PhpAmqpLib\Connection\AMQPSocketConnection
4+
old_sound_rabbit_mq.lazy.connection.class: PhpAmqpLib\Connection\AMQPLazyConnection
5+
old_sound_rabbit_mq.lazy.socket_connection.class: PhpAmqpLib\Connection\AMQPLazySocketConnection
6+
old_sound_rabbit_mq.connection_factory.class: OldSound\RabbitMqBundle\RabbitMq\AMQPConnectionFactory
7+
old_sound_rabbit_mq.binding.class: OldSound\RabbitMqBundle\RabbitMq\Binding
8+
old_sound_rabbit_mq.producer.class: OldSound\RabbitMqBundle\RabbitMq\Producer
9+
old_sound_rabbit_mq.consumer.class: OldSound\RabbitMqBundle\RabbitMq\Consumer
10+
old_sound_rabbit_mq.multi_consumer.class: OldSound\RabbitMqBundle\RabbitMq\MultipleConsumer
11+
old_sound_rabbit_mq.dynamic_consumer.class: OldSound\RabbitMqBundle\RabbitMq\DynamicConsumer
12+
old_sound_rabbit_mq.batch_consumer.class: OldSound\RabbitMqBundle\RabbitMq\BatchConsumer
13+
old_sound_rabbit_mq.anon_consumer.class: OldSound\RabbitMqBundle\RabbitMq\AnonConsumer
14+
old_sound_rabbit_mq.rpc_client.class: OldSound\RabbitMqBundle\RabbitMq\RpcClient
15+
old_sound_rabbit_mq.rpc_server.class: OldSound\RabbitMqBundle\RabbitMq\RpcServer
16+
old_sound_rabbit_mq.logged.channel.class: OldSound\RabbitMqBundle\RabbitMq\AMQPLoggedChannel
17+
old_sound_rabbit_mq.data_collector.class: OldSound\RabbitMqBundle\DataCollector\MessageDataCollector
18+
old_sound_rabbit_mq.parts_holder.class: OldSound\RabbitMqBundle\RabbitMq\AmqpPartsHolder
19+
old_sound_rabbit_mq.fallback.class: OldSound\RabbitMqBundle\RabbitMq\Fallback
20+
21+
services:
22+
old_sound_rabbit_mq.data_collector:
23+
class: '%old_sound_rabbit_mq.data_collector.class%'
24+
arguments:
25+
- []
26+
tags:
27+
- { name: 'data_collector', template: '@OldSoundRabbitMq/Collector/collector.html.twig', id: 'rabbit_mq' }
28+
29+
old_sound_rabbit_mq.parts_holder:
30+
class: '%old_sound_rabbit_mq.parts_holder.class%'
31+
public: true
32+
33+
old_sound_rabbit_mq.anon_consumer_command:
34+
class: OldSound\RabbitMqBundle\Command\AnonConsumerCommand
35+
tags:
36+
- { name: 'console.command', command: 'rabbitmq:anon-consumer' }
37+
38+
old_sound_rabbit_mq.batch_consumer_command:
39+
class: OldSound\RabbitMqBundle\Command\BatchConsumerCommand
40+
tags:
41+
- { name: 'console.command', command: 'rabbitmq:batch:consumer' }
42+
43+
old_sound_rabbit_mq.consumer_command:
44+
class: OldSound\RabbitMqBundle\Command\ConsumerCommand
45+
tags:
46+
- { name: 'console.command', command: 'rabbitmq:consumer' }
47+
48+
old_sound_rabbit_mq.delete_command:
49+
class: OldSound\RabbitMqBundle\Command\DeleteCommand
50+
tags:
51+
- { name: 'console.command', command: 'rabbitmq:delete' }
52+
53+
old_sound_rabbit_mq.dynamic_consumer_command:
54+
class: OldSound\RabbitMqBundle\Command\DynamicConsumerCommand
55+
tags:
56+
- { name: 'console.command', command: 'rabbitmq:dynamic-consumer' }
57+
58+
old_sound_rabbit_mq.multiple_consumer_command:
59+
class: OldSound\RabbitMqBundle\Command\MultipleConsumerCommand
60+
tags:
61+
- { name: 'console.command', command: 'rabbitmq:multiple-consumer' }
62+
63+
old_sound_rabbit_mq.purge_consumer_command:
64+
class: OldSound\RabbitMqBundle\Command\PurgeConsumerCommand
65+
tags:
66+
- { name: 'console.command', command: 'rabbitmq:purge' }
67+
68+
old_sound_rabbit_mq.command.rpc_server_command:
69+
class: OldSound\RabbitMqBundle\Command\RpcServerCommand
70+
tags:
71+
- { name: 'console.command', command: 'rabbitmq:rpc-server' }
72+
73+
old_sound_rabbit_mq.command.setup_fabric_command:
74+
class: OldSound\RabbitMqBundle\Command\SetupFabricCommand
75+
tags:
76+
- { name: 'console.command', command: 'rabbitmq:setup-fabric' }
77+
78+
old_sound_rabbit_mq.command.std_in_producer_command:
79+
class: OldSound\RabbitMqBundle\Command\StdInProducerCommand
80+
tags:
81+
- { name: 'console.command', command: 'rabbitmq:stdin-producer' }

0 commit comments

Comments
 (0)