Skip to content

Commit c1ba3cf

Browse files
Deprecations fixed
1 parent 26da2a2 commit c1ba3cf

File tree

6 files changed

+123
-125
lines changed

6 files changed

+123
-125
lines changed

.phpunit.cache/test-results

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ services:
77
container_name: php-app
88
volumes:
99
- .:/var/www
10+
environment:
11+
- FAIL_ON_DEPRECATION=1
12+
- FAIL_ON_PHPUNIT_DEPRECATION=1
1013
networks:
1114
- mynetwork
1215

src/Objects/ProfiledQueryPlan.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
final class ProfiledQueryPlan
66
{
77
public function __construct(
8+
public readonly ProfiledQueryPlanArguments $arguments,
89
public readonly int $dbHits = 0,
910
public readonly int $records = 0,
1011
public readonly bool $hasPageCacheStats = false,
@@ -13,7 +14,6 @@ public function __construct(
1314
public readonly float $pageCacheHitRatio = 0.0,
1415
public readonly int $time = 0,
1516
public readonly string $operatorType = '',
16-
public readonly ProfiledQueryPlanArguments $arguments,
1717
public readonly array $children = [],
1818
public readonly array $identifiers = []
1919
) {

src/ResponseParser.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function parseRunQueryResponse(ResponseInterface $response): ResultSet
2929
$profiledQueryPlan = $this->buildProfiledQueryPlan($data['profiledQueryPlan'] ?? null);
3030
$accessMode = $this->getAccessMode($data['accessMode'] ?? '');
3131

32-
return new ResultSet($rows, $counters, $bookmarks, $profiledQueryPlan, $accessMode);
32+
return new ResultSet($rows, $bookmarks, $accessMode,$counters,$profiledQueryPlan);
3333
}
3434

3535
private function validateAndDecodeResponse(ResponseInterface $response): array
@@ -153,6 +153,7 @@ private function buildProfiledQueryPlan(mixed $queryPlanData): ?ProfiledQueryPla
153153
$children = array_map(fn (mixed $child): ?ProfiledQueryPlan => $this->buildProfiledQueryPlan($child), $queryPlanData['children'] ?? []);
154154

155155
return new ProfiledQueryPlan(
156+
$queryArguments,
156157
$queryPlanData['dbHits'] ?? 0,
157158
$queryPlanData['records'] ?? 0,
158159
$queryPlanData['hasPageCacheStats'] ?? false,
@@ -161,9 +162,9 @@ private function buildProfiledQueryPlan(mixed $queryPlanData): ?ProfiledQueryPla
161162
$queryPlanData['pageCacheHitRatio'] ?? 0.0,
162163
$queryPlanData['time'] ?? 0,
163164
$queryPlanData['operatorType'] ?? '',
164-
$queryArguments,
165165
$children,
166166
$queryPlanData['identifiers'] ?? []
167167
);
168+
168169
}
169170
}

src/Results/ResultSet.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ final class ResultSet implements IteratorAggregate, Countable
2222
*/
2323
public function __construct(
2424
public readonly array $rows,
25-
public readonly ?ResultCounters $counters = null,
2625
public readonly Bookmarks $bookmarks,
27-
public readonly ?ProfiledQueryPlan $profiledQueryPlan,
28-
public readonly AccessMode $accessMode
26+
public readonly AccessMode $accessMode,
27+
public readonly ?ResultCounters $counters = null,
28+
public readonly ?ProfiledQueryPlan $profiledQueryPlan=null
29+
2930
) {
3031
}
3132

0 commit comments

Comments
 (0)