{"action":"closed","issue":{"url":"https://api.github.com/repos/matthiasnoback/symfony-bundle-plugins/issues/9","labels_url":"https://api.github.com/repos/matthiasnoback/symfony-bundle-plugins/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/matthiasnoback/symfony-bundle-plugins/issues/9/comments","events_url":"https://api.github.com/repos/matthiasnoback/symfony-bundle-plugins/issues/9/events","html_url":"https://github.com/matthiasnoback/symfony-bundle-plugins/issues/9","id":101172547,"number":9,"title":"Configuration validation","user":{"login":"Spomky","id":1091072,"avatar_url":"https://avatars.githubusercontent.com/u/1091072?v=3","gravatar_id":"","url":"https://api.github.com/users/Spomky","html_url":"https://github.com/Spomky","followers_url":"https://api.github.com/users/Spomky/followers","following_url":"https://api.github.com/users/Spomky/following{/other_user}","gists_url":"https://api.github.com/users/Spomky/gists{/gist_id}","starred_url":"https://api.github.com/users/Spomky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spomky/subscriptions","organizations_url":"https://api.github.com/users/Spomky/orgs","repos_url":"https://api.github.com/users/Spomky/repos","events_url":"https://api.github.com/users/Spomky/events{/privacy}","received_events_url":"https://api.github.com/users/Spomky/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-15T12:48:29Z","updated_at":"2015-08-15T13:02:10Z","closed_at":"2015-08-15T13:02:10Z","body":"Hi,\r\n\r\nI have a problem using this configuration.\r\nLet say the configuration of my plugin `foo` is:\r\n```php\r\n...\r\npublic function addConfiguration(ArrayNodeDefinition $pluginNode)\r\n{\r\n    $pluginNode\r\n        ->children()\r\n            ->scalarNode('class')\r\n                ->cannotBeEmpty()->isRequired()\r\n                ->validate()\r\n                    ->ifTrue(function($value){\r\n                        return !class_exists($value);\r\n                    })\r\n                    ->thenInvalid('The class does not exist')\r\n                ->end()\r\n            ->end()\r\n        ->scalarNode('manager')->cannotBeEmpty()->defaultValue('default_manager')->end()\r\n    ->end();\r\n}\r\n...\r\n```\r\n\r\nWhen I do not set the configuration properly, I should receive a message like `The configuration under 'bundle.foo.class' must be set`, but I have no configuration error. I only have an error because parameter `$pluginConfiguration['class']` is not set."}}