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 66741b0

Browse filesBrowse files
committed
[Validator] always use the lazy loading metadata factory
1 parent 22b9765 commit 66741b0
Copy full SHA for 66741b0

File tree

Expand file treeCollapse file tree

1 file changed

+1
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-6
lines changed

‎src/Symfony/Component/Validator/ValidatorBuilder.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/ValidatorBuilder.php
+1-6Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
use Symfony\Component\Validator\Exception\InvalidArgumentException;
2424
use Symfony\Component\Validator\Exception\ValidatorException;
2525
use Symfony\Component\Validator\Mapping\Cache\CacheInterface;
26-
use Symfony\Component\Validator\Mapping\ClassMetadataFactory;
2726
use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory;
2827
use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader;
2928
use Symfony\Component\Validator\Mapping\Loader\LoaderChain;
@@ -379,11 +378,7 @@ public function getValidator()
379378
$loader = $loaders[0];
380379
}
381380

382-
if (Validation::API_VERSION_2_5 === $apiVersion) {
383-
$metadataFactory = new LazyLoadingMetadataFactory($loader, $this->metadataCache);
384-
} else {
385-
$metadataFactory = new ClassMetadataFactory($loader, $this->metadataCache);
386-
}
381+
$metadataFactory = new LazyLoadingMetadataFactory($loader, $this->metadataCache);
387382
}
388383

389384
$validatorFactory = $this->validatorFactory ?: new ConstraintValidatorFactory($this->propertyAccessor);

0 commit comments

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