[Form] Fix deprecated call method
This commit is contained in:
parent
a5e1c4a657
commit
16a196a6b2
@ -15,14 +15,14 @@ use Symfony\Component\Form\FormTypeGuesserInterface;
|
||||
use Symfony\Component\Form\Guess\Guess;
|
||||
use Symfony\Component\Form\Guess\TypeGuess;
|
||||
use Symfony\Component\Form\Guess\ValueGuess;
|
||||
use Symfony\Component\Validator\Mapping\ClassMetadataFactoryInterface;
|
||||
use Symfony\Component\Validator\MetadataFactoryInterface;
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
|
||||
class ValidatorTypeGuesser implements FormTypeGuesserInterface
|
||||
{
|
||||
private $metadataFactory;
|
||||
|
||||
public function __construct(ClassMetadataFactoryInterface $metadataFactory)
|
||||
public function __construct(MetadataFactoryInterface $metadataFactory)
|
||||
{
|
||||
$this->metadataFactory = $metadataFactory;
|
||||
}
|
||||
@ -269,7 +269,7 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
|
||||
protected function guess($class, $property, \Closure $closure, $defaultValue = null)
|
||||
{
|
||||
$guesses = array();
|
||||
$classMetadata = $this->metadataFactory->getClassMetadata($class);
|
||||
$classMetadata = $this->metadataFactory->getMetadataFor($class);
|
||||
|
||||
if ($classMetadata->hasMemberMetadatas($property)) {
|
||||
$memberMetadatas = $classMetadata->getMemberMetadatas($property);
|
||||
@ -291,4 +291,4 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
|
||||
|
||||
return Guess::getBestGuess($guesses);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user