Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony2 Can't inherit abstract function Validator\ValidatorInterface::validate() (previously declared abstract in \Validator\ValidatorInterface)

If I use the symfony console command generate:doctrine:crud with --write parameter I get an auto-generated controller working only in the indexAction route, but not in the others (newAction, deleteAction, updateAction). I think the problem is in the form creation. The resulting error is the following one:

Compile Error: Can't inherit abstract function Symfony\Component\Validator\ValidatorInterface::validate() (previously declared abstract in Symfony\Component\Validator\Validator\ValidatorInterface)

Server Error - FatalErrorException500 Internal in vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveValidator.php at line 31

I don't know, how to solve this problem.

like image 740
tonygatta Avatar asked Sep 27 '22 15:09

tonygatta


1 Answers

This error is the error message you get when running the new validator component in PHP 5.3.8 or older. You need to use at least PHP 5.3.9 to use recent versions of Symfony

like image 117
Christophe Coevoet Avatar answered Sep 30 '22 07:09

Christophe Coevoet