without this change allways the legacy code get called

This commit is contained in:
Dominik Zogg 2015-06-06 08:40:52 +00:00 committed by Fabien Potencier
parent 75d5d547bb
commit 96a30bf31d

View File

@ -59,13 +59,13 @@ class ValidatorExtension extends AbstractExtension
public function loadTypeGuesser() public function loadTypeGuesser()
{ {
// 2.4 API // 2.5 API
if ($this->validator instanceof LegacyValidatorInterface) { if ($this->validator instanceof ValidatorInterface) {
return new ValidatorTypeGuesser($this->validator->getMetadataFactory()); return new ValidatorTypeGuesser($this->validator);
} }
// 2.5 API - ValidatorInterface extends MetadataFactoryInterface // 2.4 API
return new ValidatorTypeGuesser($this->validator); return new ValidatorTypeGuesser($this->validator->getMetadataFactory());
} }
protected function loadTypeExtensions() protected function loadTypeExtensions()