Skip to content

fix: do not try to generate next-page token without proper orderings #24

fix: do not try to generate next-page token without proper orderings

fix: do not try to generate next-page token without proper orderings #24

Triggered via push December 12, 2023 00:30
Status Failure
Total duration 2m 4s
Artifacts

test.yml

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

Annotations

3 errors and 20 warnings
PHP 8.2
Process completed with exit code 1.
PHP 8.1
The job was canceled because "_8_2" failed.
PHP 8.1
The operation was canceled.
PHP 8.2: src/Doctrine/DBAL/PagerIterator.php#L45
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function __construct(QueryBuilder $queryBuilder, Orderings|array $orderBy = new Orderings([])) { - $this->queryBuilder = clone $queryBuilder; + $this->queryBuilder = $queryBuilder; $this->totalCount = null; $this->apply(null); parent::__construct([], $orderBy);
PHP 8.2: src/Doctrine/DBAL/PagerIterator.php#L90
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ */ protected function filterObjects(array $objects) : array { - if ($this->currentPage instanceof PageToken) { + if (false) { return parent::filterObjects($objects); } return $objects;
PHP 8.2: src/Doctrine/DBAL/PagerIterator.php#L102
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ protected function getObjects() : array { - $queryBuilder = clone $this->queryBuilder; + $queryBuilder = $this->queryBuilder; $queryBuilder->setFirstResult(0); foreach ($this->orderBy as $key => [$field, $direction]) { $method = $key === 0 ? 'orderBy' : 'addOrderBy';
PHP 8.2: src/Doctrine/DBAL/PagerIterator.php#L103
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ protected function getObjects() : array { $queryBuilder = clone $this->queryBuilder; - $queryBuilder->setFirstResult(0); + $queryBuilder->setFirstResult(1); foreach ($this->orderBy as $key => [$field, $direction]) { $method = $key === 0 ? 'orderBy' : 'addOrderBy'; $queryBuilder->{$method}($field, strtoupper($direction));
PHP 8.2: src/Doctrine/DBAL/PagerIterator.php#L103
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ protected function getObjects() : array { $queryBuilder = clone $this->queryBuilder; - $queryBuilder->setFirstResult(0); + foreach ($this->orderBy as $key => [$field, $direction]) { $method = $key === 0 ? 'orderBy' : 'addOrderBy'; $queryBuilder->{$method}($field, strtoupper($direction));
PHP 8.2: src/Doctrine/DBAL/PagerIterator.php#L105
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ $queryBuilder = clone $this->queryBuilder; $queryBuilder->setFirstResult(0); foreach ($this->orderBy as $key => [$field, $direction]) { - $method = $key === 0 ? 'orderBy' : 'addOrderBy'; + $method = $key === -1 ? 'orderBy' : 'addOrderBy'; $queryBuilder->{$method}($field, strtoupper($direction)); } $limit = $this->pageSize;
PHP 8.2: src/Doctrine/ORM/PagerIterator.php#L54
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function __construct(QueryBuilder $searchable, Orderings|array $orderBy = new Orderings([])) { - $this->queryBuilder = clone $searchable; + $this->queryBuilder = $searchable; $this->totalCount = null; $this->apply(null); parent::__construct([], $orderBy);
PHP 8.2: src/Doctrine/ORM/PagerIterator.php#L81
Escaped Mutant for Mutator "NotIdentical": --- Original +++ New @@ @@ /** @phpstan-param class-string $className */ public function setFetchMode(string $className, string $associationName, string $fetchMode) : void { - if ($fetchMode !== self::FETCH_EAGER && $fetchMode !== self::FETCH_LAZY) { + if ($fetchMode !== self::FETCH_EAGER && $fetchMode === self::FETCH_LAZY) { throw new TypeError(sprintf('Argument #3 (fetchMode) must be one of %s::FETCH_* constants, %s given.', self::class, var_export($fetchMode, true))); } $this->fetchModes[$className][$associationName] = $fetchMode;
PHP 8.2: src/Doctrine/ORM/PagerIterator.php#L81
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation": --- Original +++ New @@ @@ /** @phpstan-param class-string $className */ public function setFetchMode(string $className, string $associationName, string $fetchMode) : void { - if ($fetchMode !== self::FETCH_EAGER && $fetchMode !== self::FETCH_LAZY) { + if (!($fetchMode !== self::FETCH_EAGER) && !($fetchMode !== self::FETCH_LAZY)) { throw new TypeError(sprintf('Argument #3 (fetchMode) must be one of %s::FETCH_* constants, %s given.', self::class, var_export($fetchMode, true))); } $this->fetchModes[$className][$associationName] = $fetchMode;
PHP 8.2: src/Doctrine/ORM/PagerIterator.php#L93
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ */ protected function filterObjects(array $objects) : array { - if ($this->currentPage instanceof PageToken) { + if (false) { return parent::filterObjects($objects); } return $objects;
PHP 8.1: src/Doctrine/DBAL/PagerIterator.php#L45
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function __construct(QueryBuilder $queryBuilder, Orderings|array $orderBy = new Orderings([])) { - $this->queryBuilder = clone $queryBuilder; + $this->queryBuilder = $queryBuilder; $this->totalCount = null; $this->apply(null); parent::__construct([], $orderBy);
PHP 8.1: src/Doctrine/DBAL/PagerIterator.php#L90
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ */ protected function filterObjects(array $objects) : array { - if ($this->currentPage instanceof PageToken) { + if (false) { return parent::filterObjects($objects); } return $objects;
PHP 8.1: src/Doctrine/DBAL/PagerIterator.php#L102
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ protected function getObjects() : array { - $queryBuilder = clone $this->queryBuilder; + $queryBuilder = $this->queryBuilder; $queryBuilder->setFirstResult(0); foreach ($this->orderBy as $key => [$field, $direction]) { $method = $key === 0 ? 'orderBy' : 'addOrderBy';
PHP 8.1: src/Doctrine/DBAL/PagerIterator.php#L103
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ protected function getObjects() : array { $queryBuilder = clone $this->queryBuilder; - $queryBuilder->setFirstResult(0); + $queryBuilder->setFirstResult(1); foreach ($this->orderBy as $key => [$field, $direction]) { $method = $key === 0 ? 'orderBy' : 'addOrderBy'; $queryBuilder->{$method}($field, strtoupper($direction));
PHP 8.1: src/Doctrine/DBAL/PagerIterator.php#L103
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ protected function getObjects() : array { $queryBuilder = clone $this->queryBuilder; - $queryBuilder->setFirstResult(0); + foreach ($this->orderBy as $key => [$field, $direction]) { $method = $key === 0 ? 'orderBy' : 'addOrderBy'; $queryBuilder->{$method}($field, strtoupper($direction));
PHP 8.1: src/Doctrine/DBAL/PagerIterator.php#L105
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ $queryBuilder = clone $this->queryBuilder; $queryBuilder->setFirstResult(0); foreach ($this->orderBy as $key => [$field, $direction]) { - $method = $key === 0 ? 'orderBy' : 'addOrderBy'; + $method = $key === -1 ? 'orderBy' : 'addOrderBy'; $queryBuilder->{$method}($field, strtoupper($direction)); } $limit = $this->pageSize;
PHP 8.1: src/Doctrine/ORM/PagerIterator.php#L54
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function __construct(QueryBuilder $searchable, Orderings|array $orderBy = new Orderings([])) { - $this->queryBuilder = clone $searchable; + $this->queryBuilder = $searchable; $this->totalCount = null; $this->apply(null); parent::__construct([], $orderBy);
PHP 8.1: src/Doctrine/ORM/PagerIterator.php#L81
Escaped Mutant for Mutator "NotIdentical": --- Original +++ New @@ @@ /** @phpstan-param class-string $className */ public function setFetchMode(string $className, string $associationName, string $fetchMode) : void { - if ($fetchMode !== self::FETCH_EAGER && $fetchMode !== self::FETCH_LAZY) { + if ($fetchMode !== self::FETCH_EAGER && $fetchMode === self::FETCH_LAZY) { throw new TypeError(sprintf('Argument #3 (fetchMode) must be one of %s::FETCH_* constants, %s given.', self::class, var_export($fetchMode, true))); } $this->fetchModes[$className][$associationName] = $fetchMode;
PHP 8.1: src/Doctrine/ORM/PagerIterator.php#L81
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation": --- Original +++ New @@ @@ /** @phpstan-param class-string $className */ public function setFetchMode(string $className, string $associationName, string $fetchMode) : void { - if ($fetchMode !== self::FETCH_EAGER && $fetchMode !== self::FETCH_LAZY) { + if (!($fetchMode !== self::FETCH_EAGER) && !($fetchMode !== self::FETCH_LAZY)) { throw new TypeError(sprintf('Argument #3 (fetchMode) must be one of %s::FETCH_* constants, %s given.', self::class, var_export($fetchMode, true))); } $this->fetchModes[$className][$associationName] = $fetchMode;
PHP 8.1: src/Doctrine/ORM/PagerIterator.php#L93
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ */ protected function filterObjects(array $objects) : array { - if ($this->currentPage instanceof PageToken) { + if (false) { return parent::filterObjects($objects); } return $objects;