Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3aa4e14

Browse filesBrowse files
committed
bug #9443 [FrameworkBundle] Fixed the registration of validation.xml file when the form is disabled (hason)
This PR was submitted for the 2.1 branch but it was merged into the 2.2 branch instead (closes #9443). Discussion ---------- [FrameworkBundle] Fixed the registration of validation.xml file when the form is disabled | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- cfa5aa5 [FrameworkBundle] Fixed the registration of validation.xml file when the form is disabled
2 parents be0a310 + d0c1db8 commit 3aa4e14
Copy full SHA for 3aa4e14

File tree

Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -624,9 +624,13 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
624624

625625
private function getValidatorXmlMappingFiles(ContainerBuilder $container)
626626
{
627-
$reflClass = new \ReflectionClass('Symfony\Component\Form\FormInterface');
628-
$files = array(dirname($reflClass->getFileName()).'/Resources/config/validation.xml');
629-
$container->addResource(new FileResource($files[0]));
627+
$files = array();
628+
629+
if (interface_exists('Symfony\Component\Form\FormInterface')) {
630+
$reflClass = new \ReflectionClass('Symfony\Component\Form\FormInterface');
631+
$files[] = dirname($reflClass->getFileName()).'/Resources/config/validation.xml';
632+
$container->addResource(new FileResource($files[0]));
633+
}
630634

631635
foreach ($container->getParameter('kernel.bundles') as $bundle) {
632636
$reflection = new \ReflectionClass($bundle);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.