Skip to content

Merge pull request #37 from mihaileu/feature/migrate-to-phpunit10 #97

Merge pull request #37 from mihaileu/feature/migrate-to-phpunit10

Merge pull request #37 from mihaileu/feature/migrate-to-phpunit10 #97

Triggered via push January 31, 2024 14:47
Status Success
Total duration 2m 4s
Artifacts

ci.yml

on: push
Matrix: build
Fit to window
Zoom out
Zoom in

Annotations

24 warnings
PHP 8.1
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/.
PHP 8.1
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/
PHP 8.1: src/MongoTransport.php#L46
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);
PHP 8.1: src/MongoTransport.php#L51
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); }
PHP 8.1: 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 = ['sort' => [], 'returnDocument' => FindOneAndUpdate::RETURN_DOCUMENT_AFTER]; if ($this->options['enable_writeConcern_majority']) { $options['writeConcern'] = new WriteConcern(WriteConcern::MAJORITY); }
PHP 8.1: src/MongoTransport.php#L53
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); }
PHP 8.1: src/MongoTransport.php#L53
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); }
PHP 8.1: src/MongoTransport.php#L58
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);
PHP 8.1: src/MongoTransport.php#L63
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 []; }
PHP 8.1: 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(['$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 []; }
PHP 8.1: 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 []; }
PHP 8.1: src/MongoTransport.php#L68
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 []; }
PHP 8.3
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/.
PHP 8.3
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/
PHP 8.3: src/MongoTransport.php#L46
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);
PHP 8.3: src/MongoTransport.php#L51
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); }
PHP 8.3: 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 = ['sort' => [], 'returnDocument' => FindOneAndUpdate::RETURN_DOCUMENT_AFTER]; if ($this->options['enable_writeConcern_majority']) { $options['writeConcern'] = new WriteConcern(WriteConcern::MAJORITY); }
PHP 8.3: src/MongoTransport.php#L53
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); }
PHP 8.3: src/MongoTransport.php#L53
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); }
PHP 8.3: src/MongoTransport.php#L58
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);
PHP 8.3: src/MongoTransport.php#L63
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 []; }
PHP 8.3: 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(['$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 []; }
PHP 8.3: 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 []; }
PHP 8.3: src/MongoTransport.php#L68
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 []; }