Skip to content

Add support for nested aggregations #573

Add support for nested aggregations

Add support for nested aggregations #573

Triggered via pull request April 25, 2024 07:57
Status Failure
Total duration 1m 26s
Artifacts

ci.yml

on: pull_request
Matrix: php-tests
Fit to window
Zoom out
Zoom in

Annotations

9 errors and 17 warnings
PHP8.3
Process completed with exit code 1.
PHP8.4
The job was canceled because "_8_3_false" failed.
PHP8.4
Process completed with exit code 1.
PHP8.1
The job was canceled because "_8_3_false" failed.
PHP8.1
Process completed with exit code 1.
PHP8
The job was canceled because "_8_3_false" failed.
PHP8
The operation was canceled.
PHP8.2
The job was canceled because "_8_3_false" failed.
PHP8.2
The operation was canceled.
PHP8.3
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
PHP8.3
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
PHP8.3: src/Application/Results.php#L36
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ $aggregations = []; foreach ($this->rawResults['aggregations'] as $name => $rawAggregation) { if (array_key_exists('doc_count', $rawAggregation)) { - $aggregations = array_merge($aggregations, $this->parseNestedAggregation($rawAggregation)); + $aggregations = $this->parseNestedAggregation($rawAggregation); continue; } $aggregations[] = new AggregationResult($name, $rawAggregation['buckets'] ?? $rawAggregation);
PHP8.3: src/Application/Results.php#L61
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ $aggregations[] = new AggregationResult($nestedAggregationName, $rawNestedAggregation['buckets']); } if (is_array($rawNestedAggregation)) { - $aggregations = array_merge($aggregations, $this->parseNestedAggregation($rawNestedAggregation)); + $aggregations = $aggregations; } } }
PHP8.3: src/Application/Results.php#L66
Escaped Mutant for Mutator "ArrayOneItem": --- Original +++ New @@ @@ } } } - return $aggregations; + return count($aggregations) > 1 ? array_slice($aggregations, 0, 1, true) : $aggregations; } }
PHP8.4: src/Application/Results.php#L36
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ $aggregations = []; foreach ($this->rawResults['aggregations'] as $name => $rawAggregation) { if (array_key_exists('doc_count', $rawAggregation)) { - $aggregations = array_merge($aggregations, $this->parseNestedAggregation($rawAggregation)); + $aggregations = $this->parseNestedAggregation($rawAggregation); continue; } $aggregations[] = new AggregationResult($name, $rawAggregation['buckets'] ?? $rawAggregation);
PHP8.4: src/Application/Results.php#L61
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ $aggregations[] = new AggregationResult($nestedAggregationName, $rawNestedAggregation['buckets']); } if (is_array($rawNestedAggregation)) { - $aggregations = array_merge($aggregations, $this->parseNestedAggregation($rawNestedAggregation)); + $aggregations = $aggregations; } } }
PHP8.4: src/Application/Results.php#L66
Escaped Mutant for Mutator "ArrayOneItem": --- Original +++ New @@ @@ } } } - return $aggregations; + return count($aggregations) > 1 ? array_slice($aggregations, 0, 1, true) : $aggregations; } }
PHP8.1: src/Application/Results.php#L36
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ $aggregations = []; foreach ($this->rawResults['aggregations'] as $name => $rawAggregation) { if (array_key_exists('doc_count', $rawAggregation)) { - $aggregations = array_merge($aggregations, $this->parseNestedAggregation($rawAggregation)); + $aggregations = $this->parseNestedAggregation($rawAggregation); continue; } $aggregations[] = new AggregationResult($name, $rawAggregation['buckets'] ?? $rawAggregation);
PHP8.1: src/Application/Results.php#L61
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ $aggregations[] = new AggregationResult($nestedAggregationName, $rawNestedAggregation['buckets']); } if (is_array($rawNestedAggregation)) { - $aggregations = array_merge($aggregations, $this->parseNestedAggregation($rawNestedAggregation)); + $aggregations = $aggregations; } } }
PHP8.1: src/Application/Results.php#L66
Escaped Mutant for Mutator "ArrayOneItem": --- Original +++ New @@ @@ } } } - return $aggregations; + return count($aggregations) > 1 ? array_slice($aggregations, 0, 1, true) : $aggregations; } }
PHP8: src/Application/Results.php#L36
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ $aggregations = []; foreach ($this->rawResults['aggregations'] as $name => $rawAggregation) { if (array_key_exists('doc_count', $rawAggregation)) { - $aggregations = array_merge($aggregations, $this->parseNestedAggregation($rawAggregation)); + $aggregations = $this->parseNestedAggregation($rawAggregation); continue; } $aggregations[] = new AggregationResult($name, $rawAggregation['buckets'] ?? $rawAggregation);
PHP8: src/Application/Results.php#L61
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ $aggregations[] = new AggregationResult($nestedAggregationName, $rawNestedAggregation['buckets']); } if (is_array($rawNestedAggregation)) { - $aggregations = array_merge($aggregations, $this->parseNestedAggregation($rawNestedAggregation)); + $aggregations = $aggregations; } } }
PHP8: src/Application/Results.php#L66
Escaped Mutant for Mutator "ArrayOneItem": --- Original +++ New @@ @@ } } } - return $aggregations; + return count($aggregations) > 1 ? array_slice($aggregations, 0, 1, true) : $aggregations; } }
PHP8.2: src/Application/Results.php#L36
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ $aggregations = []; foreach ($this->rawResults['aggregations'] as $name => $rawAggregation) { if (array_key_exists('doc_count', $rawAggregation)) { - $aggregations = array_merge($aggregations, $this->parseNestedAggregation($rawAggregation)); + $aggregations = $this->parseNestedAggregation($rawAggregation); continue; } $aggregations[] = new AggregationResult($name, $rawAggregation['buckets'] ?? $rawAggregation);
PHP8.2: src/Application/Results.php#L61
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ $aggregations[] = new AggregationResult($nestedAggregationName, $rawNestedAggregation['buckets']); } if (is_array($rawNestedAggregation)) { - $aggregations = array_merge($aggregations, $this->parseNestedAggregation($rawNestedAggregation)); + $aggregations = $aggregations; } } }
PHP8.2: src/Application/Results.php#L66
Escaped Mutant for Mutator "ArrayOneItem": --- Original +++ New @@ @@ } } } - return $aggregations; + return count($aggregations) > 1 ? array_slice($aggregations, 0, 1, true) : $aggregations; } }