Skip to content

Commit

Permalink
Merge pull request sonata-project#2186 from dbu/backport-2.5-fix
Browse files Browse the repository at this point in the history
adjust ErrorElement for symfony 2.5 - in sonata 2.2 branch
  • Loading branch information
rande committed Jun 12, 2014
2 parents 8d665ac + 774cfe8 commit 7620435
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions Validator/ErrorElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,27 @@

namespace Sonata\AdminBundle\Validator;

use Symfony\Bundle\FrameworkBundle\Validator\ConstraintValidatorFactory;
use Symfony\Component\Validator\ExecutionContext;
use Symfony\Component\Validator\ConstraintValidatorFactoryInterface;
use Symfony\Component\Validator\ExecutionContextInterface;
use Symfony\Component\PropertyAccess\PropertyAccess;
use Symfony\Component\PropertyAccess\PropertyPath;
use Symfony\Component\Validator\Constraint;

class ErrorElement
{
/**
* @var ExecutionContextInterface
*/
protected $context;

/**
* @var string
*/
protected $group;

/**
* @var ConstraintValidationFactoryInterface
*/
protected $constraintValidatorFactory;

protected $stack = array();
Expand All @@ -37,12 +46,12 @@ class ErrorElement
protected $errors = array();

/**
* @param mixed $subject
* @param \Symfony\Bundle\FrameworkBundle\Validator\ConstraintValidatorFactory $constraintValidatorFactory
* @param \Symfony\Component\Validator\ExecutionContext $context
* @param string $group
* @param mixed $subject
* @param ConstraintValidatorFactoryInterface $constraintValidatorFactory
* @param ExecutionContextInterface $context
* @param string $group
*/
public function __construct($subject, ConstraintValidatorFactory $constraintValidatorFactory, ExecutionContext $context, $group)
public function __construct($subject, ConstraintValidatorFactoryInterface $constraintValidatorFactory, ExecutionContextInterface $context, $group)
{
$this->subject = $subject;
$this->context = $context;
Expand Down

0 comments on commit 7620435

Please sign in to comment.