File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,13 @@ abstract class AConnection implements IConnection
2020 */
2121 public function __construct (string $ ip = '127.0.0.1 ' , int $ port = 7687 , float $ timeout = 15 )
2222 {
23+ if (filter_var ($ ip , FILTER_VALIDATE_URL )) {
24+ $ scheme = parse_url ($ ip , PHP_URL_SCHEME );
25+ if (!empty ($ scheme )) {
26+ $ ip = str_replace ($ scheme . ':// ' , '' , $ ip );
27+ }
28+ }
29+
2330 $ this ->ip = $ ip ;
2431 $ this ->port = $ port ;
2532 $ this ->timeout = $ timeout ;
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public function testSockets()
6666 public function testAura ()
6767 {
6868 try {
69- $ conn = new \Bolt \connection \StreamSocket ('demo.neo4jlabs.com ' );
69+ $ conn = new \Bolt \connection \StreamSocket ('neo4j+s:// demo.neo4jlabs.com ' );
7070 $ conn ->setSslContextOptions ([
7171 'verify_peer ' => true
7272 ]);
You can’t perform that action at this time.
0 commit comments