File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed
tests/DependencyInjection Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 12
12
use Symfony \Component \Config \Definition \ConfigurationInterface ;
13
13
14
14
use function count ;
15
+ use function explode ;
15
16
use function in_array ;
16
17
use function is_array ;
17
18
use function is_string ;
@@ -432,7 +433,20 @@ private function addConnectionsSection(ArrayNodeDefinition $rootNode): void
432
433
->end ()
433
434
->end ()
434
435
->arrayNode ('extraOptions ' )
435
- ->prototype ('variable ' )->end ()
436
+ ->children ()
437
+ ->scalarNode ('mongocryptdURI ' )->end ()
438
+ ->booleanNode ('mongocryptdBypassSpawn ' )->end ()
439
+ ->scalarNode ('mongocryptdSpawnPath ' )->end ()
440
+ ->arrayNode ('mongocryptdSpawnArgs ' )
441
+ ->beforeNormalization ()
442
+ ->ifString ()
443
+ ->then (static fn ($ v ) => explode (' ' , $ v ))
444
+ ->end ()
445
+ ->prototype ('scalar ' )->cannotBeEmpty ()->end ()
446
+ ->end ()
447
+ ->scalarNode ('cryptSharedLibPath ' )->end ()
448
+ ->booleanNode ('cryptSharedLibRequired ' )->end ()
449
+ ->end ()
436
450
->end ()
437
451
->booleanNode ('bypassQueryAnalysis ' )->end ()
438
452
->arrayNode ('tlsOptions ' )
Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ public function testFullConfiguration(array $config): void
263
263
'mongocryptdURI ' => 'mongodb://localhost:27020 ' ,
264
264
'mongocryptdBypassSpawn ' => true ,
265
265
'mongocryptdSpawnPath ' => '%kernel.project_dir%/bin/mongocryptd ' ,
266
- 'mongocryptdSpawnArgs ' => '--pidfilepath=%kernel.project_dir%/var/mongocryptd.pid --idleShutdownTimeoutSecs=60 ' ,
266
+ 'mongocryptdSpawnArgs ' => [ '--pidfilepath=%kernel.project_dir%/var/mongocryptd.pid ' , ' --idleShutdownTimeoutSecs=60 '] ,
267
267
'cryptSharedLibPath ' => '%kernel.project_dir%/bin/mongo_crypt_v1.dylib ' ,
268
268
'cryptSharedLibRequired ' => true ,
269
269
],
Original file line number Diff line number Diff line change @@ -133,7 +133,9 @@ doctrine_mongodb:
133
133
mongocryptdURI : ' mongodb://localhost:27020'
134
134
mongocryptdBypassSpawn : true
135
135
mongocryptdSpawnPath : ' %kernel.project_dir%/bin/mongocryptd'
136
- mongocryptdSpawnArgs : ' --pidfilepath=%kernel.project_dir%/var/mongocryptd.pid --idleShutdownTimeoutSecs=60'
136
+ mongocryptdSpawnArgs :
137
+ - ' --pidfilepath=%kernel.project_dir%/var/mongocryptd.pid'
138
+ - ' --idleShutdownTimeoutSecs=60'
137
139
cryptSharedLibPath : ' %kernel.project_dir%/bin/mongo_crypt_v1.dylib'
138
140
cryptSharedLibRequired : true
139
141
You can’t perform that action at this time.
0 commit comments