diff --git a/composer.json b/composer.json index 06c587bcd..80930aff0 100644 --- a/composer.json +++ b/composer.json @@ -26,6 +26,7 @@ "php": "^7.1", "doctrine/doctrine-bundle": "^1.8 || ^2.0", "doctrine/orm": "^2.5", + "doctrine/persistence": "^1.3.4", "sonata-project/admin-bundle": "^3.29", "sonata-project/core-bundle": "^3.14", "sonata-project/exporter": "^1.11.0 || ^2.0", diff --git a/src/Model/ModelManager.php b/src/Model/ModelManager.php index fda9da020..885676e05 100644 --- a/src/Model/ModelManager.php +++ b/src/Model/ModelManager.php @@ -13,7 +13,6 @@ namespace Sonata\DoctrineORMAdminBundle\Model; -use Doctrine\Common\Persistence\ManagerRegistry; use Doctrine\Common\Util\ClassUtils; use Doctrine\DBAL\DBALException; use Doctrine\DBAL\LockMode; @@ -25,6 +24,7 @@ use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; use Doctrine\ORM\UnitOfWork; +use Doctrine\Persistence\ManagerRegistry; use Sonata\AdminBundle\Admin\FieldDescriptionInterface; use Sonata\AdminBundle\Datagrid\DatagridInterface; use Sonata\AdminBundle\Datagrid\ProxyQueryInterface; diff --git a/tests/Model/ModelManagerTest.php b/tests/Model/ModelManagerTest.php index 497c340ba..f896815ca 100644 --- a/tests/Model/ModelManagerTest.php +++ b/tests/Model/ModelManagerTest.php @@ -14,8 +14,6 @@ namespace Sonata\DoctrineORMAdminBundle\Tests\Model; use Doctrine\Common\Collections\ArrayCollection; -use Doctrine\Common\Persistence\ManagerRegistry; -use Doctrine\Common\Persistence\ObjectManager; use Doctrine\DBAL\Connection; use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Platforms\MySqlPlatform; @@ -30,6 +28,8 @@ use Doctrine\ORM\OptimisticLockException; use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; +use Doctrine\Persistence\ManagerRegistry; +use Doctrine\Persistence\ObjectManager; use PHPUnit\Framework\TestCase; use Sonata\AdminBundle\Datagrid\Datagrid; use Sonata\AdminBundle\Datagrid\DatagridInterface;