add support for messenger:stats command added in 6.2 #100
Annotations
12 warnings
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, codecov/codecov-action@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, codecov/codecov-action@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Infection:
src/MongoTransport.php#L47
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
public function get() : iterable
{
$now = new DateTime();
- $redeliverLimit = (clone $now)->modify(sprintf('-%d seconds', $this->options['redeliver_timeout']));
+ $redeliverLimit = $now->modify(sprintf('-%d seconds', $this->options['redeliver_timeout']));
$options = ['sort' => ['available_at' => 1], 'returnDocument' => FindOneAndUpdate::RETURN_DOCUMENT_AFTER];
if ($this->options['enable_writeConcern_majority']) {
$options['writeConcern'] = new WriteConcern(WriteConcern::MAJORITY);
|
Infection:
src/MongoTransport.php#L52
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
{
$now = new DateTime();
$redeliverLimit = (clone $now)->modify(sprintf('-%d seconds', $this->options['redeliver_timeout']));
- $options = ['sort' => ['available_at' => 1], 'returnDocument' => FindOneAndUpdate::RETURN_DOCUMENT_AFTER];
+ $options = ['returnDocument' => FindOneAndUpdate::RETURN_DOCUMENT_AFTER];
if ($this->options['enable_writeConcern_majority']) {
$options['writeConcern'] = new WriteConcern(WriteConcern::MAJORITY);
}
|
Infection:
src/MongoTransport.php#L53
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
{
$now = new DateTime();
$redeliverLimit = (clone $now)->modify(sprintf('-%d seconds', $this->options['redeliver_timeout']));
- $options = ['sort' => ['available_at' => 1], 'returnDocument' => FindOneAndUpdate::RETURN_DOCUMENT_AFTER];
+ $options = ['sort' => [], 'returnDocument' => FindOneAndUpdate::RETURN_DOCUMENT_AFTER];
if ($this->options['enable_writeConcern_majority']) {
$options['writeConcern'] = new WriteConcern(WriteConcern::MAJORITY);
}
|
Infection:
src/MongoTransport.php#L54
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
{
$now = new DateTime();
$redeliverLimit = (clone $now)->modify(sprintf('-%d seconds', $this->options['redeliver_timeout']));
- $options = ['sort' => ['available_at' => 1], 'returnDocument' => FindOneAndUpdate::RETURN_DOCUMENT_AFTER];
+ $options = ['sort' => ['available_at' => 0], 'returnDocument' => FindOneAndUpdate::RETURN_DOCUMENT_AFTER];
if ($this->options['enable_writeConcern_majority']) {
$options['writeConcern'] = new WriteConcern(WriteConcern::MAJORITY);
}
|
Infection:
src/MongoTransport.php#L54
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
{
$now = new DateTime();
$redeliverLimit = (clone $now)->modify(sprintf('-%d seconds', $this->options['redeliver_timeout']));
- $options = ['sort' => ['available_at' => 1], 'returnDocument' => FindOneAndUpdate::RETURN_DOCUMENT_AFTER];
+ $options = ['sort' => ['available_at' => 2], 'returnDocument' => FindOneAndUpdate::RETURN_DOCUMENT_AFTER];
if ($this->options['enable_writeConcern_majority']) {
$options['writeConcern'] = new WriteConcern(WriteConcern::MAJORITY);
}
|
Infection:
src/MongoTransport.php#L59
Escaped Mutant for Mutator "IfNegation":
--- Original
+++ New
@@ @@
$now = new DateTime();
$redeliverLimit = (clone $now)->modify(sprintf('-%d seconds', $this->options['redeliver_timeout']));
$options = ['sort' => ['available_at' => 1], 'returnDocument' => FindOneAndUpdate::RETURN_DOCUMENT_AFTER];
- if ($this->options['enable_writeConcern_majority']) {
+ if (!$this->options['enable_writeConcern_majority']) {
$options['writeConcern'] = new WriteConcern(WriteConcern::MAJORITY);
}
$document = $this->collection->findOneAndUpdate(['$or' => [['delivered_at' => null], ['delivered_at' => ['$lt' => new UTCDateTime($redeliverLimit)]]], 'queue_name' => $this->options['queue'], 'available_at' => ['$lte' => new UTCDateTime($now)]], ['$set' => ['consumer_id' => $this->consumerId, 'delivered_at' => new UTCDateTime($now)]], $options);
|
Infection:
src/MongoTransport.php#L64
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if ($this->options['enable_writeConcern_majority']) {
$options['writeConcern'] = new WriteConcern(WriteConcern::MAJORITY);
}
- $document = $this->collection->findOneAndUpdate(['$or' => [['delivered_at' => null], ['delivered_at' => ['$lt' => new UTCDateTime($redeliverLimit)]]], 'queue_name' => $this->options['queue'], 'available_at' => ['$lte' => new UTCDateTime($now)]], ['$set' => ['consumer_id' => $this->consumerId, 'delivered_at' => new UTCDateTime($now)]], $options);
+ $document = $this->collection->findOneAndUpdate(['queue_name' => $this->options['queue'], 'available_at' => ['$lte' => new UTCDateTime($now)]], ['$set' => ['consumer_id' => $this->consumerId, 'delivered_at' => new UTCDateTime($now)]], $options);
if (!is_array($document)) {
return [];
}
|
Infection:
src/MongoTransport.php#L65
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if ($this->options['enable_writeConcern_majority']) {
$options['writeConcern'] = new WriteConcern(WriteConcern::MAJORITY);
}
- $document = $this->collection->findOneAndUpdate(['$or' => [['delivered_at' => null], ['delivered_at' => ['$lt' => new UTCDateTime($redeliverLimit)]]], 'queue_name' => $this->options['queue'], 'available_at' => ['$lte' => new UTCDateTime($now)]], ['$set' => ['consumer_id' => $this->consumerId, 'delivered_at' => new UTCDateTime($now)]], $options);
+ $document = $this->collection->findOneAndUpdate(['$or' => [['delivered_at' => ['$lt' => new UTCDateTime($redeliverLimit)]]], 'queue_name' => $this->options['queue'], 'available_at' => ['$lte' => new UTCDateTime($now)]], ['$set' => ['consumer_id' => $this->consumerId, 'delivered_at' => new UTCDateTime($now)]], $options);
if (!is_array($document)) {
return [];
}
|
Infection:
src/MongoTransport.php#L66
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if ($this->options['enable_writeConcern_majority']) {
$options['writeConcern'] = new WriteConcern(WriteConcern::MAJORITY);
}
- $document = $this->collection->findOneAndUpdate(['$or' => [['delivered_at' => null], ['delivered_at' => ['$lt' => new UTCDateTime($redeliverLimit)]]], 'queue_name' => $this->options['queue'], 'available_at' => ['$lte' => new UTCDateTime($now)]], ['$set' => ['consumer_id' => $this->consumerId, 'delivered_at' => new UTCDateTime($now)]], $options);
+ $document = $this->collection->findOneAndUpdate(['$or' => [[], ['delivered_at' => ['$lt' => new UTCDateTime($redeliverLimit)]]], 'queue_name' => $this->options['queue'], 'available_at' => ['$lte' => new UTCDateTime($now)]], ['$set' => ['consumer_id' => $this->consumerId, 'delivered_at' => new UTCDateTime($now)]], $options);
if (!is_array($document)) {
return [];
}
|
Infection:
src/MongoTransport.php#L69
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if ($this->options['enable_writeConcern_majority']) {
$options['writeConcern'] = new WriteConcern(WriteConcern::MAJORITY);
}
- $document = $this->collection->findOneAndUpdate(['$or' => [['delivered_at' => null], ['delivered_at' => ['$lt' => new UTCDateTime($redeliverLimit)]]], 'queue_name' => $this->options['queue'], 'available_at' => ['$lte' => new UTCDateTime($now)]], ['$set' => ['consumer_id' => $this->consumerId, 'delivered_at' => new UTCDateTime($now)]], $options);
+ $document = $this->collection->findOneAndUpdate(['$or' => [['delivered_at' => null], []], 'queue_name' => $this->options['queue'], 'available_at' => ['$lte' => new UTCDateTime($now)]], ['$set' => ['consumer_id' => $this->consumerId, 'delivered_at' => new UTCDateTime($now)]], $options);
if (!is_array($document)) {
return [];
}
|
Loading