@@ -64,25 +64,17 @@ public function getConfigTreeBuilder(): TreeBuilder
64
64
->children ()
65
65
->arrayNode ('profiling ' )
66
66
->info ('Profiling configuration ' )
67
+ ->canBeEnabled ()
67
68
->children ()
68
69
->booleanNode ('enabled ' )
69
70
->info ('Enable profiling ' )
70
71
->defaultTrue ()
71
72
->end ()
72
73
->end ()
73
74
->end ()
74
- ->append ($ this ->decorateDriverConfig (
75
- 'default_driver_config ' ,
76
- 'The default configuration for every driver '
77
- ))
78
- ->append ($ this ->decorateSessionConfig (
79
- 'default_session_config ' ,
80
- 'The default configuration for every session '
81
- ))
82
- ->append ($ this ->decorateTransactionConfig (
83
- 'default_transaction_config ' ,
84
- 'The default configuration for every transaction '
85
- ))
75
+ ->append ($ this ->decorateDriverConfig ())
76
+ ->append ($ this ->decorateSessionConfig ())
77
+ ->append ($ this ->decorateTransactionConfig ())
86
78
->scalarNode ('default_driver ' )
87
79
->info ('The default driver to use. Default is the first configured driver. ' )
88
80
->end ()
@@ -99,7 +91,7 @@ public function getConfigTreeBuilder(): TreeBuilder
99
91
->end ()
100
92
->scalarNode ('dsn ' )
101
93
->info ('The DSN for the driver. Default is "bolt://localhost:7687". ' )
102
- ->isRequired ( )
94
+ ->defaultValue ( ' bolt://localhost:7687 ' )
103
95
->end ()
104
96
->arrayNode ('authentication ' )
105
97
->info ('The authentication for the driver ' )
@@ -113,18 +105,6 @@ public function getConfigTreeBuilder(): TreeBuilder
113
105
->scalarNode ('token ' )->end ()
114
106
->end ()
115
107
->end ()
116
- ->append ($ this ->decorateDriverConfig (
117
- 'driver_config ' ,
118
- 'The configuration for this driver '
119
- ))
120
- ->append ($ this ->decorateSessionConfig (
121
- 'session_config ' ,
122
- 'The configuration for this session '
123
- ))
124
- ->append ($ this ->decorateTransactionConfig (
125
- 'transaction_config ' ,
126
- 'The configuration for this transaction '
127
- ))
128
108
->scalarNode ('priority ' )
129
109
->info ('The priority of this when trying to fall back on the same alias. Default is 0 ' )
130
110
->end ()
@@ -136,10 +116,10 @@ public function getConfigTreeBuilder(): TreeBuilder
136
116
return $ treeBuilder ;
137
117
}
138
118
139
- private function decorateSessionConfig (string $ name , string $ info ): ArrayNodeDefinition
119
+ private function decorateSessionConfig (): ArrayNodeDefinition
140
120
{
141
- return (new ArrayNodeDefinition ($ name ))
142
- ->info ($ info )
121
+ return (new ArrayNodeDefinition (' default_session_config ' ))
122
+ ->info (' The default configuration for every session ' )
143
123
->children ()
144
124
->scalarNode ('fetch_size ' )
145
125
->end ()
@@ -153,10 +133,10 @@ private function decorateSessionConfig(string $name, string $info): ArrayNodeDef
153
133
->end ();
154
134
}
155
135
156
- private function decorateDriverConfig (string $ name , string $ info ): ArrayNodeDefinition
136
+ private function decorateDriverConfig (): ArrayNodeDefinition
157
137
{
158
- return (new ArrayNodeDefinition ($ name ))
159
- ->info ($ info )
138
+ return (new ArrayNodeDefinition (' default_driver_config ' ))
139
+ ->info (' The default configuration for every driver ' )
160
140
->children ()
161
141
->scalarNode ('acquire_connection_timeout ' )
162
142
->info (sprintf (
@@ -188,10 +168,10 @@ private function decorateDriverConfig(string $name, string $info): ArrayNodeDefi
188
168
->end ();
189
169
}
190
170
191
- private function decorateTransactionConfig (string $ name , string $ info ): ArrayNodeDefinition
171
+ private function decorateTransactionConfig (): ArrayNodeDefinition
192
172
{
193
- return (new ArrayNodeDefinition ($ name ))
194
- ->info ($ info )
173
+ return (new ArrayNodeDefinition (' default_transaction_config ' ))
174
+ ->info (' The default configuration for every transaction ' )
195
175
->children ()
196
176
->scalarNode ('timeout ' )
197
177
->info (
0 commit comments