Forbid dots in connection names
This commit is contained in:
parent
3d74fbdb94
commit
f58fe997c5
|
@ -35,6 +35,18 @@ class Configuration extends PropelConfiguration
|
|||
->children()
|
||||
->arrayNode('connections')
|
||||
->isRequired()
|
||||
->validate()
|
||||
->always()
|
||||
->then(function($connections) {
|
||||
foreach ($connections as $name => $connection) {
|
||||
if (strpos($name, '.') !== false) {
|
||||
throw new \InvalidArgumentException('Dots are not allowed in connection names');
|
||||
}
|
||||
}
|
||||
|
||||
return $connections;
|
||||
})
|
||||
->end()
|
||||
->requiresAtLeastOneElement()
|
||||
->normalizeKeys(false)
|
||||
->prototype('array')
|
||||
|
|
Loading…
Reference in a new issue