Skip to content

Commit e58f31d

Browse files
Merge pull request #103 from neo4j-php/structures_semantics
Structures semantics
2 parents cb54e9e + 0ceeee6 commit e58f31d

File tree

96 files changed

+3490
-2338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+3490
-2338
lines changed

.github/workflows/db-test-php-7.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: ["4.3", "4.4"]
16+
neo4j-version: ["4.3", "4.4", "5", "5.1.0"]
1717
php-version: ['7.4']
1818

1919
services:

.github/workflows/db-test-php-8.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: ["4.3", "4.4"]
16+
neo4j-version: ["4.3", "4.4", "5", "5.1.0"]
1717
php-version: ['8.0', '8.1']
1818

1919
services:

README.md

Lines changed: 131 additions & 36 deletions
Large diffs are not rendered by default.

phpunit.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
<directory>./tests/connection</directory>
66
<file>./tests/BoltTest.php</file>
77
<directory>./tests/error</directory>
8-
<directory>./tests/PackStream</directory>
8+
<directory>./tests/packstream</directory>
9+
<directory>./tests/structures</directory>
910
</testsuite>
1011
<testsuite name="NoDatabase">
1112
<directory>./tests/protocol</directory>

src/Bolt.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Bolt\error\{ConnectException, PackException, UnpackException};
66
use Exception;
7-
use Bolt\PackStream\{IPacker, IUnpacker};
7+
use Bolt\packstream\{IPacker, IUnpacker};
88
use Bolt\protocol\{AProtocol, ServerState};
99
use Bolt\connection\IConnection;
1010

@@ -34,7 +34,7 @@ final class Bolt
3434
public function __construct(IConnection $connection)
3535
{
3636
$this->connection = $connection;
37-
$this->setProtocolVersions(4.4, 4.3, 4.2, 3);
37+
$this->setProtocolVersions(5.1, 5.0, 4.4, 4.3);
3838
$this->setPackStreamVersion();
3939
}
4040

@@ -87,13 +87,13 @@ public function setProtocolVersions(...$v): Bolt
8787
*/
8888
public function setPackStreamVersion(int $version = 1): Bolt
8989
{
90-
$packerClass = "\\Bolt\\PackStream\\v" . $version . "\\Packer";
90+
$packerClass = "\\Bolt\\packstream\\v" . $version . "\\Packer";
9191
if (!class_exists($packerClass)) {
9292
throw new PackException('Requested PackStream version (' . $version . ') not yet implemented');
9393
}
9494
$this->packer = new $packerClass();
9595

96-
$unpackerClass = "\\Bolt\\PackStream\\v" . $version . "\\Unpacker";
96+
$unpackerClass = "\\Bolt\\packstream\\v" . $version . "\\Unpacker";
9797
if (!class_exists($unpackerClass)) {
9898
throw new UnpackException('Requested PackStream version (' . $version . ') not yet implemented');
9999
}

src/error/IgnoredException.php

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/error/MessageException.php

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/structures/Bytes.php renamed to src/packstream/Bytes.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?php
22

3-
namespace Bolt\structures;
3+
namespace Bolt\packstream;
44

55
use ArrayAccess, Countable;
66

77
/**
8-
* Class ByteArray
8+
* Class Bytes
99
*
1010
* @author Michal Stefanak
1111
* @link https://github.com/neo4j-php/Bolt
1212
* @link https://www.neo4j.com/docs/bolt/current/packstream/#data-type-bytes
13-
* @package Bolt\structures
13+
* @package Bolt\packstream
1414
*/
1515
class Bytes implements ArrayAccess, Countable
1616
{

src/PackStream/IPackDictionaryGenerator.php renamed to src/packstream/IPackDictionaryGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22

3-
namespace Bolt\PackStream;
3+
namespace Bolt\packstream;
44

55
/**
66
* Class PackDictionaryGenerator
77
* @author Michal Stefanak
88
* @link https://github.com/neo4j-php/Bolt
9-
* @package Bolt\PackStream
9+
* @package Bolt\packstream
1010
*/
1111
interface IPackDictionaryGenerator extends \Countable, \Iterator
1212
{

src/PackStream/IPackListGenerator.php renamed to src/packstream/IPackListGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22

3-
namespace Bolt\PackStream;
3+
namespace Bolt\packstream;
44

55
/**
66
* Class PackListGenerator
77
* @author Michal Stefanak
88
* @link https://github.com/neo4j-php/Bolt
9-
* @package Bolt\PackStream
9+
* @package Bolt\packstream
1010
*/
1111
interface IPackListGenerator extends \Iterator, \Countable
1212
{

0 commit comments

Comments
 (0)