Skip to content

Commit 2de28e5

Browse files
committed
Merge branch 'master' of github.com:php-enqueue/enqueue-dev
2 parents fd44768 + f7ebcea commit 2de28e5

8 files changed

+25
-15
lines changed

Diff for: phpstan.neon

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
parameters:
22
excludes_analyse:
3-
- bin/pre-commit
3+
- docs
4+
- bin
5+
- docker
6+
- var
47
- pkg/amqp-lib/tutorial
58
- pkg/enqueue-bundle/Tests/Functional/App/AsyncListener.php
69
- pkg/enqueue/Util/UUID.php

Diff for: pkg/enqueue/Symfony/Client/ConsumeMessagesCommand.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class ConsumeMessagesCommand extends Command
2424
use SetupBrokerExtensionCommandTrait;
2525
use QueueConsumerOptionsCommandTrait;
2626

27+
protected static $defaultName = 'enqueue:consume';
28+
2729
/**
2830
* @var QueueConsumerInterface
2931
*/
@@ -56,7 +58,7 @@ public function __construct(
5658
QueueMetaRegistry $queueMetaRegistry,
5759
DriverInterface $driver
5860
) {
59-
parent::__construct(null);
61+
parent::__construct(static::$defaultName);
6062

6163
$this->consumer = $consumer;
6264
$this->processor = $processor;
@@ -74,7 +76,6 @@ protected function configure()
7476
$this->configureQueueConsumerOptions();
7577

7678
$this
77-
->setName('enqueue:consume')
7879
->setAliases(['enq:c'])
7980
->setDescription('A client\'s worker that processes messages. '.
8081
'By default it connects to default queue. '.

Diff for: pkg/enqueue/Symfony/Client/Meta/QueuesCommand.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
class QueuesCommand extends Command
1313
{
14+
protected static $defaultName = 'enqueue:queues';
15+
1416
/**
1517
* @var QueueMetaRegistry
1618
*/
@@ -21,7 +23,7 @@ class QueuesCommand extends Command
2123
*/
2224
public function __construct(QueueMetaRegistry $queueRegistry)
2325
{
24-
parent::__construct(null);
26+
parent::__construct(static::$defaultName);
2527

2628
$this->queueMetaRegistry = $queueRegistry;
2729
}
@@ -32,7 +34,6 @@ public function __construct(QueueMetaRegistry $queueRegistry)
3234
protected function configure()
3335
{
3436
$this
35-
->setName('enqueue:queues')
3637
->setAliases([
3738
'enq:m:q',
3839
'debug:enqueue:queues',

Diff for: pkg/enqueue/Symfony/Client/Meta/TopicsCommand.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
class TopicsCommand extends Command
1313
{
14+
protected static $defaultName = 'enqueue:topics';
15+
1416
/**
1517
* @var TopicMetaRegistry
1618
*/
@@ -21,7 +23,7 @@ class TopicsCommand extends Command
2123
*/
2224
public function __construct(TopicMetaRegistry $topicRegistry)
2325
{
24-
parent::__construct(null);
26+
parent::__construct(static::$defaultName);
2527

2628
$this->topicRegistry = $topicRegistry;
2729
}
@@ -32,7 +34,6 @@ public function __construct(TopicMetaRegistry $topicRegistry)
3234
protected function configure()
3335
{
3436
$this
35-
->setName('enqueue:topics')
3637
->setAliases([
3738
'enq:m:t',
3839
'debug:enqueue:topics',

Diff for: pkg/enqueue/Symfony/Client/ProduceMessageCommand.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
class ProduceMessageCommand extends Command
1212
{
13+
protected static $defaultName = 'enqueue:produce';
14+
1315
/**
1416
* @var ProducerInterface
1517
*/
@@ -20,7 +22,7 @@ class ProduceMessageCommand extends Command
2022
*/
2123
public function __construct(ProducerInterface $producer)
2224
{
23-
parent::__construct(null);
25+
parent::__construct(static::$defaultName);
2426

2527
$this->producer = $producer;
2628
}
@@ -31,7 +33,6 @@ public function __construct(ProducerInterface $producer)
3133
protected function configure()
3234
{
3335
$this
34-
->setName('enqueue:produce')
3536
->setAliases(['enq:p'])
3637
->setDescription('A command to send a message to topic')
3738
->addArgument('topic', InputArgument::REQUIRED, 'A topic to send message to')

Diff for: pkg/enqueue/Symfony/Client/SetupBrokerCommand.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
class SetupBrokerCommand extends Command
1212
{
13+
protected static $defaultName = 'enqueue:setup-broker';
14+
1315
/**
1416
* @var DriverInterface
1517
*/
@@ -20,7 +22,7 @@ class SetupBrokerCommand extends Command
2022
*/
2123
public function __construct(DriverInterface $driver)
2224
{
23-
parent::__construct(null);
25+
parent::__construct(static::$defaultName);
2426

2527
$this->driver = $driver;
2628
}
@@ -31,7 +33,6 @@ public function __construct(DriverInterface $driver)
3133
protected function configure()
3234
{
3335
$this
34-
->setName('enqueue:setup-broker')
3536
->setAliases(['enq:sb'])
3637
->setDescription('Creates all required queues')
3738
;

Diff for: pkg/enqueue/Symfony/Consumption/ConsumeMessagesCommand.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class ConsumeMessagesCommand extends Command implements ContainerAwareInterface
1818
use LimitsExtensionsCommandTrait;
1919
use QueueConsumerOptionsCommandTrait;
2020

21+
protected static $defaultName = 'enqueue:transport:consume';
22+
2123
/**
2224
* @var QueueConsumerInterface
2325
*/
@@ -28,7 +30,7 @@ class ConsumeMessagesCommand extends Command implements ContainerAwareInterface
2830
*/
2931
public function __construct(QueueConsumerInterface $consumer)
3032
{
31-
parent::__construct(null);
33+
parent::__construct(static::$defaultName);
3234

3335
$this->consumer = $consumer;
3436
}
@@ -42,7 +44,6 @@ protected function configure()
4244
$this->configureQueueConsumerOptions();
4345

4446
$this
45-
->setName('enqueue:transport:consume')
4647
->setDescription('A worker that consumes message from a broker. '.
4748
'To use this broker you have to configure queue consumer before adding to the command')
4849
;

Diff for: pkg/enqueue/Symfony/Consumption/ContainerAwareConsumeMessagesCommand.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class ContainerAwareConsumeMessagesCommand extends Command implements ContainerA
2222
use LimitsExtensionsCommandTrait;
2323
use QueueConsumerOptionsCommandTrait;
2424

25+
protected static $defaultName = 'enqueue:transport:consume';
26+
2527
/**
2628
* @var QueueConsumerInterface
2729
*/
@@ -34,7 +36,7 @@ class ContainerAwareConsumeMessagesCommand extends Command implements ContainerA
3436
*/
3537
public function __construct(QueueConsumerInterface $consumer)
3638
{
37-
parent::__construct(null);
39+
parent::__construct(static::$defaultName);
3840

3941
$this->consumer = $consumer;
4042
}
@@ -48,7 +50,6 @@ protected function configure()
4850
$this->configureQueueConsumerOptions();
4951

5052
$this
51-
->setName('enqueue:transport:consume')
5253
->setDescription('A worker that consumes message from a broker. '.
5354
'To use this broker you have to explicitly set a queue to consume from '.
5455
'and a message processor service')

0 commit comments

Comments
 (0)