diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index ed73c5dc..ea952128 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -54,9 +54,9 @@ public function getConfigTreeBuilder() ->addDefaultsIfNotSet() ->children() ->booleanNode('j')->end() - ->scalarNode('timeout')->end() + ->integerNode('timeout')->end() ->scalarNode('w')->end() - ->scalarNode('wtimeout')->end() + ->integerNode('wtimeout')->end() // Deprecated options ->booleanNode('fsync')->info('Deprecated. Please use the "j" option instead.')->end() ->scalarNode('safe')->info('Deprecated. Please use the "w" option instead.')->end() @@ -136,8 +136,8 @@ private function addDocumentManagersSection(ArrayNodeDefinition $rootNode) ->end() ->end() ->end() - ->scalarNode('retry_connect')->defaultValue(0)->end() - ->scalarNode('retry_query')->defaultValue(0)->end() + ->integerNode('retry_connect')->defaultValue(0)->end() + ->integerNode('retry_query')->defaultValue(0)->end() ->arrayNode('metadata_cache_driver') ->addDefaultsIfNotSet() ->beforeNormalization() @@ -148,7 +148,7 @@ private function addDocumentManagersSection(ArrayNodeDefinition $rootNode) ->scalarNode('type')->defaultValue('array')->end() ->scalarNode('class')->end() ->scalarNode('host')->end() - ->scalarNode('port')->end() + ->integerNode('port')->end() ->scalarNode('instance_class')->end() ->scalarNode('id')->end() ->scalarNode('namespace')->end() @@ -208,7 +208,7 @@ private function addConnectionsSection(ArrayNodeDefinition $rootNode) ->values(array('SCRAM-SHA-1', 'MONGODB-CR', 'X509', 'PLAIN', 'GSSAPI')) ->end() ->booleanNode('connect')->end() - ->scalarNode('connectTimeoutMS')->end() + ->integerNode('connectTimeoutMS')->end() ->scalarNode('db')->end() ->booleanNode('journal')->end() ->scalarNode('password') @@ -239,18 +239,18 @@ private function addConnectionsSection(ArrayNodeDefinition $rootNode) ->scalarNode('replicaSet') ->validate()->ifTrue(function ($v) { return !is_string($v); })->thenInvalid('The replicaSet option must be a string')->end() ->end() - ->scalarNode('socketTimeoutMS')->end() + ->integerNode('socketTimeoutMS')->end() ->booleanNode('ssl')->end() ->scalarNode('username') ->validate()->ifNull()->thenUnset()->end() ->end() ->scalarNode('w')->end() - ->scalarNode('wTimeoutMS')->end() + ->integerNode('wTimeoutMS')->end() // Deprecated options ->booleanNode('fsync')->info('Deprecated. Please use the "journal" option instead.')->end() ->booleanNode('slaveOkay')->info('Deprecated. Please use the "readPreference" option instead.')->end() - ->scalarNode('timeout')->info('Deprecated. Please use the "connectTimeoutMS" option instead.')->end() - ->scalarNode('wTimeout')->info('Deprecated. Please use the "wTimeoutMS" option instead.')->end() + ->integerNode('timeout')->info('Deprecated. Please use the "connectTimeoutMS" option instead.')->end() + ->integerNode('wTimeout')->info('Deprecated. Please use the "wTimeoutMS" option instead.')->end() ->end() ->validate() ->ifTrue(function($v) { return count($v['readPreferenceTags']) === 0; })