Skip to content

Commit 74e914b

Browse files
committed
create default config at all times
1 parent b4962e4 commit 74e914b

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ services:
3232
- NEO4J_AUTH=neo4j/testtest
3333

3434
# advertise “neo4j:7687” instead of localhost
35-
- NEO4J_server_default__advertised__address=neo4j
36-
- NEO4J_server_bolt_advertised__address=neo4j:7687
35+
- NEO4J_server_default__advertised__address=${DEFAULT_ADDRESS-localhost}
36+
- NEO4J_server_bolt_advertised__address=${DEFAULT_ADDRESS-localhost}:7687
3737
networks:
3838
- neo4j-symfony

src/Factories/ClientFactory.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,13 @@ public function __construct(
4848

4949
public function create(): SymfonyClient
5050
{
51-
if (null !== $this->driverConfig) {
52-
$this->builder = $this->builder->withDefaultDriverConfiguration(
53-
$this->makeDriverConfig($this->logLevel, $this->logger)
54-
);
55-
}
51+
$this->builder = $this->builder->withDefaultDriverConfiguration(
52+
$this->makeDriverConfig($this->logLevel, $this->logger)
53+
);
5654

57-
if (null !== $this->sessionConfig) {
58-
$this->builder = $this->builder->withDefaultSessionConfiguration($this->makeSessionConfig());
59-
}
55+
$this->builder = $this->builder->withDefaultSessionConfiguration($this->makeSessionConfig());
6056

61-
if (null !== $this->transactionConfig) {
62-
$this->builder = $this->builder->withDefaultTransactionConfiguration($this->makeTransactionConfig());
63-
}
57+
$this->builder = $this->builder->withDefaultTransactionConfiguration($this->makeTransactionConfig());
6458

6559
foreach ($this->connections as $connection) {
6660
$this->builder = $this->builder->withDriver(

0 commit comments

Comments
 (0)