8000 Use reflection to determaine the correct path for component validatio… · lsmith77/symfony@959614b · GitHub
[go: up one dir, main page]

Skip to content

Commit 959614b

Browse files
committed
Use reflection to determaine the correct path for component validation.xml file
1 parent 733ac9d commit 959614b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,8 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
554554

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

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

0 commit comments

Comments
 (0)
0