Skip to content

Commit 409199b

Browse files
author
Jens Averkamp
committed
Update configuration options
1 parent bf337a8 commit 409199b

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

DependencyInjection/Configuration.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,16 @@ public function getConfigTreeBuilder()
3636
->cannotBeEmpty()
3737
->isRequired()
3838
->end()
39-
->scalarNode('auth_method')
39+
->enumNode('auth_method')
4040
->defaultValue(Client::AUTH_HTTP_TOKEN)
41-
->validate()
42-
->ifNotInArray(array(Client::AUTH_URL_TOKEN, Client::AUTH_HTTP_TOKEN))
43-
->thenInvalid('Invalid Auhtmethod "%s"')
44-
->end()
41+
->values(array(Client::AUTH_URL_TOKEN, Client::AUTH_HTTP_TOKEN))
4542
->end()
43+
->scalarNode('sudo')->defaultValue(null)->end()
4644
->arrayNode('options')
4745
->addDefaultsIfNotSet()
4846
->children()
49-
->integerNode('timeout')
50-
->cannotBeEmpty()
51-
->defaultValue(60)
47+
->integerNode('timeout')->min(0)->defaultValue(60)->end()
48+
->scalarNode('user_agent')->defaultValue(null)
5249
->end()
5350
->end()
5451
->end()

0 commit comments

Comments
 (0)