Skip to content

Commit 08b5e1a

Browse files
committed
Merge branch 'ISSUE-198' of github.com:neo4j-php/neo4j-php-client into ISSUE-198
2 parents 5045505 + 3ea0826 commit 08b5e1a

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

.github/workflows/integration-test-cluster-neo4j-4.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ jobs:
1212
tests:
1313
runs-on: ubuntu-latest
1414
env:
15-
CONNECTION: neo4j://neo4j:testtest@core1:7688
15+
CONNECTION: neo4j://neo4j:testtest@localhost:7688
1616
name: "Running on PHP 8.1 in a Neo4j 4.4 cluster"
1717

1818
steps:
19+
- name: Ports
20+
run: netstat -tulpn | grep LISTEN ; lsof -i -P -n | grep LISTEN
1921
- uses: actions/checkout@v2
2022
- name: Cache Composer dependencies
2123
uses: actions/cache@v2

src/Bolt/BoltConnection.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,6 @@ public function begin(?string $database, ?float $timeout, BookmarkHolder $holder
201201
*/
202202
public function discard(?int $qid): void
203203
{
204-
if (!in_array($this->protocol()->serverState, [ServerState::STREAMING, ServerState::TX_STREAMING], true)) {
205-
throw new Neo4jException([Neo4jError::fromMessageAndCode('Neo.ClientError.Request.Invalid', 'Message \'DISCARD\' cannot be handled by a session which isn\'t in the STREAMING|TX_STREAMING state.')]);
206-
}
207-
208204
$extra = $this->buildResultExtra(null, $qid);
209205
$response = $this->protocol()
210206
->discard($extra)
@@ -221,10 +217,6 @@ public function discard(?int $qid): void
221217
*/
222218
public function run(string $text, array $parameters, ?string $database, ?float $timeout, BookmarkHolder $holder, ?AccessMode $mode): array
223219
{
224-
if (!in_array($this->protocol()->serverState, [ServerState::READY, ServerState::TX_READY, ServerState::TX_STREAMING], true)) {
225-
throw new Neo4jException([Neo4jError::fromMessageAndCode('Neo.ClientError.Request.Invalid', 'Message \'RUN\' cannot be handled by a session which isn\'t in the READY|TX_READY|TX_STREAMING state.')]);
226-
}
227-
228220
$extra = $this->buildRunExtra($database, $timeout, $holder, $mode);
229221
$response = $this->protocol()
230222
->run($text, $parameters, $extra)
@@ -243,10 +235,6 @@ public function commit(): void
243235
{
244236
$this->consumeResults();
245237

246-
if ($this->protocol()->serverState !== ServerState::TX_READY) {
247-
throw new Neo4jException([Neo4jError::fromMessageAndCode('Neo.ClientError.Request.Invalid', 'Message \'COMMIT\' cannot be handled by a session which isn\'t in the TX_READY state.')]);
248-
}
249-
250238
$response = $this->protocol()
251239
->commit()
252240
->getResponse();
@@ -286,10 +274,6 @@ public function protocol(): V4_4|V5|V5_3|V5_4
286274
*/
287275
public function pull(?int $qid, ?int $fetchSize): array
288276
{
289-
if (!in_array($this->protocol()->serverState, [ServerState::STREAMING, ServerState::TX_STREAMING], true)) {
290-
throw new Neo4jException([Neo4jError::fromMessageAndCode('Neo.ClientError.Request.Invalid', 'Message \'PULL\' cannot be handled by a session which isn\'t in the STREAMING|TX_STREAMING state.')]);
291-
}
292-
293277
$extra = $this->buildResultExtra($fetchSize, $qid);
294278

295279
$tbr = [];

0 commit comments

Comments
 (0)