-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Validator] Using Standalone Form + Validator 2.5+ #11606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for taking the time to report this bug @idybil! I can confirm it. We will fix it as soon as possible. |
Thanks webmozart |
Can you confirm whether #11645 fixes the bug for you? |
webmozart
added a commit
that referenced
this issue
Aug 15, 2014
…ation API (webmozart) This PR was merged into the 2.5 branch. Discussion ---------- [Form] Fixed ValidatorExtension to work with the 2.5 Validation API | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #11606 | License | MIT | Doc PR | - The ValidatorExtension::loadTypeGuesser() method used to fail because the method `getMetadataFactory()` does not exist anymore on the new `ValidatorInterface`. This was fixed easily, because `ValidatorInterface` now extends `ClassMetadataFactory`. Commits ------- ff74f4e [Form] Fixed ValidatorExtension to work with the 2.5 Validation API
Thanks webmozart for your fast correction, and I confirm that it is working now. |
Awesome, thanks for checking back! :) |
This can be closed now right? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi guys, I'm using the standalone Form + Validator components. In my ValidatorBuilder, my setup is set to use the latest validator API (setApiVersion(Validation::API_VERSION_2_5)). And my Form integrates the Validator using the Form\Extension\Validator\ValidatorExtension classe.
Now, Imagine that you have a form builder that adds an entry with no type ($builder->add('test'))
When creating the form, and error is raised saying :
Symfony\Component\Validator\Validator\RecursiveValidator::getMetadataFactory() in Symfony\Component\Form\Extension\Validator\ValidatorExtension.php on line 62
in the ValidatorExtension classe, the
loadTypeGuesser
method calls the$this->validator->getMetadataFactory()
which is not define in the RecursiveValidator class.Is this really a Bug, or should I always put a type when adding an entry to the form builder ?
Thanks!
The text was updated successfully, but these errors were encountered: