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 1212use Symfony \Component \Config \Definition \ConfigurationInterface ;
1313
1414use function count ;
15+ use function explode ;
1516use function in_array ;
1617use function is_array ;
1718use function is_string ;
@@ -432,7 +433,20 @@ private function addConnectionsSection(ArrayNodeDefinition $rootNode): void
432433 ->end ()
433434 ->end ()
434435 ->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 ()
436450 ->end ()
437451 ->booleanNode ('bypassQueryAnalysis ' )->end ()
438452 ->arrayNode ('tlsOptions ' )
Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ public function testFullConfiguration(array $config): void
263263 'mongocryptdURI ' => 'mongodb://localhost:27020 ' ,
264264 'mongocryptdBypassSpawn ' => true ,
265265 '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 '] ,
267267 'cryptSharedLibPath ' => '%kernel.project_dir%/bin/mongo_crypt_v1.dylib ' ,
268268 'cryptSharedLibRequired ' => true ,
269269 ],
Original file line number Diff line number Diff line change @@ -133,7 +133,9 @@ doctrine_mongodb:
133133 mongocryptdURI : ' mongodb://localhost:27020'
134134 mongocryptdBypassSpawn : true
135135 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'
137139 cryptSharedLibPath : ' %kernel.project_dir%/bin/mongo_crypt_v1.dylib'
138140 cryptSharedLibRequired : true
139141
You can’t perform that action at this time.
0 commit comments