Skip to content

Commit 7b0e007

Browse files
committed
feat: upgrade neo4j container and add additional check for server state
1 parent fd6db77 commit 7b0e007

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ services:
5252
- .env
5353
neo4j:
5454
<<: *common
55-
image: neo4j:5.10-community
55+
image: neo4j:5.20-community
5656
hostname: neo4j
5757
networks:
5858
- neo4j

src/Bolt/BoltConnection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ public function pull(?int $qid, ?int $fetchSize): array
290290
public function __destruct()
291291
{
292292
try {
293-
if ($this->boltProtocol->serverState === ServerState::FAILED && $this->isOpen()) {
293+
if ($this->isOpen()) {
294294
if ($this->protocol()->serverState === ServerState::STREAMING || $this->protocol()->serverState === ServerState::TX_STREAMING) {
295295
$this->consumeResults();
296296
}
@@ -356,7 +356,7 @@ public function getUserAgent(): string
356356
private function assertNoFailure(Response $response): void
357357
{
358358
if ($response->signature === Signature::FAILURE) {
359-
$this->protocol()->reset()->getResponse(); //what if the reset fails? what should be expected behaviour?
359+
$res = $this->protocol()->reset()->getResponse(); //what if the reset fails? what should be expected behaviour?
360360
throw Neo4jException::fromBoltResponse($response);
361361
}
362362
}

0 commit comments

Comments
 (0)