Skip to content

Commit 2925b94

Browse files
added new bolt versions
1 parent d04d6d7 commit 2925b94

File tree

7 files changed

+118
-2
lines changed

7 files changed

+118
-2
lines changed

.github/workflows/db.50.2204.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
neo4j-version: ['5.4', '5.6', '5.8', '5.12', '5.13', '5.23']
16+
neo4j-version: ['5.4', '5.6', '5.8', '5.12', '5.13', '5.23', '5.26']
1717
php-version: ['8.1', '8.2', '8.3', '8.4']
1818

1919
services:

src/protocol/V5_6.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Bolt\protocol;
44

55
/**
6-
* Class Protocol version 5.4
6+
* Class Protocol version 5.6
77
*
88
* @author Michal Stefanak
99
* @link https://github.com/neo4j-php/Bolt

src/protocol/V5_7.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
namespace Bolt\protocol;
4+
5+
/**
6+
* Class Protocol version 5.7
7+
*
8+
* @author Michal Stefanak
9+
* @link https://github.com/neo4j-php/Bolt
10+
* @see https://www.neo4j.com/docs/bolt/current/bolt/message/
11+
* @package Bolt\protocol
12+
*/
13+
class V5_7 extends AProtocol
14+
{
15+
use \Bolt\protocol\v5\AvailableStructures;
16+
use \Bolt\protocol\v5_1\ServerStateTransition;
17+
18+
use \Bolt\protocol\v1\ResetMessage;
19+
20+
use \Bolt\protocol\v3\RunMessage;
21+
use \Bolt\protocol\v3\BeginMessage;
22+
use \Bolt\protocol\v3\CommitMessage;
23+
use \Bolt\protocol\v3\RollbackMessage;
24+
use \Bolt\protocol\v3\GoodbyeMessage;
25+
26+
use \Bolt\protocol\v4\PullMessage;
27+
use \Bolt\protocol\v4\DiscardMessage;
28+
29+
use \Bolt\protocol\v4_4\RouteMessage;
30+
31+
use \Bolt\protocol\v5_1\LogonMessage;
32+
use \Bolt\protocol\v5_1\LogoffMessage;
33+
34+
use \Bolt\protocol\v5_3\HelloMessage;
35+
36+
use \Bolt\protocol\v5_4\TelemetryMessage;
37+
}

src/protocol/V5_8.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
namespace Bolt\protocol;
4+
5+
/**
6+
* Class Protocol version 5.8
7+
*
8+
* @author Michal Stefanak
9+
* @link https://github.com/neo4j-php/Bolt
10+
* @see https://www.neo4j.com/docs/bolt/current/bolt/message/
11+
* @package Bolt\protocol
12+
*/
13+
class V5_8 extends AProtocol
14+
{
15+
use \Bolt\protocol\v5\AvailableStructures;
16+
use \Bolt\protocol\v5_1\ServerStateTransition;
17+
18+
use \Bolt\protocol\v1\ResetMessage;
19+
20+
use \Bolt\protocol\v3\RunMessage;
21+
use \Bolt\protocol\v3\BeginMessage;
22+
use \Bolt\protocol\v3\CommitMessage;
23+
use \Bolt\protocol\v3\RollbackMessage;
24+
use \Bolt\protocol\v3\GoodbyeMessage;
25+
26+
use \Bolt\protocol\v4\PullMessage;
27+
use \Bolt\protocol\v4\DiscardMessage;
28+
29+
use \Bolt\protocol\v4_4\RouteMessage;
30+
31+
use \Bolt\protocol\v5_1\LogonMessage;
32+
use \Bolt\protocol\v5_1\LogoffMessage;
33+
34+
use \Bolt\protocol\v5_3\HelloMessage;
35+
36+
use \Bolt\protocol\v5_4\TelemetryMessage;
37+
}

tests/TestLayer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ protected function getCompatibleBoltVersion(string $url = null): float|int
7575

7676
$neo4jVersion = $decoded['neo4j_version'];
7777

78+
if (version_compare($neo4jVersion, '5.26', '>='))
79+
return 5.8;
7880
if (version_compare($neo4jVersion, '5.23', '>='))
7981
return 5.6;
8082
if (version_compare($neo4jVersion, '5.13', '>='))

tests/protocol/V5_7Test.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
use Bolt\protocol\V5_7;
4+
5+
/**
6+
* Class V5_7Test
7+
*
8+
* @author Michal Stefanak
9+
* @link https://github.com/neo4j-php/Bolt
10+
* @package Bolt\tests\protocol
11+
*/
12+
class V5_7Test extends \Bolt\tests\protocol\ProtocolLayer
13+
{
14+
public function test__construct(): V5_7
15+
{
16+
$cls = new V5_7(1, $this->mockConnection());
17+
$this->assertInstanceOf(V5_7::class, $cls);
18+
return $cls;
19+
}
20+
}

tests/protocol/V5_8Test.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
use Bolt\protocol\V5_8;
4+
5+
/**
6+
* Class V5_8Test
7+
*
8+
* @author Michal Stefanak
9+
* @link https://github.com/neo4j-php/Bolt
10+
* @package Bolt\tests\protocol
11+
*/
12+
class V5_8Test extends \Bolt\tests\protocol\ProtocolLayer
13+
{
14+
public function test__construct(): V5_8
15+
{
16+
$cls = new V5_8(1, $this->mockConnection());
17+
$this->assertInstanceOf(V5_8::class, $cls);
18+
return $cls;
19+
}
20+
}

0 commit comments

Comments
 (0)