8000 merged branch henrikbjorn/2.0 (PR #3133) · lsmith77/symfony@706020b · GitHub
[go: up one dir, main page]

Skip to content

Commit 706020b

Browse files
committed
merged branch henrikbjorn/2.0 (PR symfony#3133)
Commits ------- 959614b Use reflection to determaine the correct path for component validation.xml file Discussion ---------- 2.0 Validation.xml use reflection to guess path
2 parents 733ac9d + 959
8000
614b commit 706020b

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