diff --git a/DataTransformer/EntityToIdTransformer.php b/DataTransformer/EntityToIdTransformer.php index c255cb6..e0b3e99 100755 --- a/DataTransformer/EntityToIdTransformer.php +++ b/DataTransformer/EntityToIdTransformer.php @@ -2,6 +2,7 @@ namespace Gregwar\FormBundle\DataTransformer; +use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\Exception\FormException; use Symfony\Component\Form\Exception\TransformationFailedException; @@ -29,7 +30,7 @@ class EntityToIdTransformer implements DataTransformerInterface private $unitOfWork; - public function __construct(EntityManager $em, $class, $property, $queryBuilder, $multiple) + public function __construct(EntityManagerInterface $em, $class, $property, $queryBuilder, $multiple) { if (!(null === $queryBuilder || $queryBuilder instanceof QueryBuilder || $queryBuilder instanceof \Closure)) { throw new UnexpectedTypeException($queryBuilder, 'Doctrine\ORM\QueryBuilder or \Closure'); diff --git a/composer.json b/composer.json index 0d1561d..097a14a 100644 --- a/composer.json +++ b/composer.json @@ -3,8 +3,8 @@ "description": "Provides the \"entity_id\" type (read \"entity identifier\")", "license": "MIT", "require": { - "symfony/symfony": ">=2.1,<2.7-dev", - "symfony/framework-bundle": ">=2.1,<2.7-dev", + "symfony/symfony": ">=2.1,<=3.0.x-dev", + "symfony/framework-bundle": ">=2.1,<=3.0.x-dev", "doctrine/doctrine-bundle": "*", "doctrine/orm": "*" },