Forbid dots in connection names
This commit is contained in:
parent
3d74fbdb94
commit
f58fe997c5
|
@ -35,6 +35,18 @@ class Configuration extends PropelConfiguration
|
||||||
->children()
|
->children()
|
||||||
->arrayNode('connections')
|
->arrayNode('connections')
|
||||||
->isRequired()
|
->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()
|
->requiresAtLeastOneElement()
|
||||||
->normalizeKeys(false)
|
->normalizeKeys(false)
|
||||||
->prototype('array')
|
->prototype('array')
|
||||||
|
|
Loading…
Reference in a new issue