Skip to content

Commit 8331307

Browse files
committed
[enqueue] Do not use deprecated classes.
1 parent 8ce999c commit 8331307

42 files changed

Lines changed: 141 additions & 141 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎pkg/enqueue/Client/ConsumptionExtension/ExclusiveCommandExtension.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(DriverInterface $driver)
3131
public function onPreReceived(Context $context)
3232
{
3333
$message = $context->getInteropMessage();
34-
$queue = $context->getPsrQueue();
34+
$queue = $context->getInteropQueue();
3535

3636
if ($message->getProperty(Config::PARAMETER_TOPIC_NAME)) {
3737
return;

‎pkg/enqueue/Client/ConsumptionExtension/SetRouterPropertiesExtension.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function onPreReceived(Context $context)
3434

3535
$config = $this->driver->getConfig();
3636
$queue = $this->driver->createQueue($config->getRouterQueueName());
37-
if ($context->getPsrQueue()->getQueueName() != $queue->getQueueName()) {
37+
if ($context->getInteropQueue()->getQueueName() != $queue->getQueueName()) {
3838
return;
3939
}
4040

‎pkg/enqueue/Client/Driver/AmqpDriver.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Interop\Queue\Destination;
1515
use Interop\Queue\Message as InteropMessage;
1616
use Interop\Queue\Producer as InteropProducer;
17-
use Interop\Queue\PsrQueue;
17+
use Interop\Queue\Queue as InteropQueue;
1818
use Psr\Log\LoggerInterface;
1919
use Psr\Log\NullLogger;
2020

@@ -110,7 +110,7 @@ protected function createRouterTopic(): Destination
110110
/**
111111
* @return AmqpQueue
112112
*/
113-
protected function doCreateQueue(string $transportQueueName): PsrQueue
113+
protected function doCreateQueue(string $transportQueueName): InteropQueue
114114
{
115115
/** @var AmqpQueue $queue */
116116
$queue = parent::doCreateQueue($transportQueueName);

‎pkg/enqueue/Client/Driver/GenericDriver.php‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
use Interop\Queue\Destination;
1515
use Interop\Queue\Message as InteropMessage;
1616
use Interop\Queue\Producer as InteropProducer;
17-
use Interop\Queue\PsrQueue;
18-
use Interop\Queue\PsrTopic;
17+
use Interop\Queue\Queue as InteropQueue;
18+
use Interop\Queue\Topic as InteropTopic;
1919
use Psr\Log\LoggerInterface;
2020

2121
class GenericDriver implements DriverInterface
@@ -66,7 +66,7 @@ public function sendToProcessor(Message $message): void
6666
$topic = $message->getProperty(Config::PARAMETER_TOPIC_NAME);
6767
$command = $message->getProperty(Config::PARAMETER_COMMAND_NAME);
6868

69-
/** @var PsrQueue $queue */
69+
/** @var InteropQueue $queue */
7070
$queue = null;
7171
if ($topic && $processor = $message->getProperty(Config::PARAMETER_PROCESSOR_NAME)) {
7272
$route = $this->routeCollection->topicAndProcessor($topic, $processor);
@@ -117,14 +117,14 @@ public function setupBroker(LoggerInterface $logger = null): void
117117
{
118118
}
119119

120-
public function createQueue(string $clientQueueName, bool $prefix = true): PsrQueue
120+
public function createQueue(string $clientQueueName, bool $prefix = true): InteropQueue
121121
{
122122
$transportName = $this->createTransportQueueName($clientQueueName, $prefix);
123123

124124
return $this->doCreateQueue($transportName);
125125
}
126126

127-
public function createRouteQueue(Route $route): PsrQueue
127+
public function createRouteQueue(Route $route): InteropQueue
128128
{
129129
$transportName = $this->createTransportQueueName(
130130
$route->getQueue() ?: $this->config->getDefaultProcessorQueueName(),
@@ -218,7 +218,7 @@ protected function doSendToRouter(InteropProducer $producer, Destination $topic,
218218
$producer->send($topic, $transportMessage);
219219
}
220220

221-
protected function doSendToProcessor(InteropProducer $producer, PsrQueue $queue, InteropMessage $transportMessage): void
221+
protected function doSendToProcessor(InteropProducer $producer, InteropQueue $queue, InteropMessage $transportMessage): void
222222
{
223223
$producer->send($queue, $transportMessage);
224224
}
@@ -243,12 +243,12 @@ protected function createTransportQueueName(string $name, bool $prefix): string
243243
return strtolower(implode($this->config->getSeparator(), array_filter([$clientPrefix, $clientAppName, $name])));
244244
}
245245

246-
protected function doCreateQueue(string $transportQueueName): PsrQueue
246+
protected function doCreateQueue(string $transportQueueName): InteropQueue
247247
{
248248
return $this->context->createQueue($transportQueueName);
249249
}
250250

251-
protected function doCreateTopic(string $transportTopicName): PsrTopic
251+
protected function doCreateTopic(string $transportTopicName): InteropTopic
252252
{
253253
return $this->context->createTopic($transportTopicName);
254254
}

‎pkg/enqueue/Client/Driver/RabbitMqDriver.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
namespace Enqueue\Client\Driver;
44

55
use Interop\Amqp\AmqpQueue;
6-
use Interop\Queue\PsrQueue;
6+
use Interop\Queue\Queue as InteropQueue;
77

88
class RabbitMqDriver extends AmqpDriver
99
{
1010
/**
1111
* @return AmqpQueue
1212
*/
13-
protected function doCreateQueue(string $transportQueueName): PsrQueue
13+
protected function doCreateQueue(string $transportQueueName): InteropQueue
1414
{
1515
$queue = parent::doCreateQueue($transportQueueName);
1616
$queue->setArguments(['x-max-priority' => 4]);

‎pkg/enqueue/Client/Driver/RabbitMqStompDriver.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Interop\Queue\Destination;
1313
use Interop\Queue\Message as InteropMessage;
1414
use Interop\Queue\Producer as InteropProducer;
15-
use Interop\Queue\PsrQueue;
15+
use Interop\Queue\Queue as InteropQueue;
1616
use Psr\Log\LoggerInterface;
1717
use Psr\Log\NullLogger;
1818

@@ -138,7 +138,7 @@ public function setupBroker(LoggerInterface $logger = null): void
138138
/**
139139
* @return StompDestination
140140
*/
141-
protected function doCreateQueue(string $transportQueueName): PsrQueue
141+
protected function doCreateQueue(string $transportQueueName): InteropQueue
142142
{
143143
$queue = parent::doCreateQueue($transportQueueName);
144144
$queue->setHeader('x-max-priority', 4);
@@ -167,7 +167,7 @@ protected function doSendToRouter(InteropProducer $producer, Destination $topic,
167167
* @param StompDestination $destination
168168
* @param StompMessage $transportMessage
169169
*/
170-
protected function doSendToProcessor(InteropProducer $producer, PsrQueue $destination, InteropMessage $transportMessage): void
170+
protected function doSendToProcessor(InteropProducer $producer, InteropQueue $destination, InteropMessage $transportMessage): void
171171
{
172172
if ($delay = $transportMessage->getProperty('X-Enqueue-Delay')) {
173173
$producer->setDeliveryDelay(null);

‎pkg/enqueue/Client/Driver/SqsDriver.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
/**
1111
* @method SqsContext getContext
12-
* @method SqsDestination createQueue(string $clientQueueName): PsrQueue
12+
* @method SqsDestination createQueue(string $clientQueueName): InteropQueue
1313
*/
1414
class SqsDriver extends GenericDriver
1515
{

‎pkg/enqueue/Client/Driver/StompDriver.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Enqueue\Stomp\StompMessage;
99
use Interop\Queue\Destination;
1010
use Interop\Queue\Message as InteropMessage;
11-
use Interop\Queue\PsrQueue;
11+
use Interop\Queue\Queue as InteropQueue;
1212
use Psr\Log\LoggerInterface;
1313
use Psr\Log\NullLogger;
1414

@@ -43,7 +43,7 @@ public function createTransportMessage(Message $message): InteropMessage
4343
/**
4444
* @return StompDestination
4545
*/
46-
protected function doCreateQueue(string $transportQueueName): PsrQueue
46+
protected function doCreateQueue(string $transportQueueName): InteropQueue
4747
{
4848
/** @var StompDestination $queue */
4949
$queue = parent::doCreateQueue($transportQueueName);

‎pkg/enqueue/Client/DriverFactory.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Enqueue\Dsn\Dsn;
99
use Enqueue\Stomp\StompConnectionFactory;
1010
use Interop\Amqp\AmqpConnectionFactory;
11-
use Interop\Queue\PsrConnectionFactory;
11+
use Interop\Queue\ConnectionFactory;
1212

1313
final class DriverFactory implements DriverFactoryInterface
1414
{
@@ -28,7 +28,7 @@ public function __construct(Config $config, RouteCollection $routeCollection)
2828
$this->routeCollection = $routeCollection;
2929
}
3030

31-
public function create(PsrConnectionFactory $factory, string $dsn, array $config): DriverInterface
31+
public function create(ConnectionFactory $factory, string $dsn, array $config): DriverInterface
3232
{
3333
$dsn = new Dsn($dsn);
3434

‎pkg/enqueue/Client/DriverFactoryInterface.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace Enqueue\Client;
44

5-
use Interop\Queue\PsrConnectionFactory;
5+
use Interop\Queue\ConnectionFactory;
66

77
interface DriverFactoryInterface
88
{
9-
public function create(PsrConnectionFactory $factory, string $dsn, array $config): DriverInterface;
9+
public function create(ConnectionFactory $factory, string $dsn, array $config): DriverInterface;
1010
}

0 commit comments

Comments
 (0)