Skip to content

Commit

Permalink
Use reflection to determaine the correct path for component validatio…
Browse files Browse the repository at this point in the history
…n.xml file
  • Loading branch information
henrikbjorn committed Jan 17, 2012
1 parent 733ac9d commit 959614b
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -554,7 +554,8 @@ private function registerValidationConfiguration(array $config, ContainerBuilder

private function getValidatorXmlMappingFiles(ContainerBuilder $container)
{
$files = array(__DIR__.'/../../../Component/Form/Resources/config/validation.xml');
$reflClass = new \ReflectionClass('Symfony\Component\Form\FormInterface');
$files = array(dirname($reflClass->getFileName()) . '/Resources/config/validation.xml');
$container->addResource(new FileResource($files[0]));

foreach ($container->getParameter('kernel.bundles') as $bundle) {
Expand Down

0 comments on commit 959614b

Please sign in to comment.