This commit is contained in:
Fabien Potencier 2020-09-22 11:22:20 +02:00
parent 90056b871a
commit 7cb8ba585d

View File

@ -213,9 +213,11 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
foreach ($this->children as $name => $child) {
if (!\array_key_exists($name, $value)) {
if ($child->isRequired()) {
$message = sprintf('The child config "%s" under "%s" must be configured.', $name, $this->getPath());
$message = sprintf('The child config "%s" under "%s" must be configured', $name, $this->getPath());
if ($child->getInfo()) {
$message .= sprintf("\n\n Description: %s", $child->getInfo());
$message .= sprintf(": %s", $child->getInfo());
} else {
$message .= '.';
}
$ex = new InvalidConfigurationException($message);
$ex->setPath($this->getPath());