File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change 1515
1616use Bolt \Bolt ;
1717use Bolt \connection \IConnection ;
18- use Bolt \error \ConnectException ;
1918use Bolt \protocol \V4_4 ;
2019use Bolt \protocol \V5 ;
2120use Bolt \protocol \V5_1 ;
@@ -33,18 +32,11 @@ class ProtocolFactory
3332 public function createProtocol (IConnection $ connection , AuthenticateInterface $ auth , string $ userAgent ): array
3433 {
3534 $ bolt = new Bolt ($ connection );
36- $ bolt ->setProtocolVersions (5.4 , 5.3 , 5 , 4.4 );
37-
38- try {
39- $ protocol = $ bolt ->build ();
40- } catch (ConnectException $ e ) {
41- // Assume incorrect protocol version
42- $ bolt ->setProtocolVersions (5.2 , 5.1 );
43- $ protocol = $ bolt ->build ();
44- }
35+ $ bolt ->setProtocolVersions ('5.4.4 ' , 4.4 );
36+ $ protocol = $ bolt ->build ();
4537
4638 if (!($ protocol instanceof V4_4 || $ protocol instanceof V5 || $ protocol instanceof V5_1 || $ protocol instanceof V5_2 || $ protocol instanceof V5_3 || $ protocol instanceof V5_4 )) {
47- throw new RuntimeException ('Client only supports bolt version 4.4 and ^5.0 ' );
39+ throw new RuntimeException ('Client only supports bolt version 4.4 to 5.4 ' );
4840 }
4941
5042 $ response = $ auth ->authenticateBolt ($ protocol , $ userAgent );
You can’t perform that action at this time.
0 commit comments