genemu/GenemuFormBundle

Symfony 2.3 ReCaptchaValidator::validate() has incorrect object type specified

Closed this issue · 1 comments

When attempting to validate a form with a ReCaptcha, the following error is thrown:

Catchable fatal error: Argument 1 passed to Genemu\Bundle\FormBundle\Form\Core\Validator\ReCaptchaValidator::validate() must be an instance of Symfony\Component\Form\Event\DataEvent, instance of Symfony\Component\Form\FormEvent given in /var/www/html/voxrepublic/vendor/genemu/form-bundle/Genemu/Bundle/FormBundle/Form/Core/Validator/ReCaptchaValidator.php on line 73

The issue appears to be this:

use Symfony\Component\Form\Event\DataEvent;

...

public function validate(DataEvent $event)

DataEvent has been replaced by FormEvent in Symfony 2.3

Sorry, was still using 2.1; 2.2 is working as intended