fix validation context and upgrade sf3

This commit is contained in:
Julien Fastré 2018-04-20 14:42:21 +02:00
parent 7c4610faf4
commit 193460a9a6
3 changed files with 4 additions and 4 deletions

View File

@ -299,9 +299,9 @@ class PersonAddressController extends Controller
private function validatePerson(Person $person)
{
$errors = $this->get('validator')
->validate($person, array('Default'));
->validate($person, null, array('Default'));
$errors_addresses_consistent = $this->get('validator')
->validate($person, array('addresses_consistent'));
->validate($person, null, array('addresses_consistent'));
foreach($errors_addresses_consistent as $error) {
$errors->add($error);

View File

@ -23,7 +23,7 @@
namespace Chill\PersonBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\ExecutionContextInterface;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
/**
* AccompanyingPeriod

View File

@ -22,7 +22,7 @@ namespace Chill\PersonBundle\Entity;
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
use Symfony\Component\Validator\Context\ExecutionContextInterface;;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Chill\MainBundle\Entity\Country;
use Chill\PersonBundle\Entity\MaritalStatus;
use Doctrine\Common\Collections\ArrayCollection;