File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ public function addConfiguration(ArrayNodeDefinition $builder)
4242 ->children ()
4343 ->scalarNode ('dsn ' )
4444 ->info ('The Mongodb DSN. Other parameters are ignored if set ' )
45+ ->isRequired ()
4546 ->end ()
4647 ->scalarNode ('dbname ' )
4748 ->defaultValue ('enqueue ' )
@@ -64,12 +65,7 @@ public function addConfiguration(ArrayNodeDefinition $builder)
6465 */
6566 public function createConnectionFactory (ContainerBuilder $ container , array $ config )
6667 {
67- if (false == empty ($ config ['dsn ' ])) {
68- $ factory = new Definition (MongodbConnectionFactory::class);
69- $ factory ->setArguments ([$ config ]);
70- } else {
71- throw new \LogicException ('Set "dsn" options when you want ot use Mongodb. ' );
72- }
68+ $ factory = new Definition (MongodbConnectionFactory::class, [$ config ]);
7369
7470 $ factoryId = sprintf ('enqueue.transport.%s.connection_factory ' , $ this ->getName ());
7571 $ container ->setDefinition ($ factoryId , $ factory );
You can’t perform that action at this time.
0 commit comments