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 0b2ceae

Browse filesBrowse files
committed
Update Doctrine bridge to support the alternative config dir
1 parent f63d407 commit 0b2ceae
Copy full SHA for 0b2ceae

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+3
-4
lines changed

‎src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@ private function updateValidatorMappingFiles(ContainerBuilder $container, string
4848
}
4949

5050
$files = $container->getParameter('validator.mapping.loader.'.$mapping.'_files_loader.mapping_files');
51-
$validationPath = 'Resources/config/validation.'.$this->managerType.'.'.$extension;
51+
$validationPath = '/config/validation.'.$this->managerType.'.'.$extension;
5252

53-
foreach ($container->getParameter('kernel.bundles') as $bundle) {
54-
$reflection = new \ReflectionClass($bundle);
55-
if ($container->fileExists($file = \dirname($reflection->getFileName()).'/'.$validationPath)) {
53+
foreach ($container->getParameter('kernel.bundles_metadata') as $bundle) {
54+
if ((isset($bundle['dir']) && $container->fileExists($file = $bundle['dir'].$validationPath)) || $container->fileExists($file = $bundle['path'].$validationPath)) {
5655
$files[] = $file;
5756
}
5857
}

0 commit comments

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