configuration improvements (#1784)

This commit is contained in:
Kevin Papst
2020-06-16 18:35:09 +02:00
committed by GitHub
parent ea4e930cbb
commit 470a6b30e0
9 changed files with 42 additions and 28 deletions

View File

@@ -37,9 +37,13 @@ class Configuration implements ConfigurationInterface
$node
->children()
->scalarNode('data_dir')
->isRequired()
->defaultNull()
->validate()
->ifTrue(function ($value) {
if (null === $value) {
return false;
}
return !file_exists($value);
})
->thenInvalid('Data directory does not exist')