diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php index 454c7cc0b9222..aae6a8643868a 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php @@ -52,7 +52,11 @@ public function addConfiguration(NodeDefinition $node) { $node ->children() - ->scalarNode('class')->isRequired()->cannotBeEmpty()->end() + ->scalarNode('class') + ->isRequired() + ->info('The full entity class name of your user class.') + ->cannotBeEmpty() + ->end() ->scalarNode('property')->defaultNull()->end() ->scalarNode('manager_name')->defaultNull()->end() ->end() diff --git a/src/Symfony/Component/Config/Definition/ArrayNode.php b/src/Symfony/Component/Config/Definition/ArrayNode.php index 2a828caf78538..9cd654f791d7f 100644 --- a/src/Symfony/Component/Config/Definition/ArrayNode.php +++ b/src/Symfony/Component/Config/Definition/ArrayNode.php @@ -213,7 +213,11 @@ protected function finalizeValue($value) foreach ($this->children as $name => $child) { if (!\array_key_exists($name, $value)) { if ($child->isRequired()) { - $ex = new InvalidConfigurationException(sprintf('The child node "%s" at path "%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()); + } + $ex = new InvalidConfigurationException($message); $ex->setPath($this->getPath()); throw $ex;