diff --git a/Doctrine/UserListener.php b/Doctrine/UserListener.php index 0d55ec64d3..e286e494fc 100644 --- a/Doctrine/UserListener.php +++ b/Doctrine/UserListener.php @@ -12,8 +12,7 @@ namespace FOS\UserBundle\Doctrine; use Doctrine\Common\EventSubscriber; -use Doctrine\Common\Persistence\Event\LifecycleEventArgs; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\Event\LifecycleEventArgs; use Doctrine\ODM\MongoDB\DocumentManager; use Doctrine\ORM\EntityManager; use FOS\UserBundle\Model\UserInterface; @@ -89,10 +88,10 @@ private function updateUserFields(UserInterface $user) /** * Recomputes change set for Doctrine implementations not doing it automatically after the event. * - * @param ObjectManager $om + * @param EntityManager $om * @param UserInterface $user */ - private function recomputeChangeSet(ObjectManager $om, UserInterface $user) + private function recomputeChangeSet(EntityManager $om, UserInterface $user) { $meta = $om->getClassMetadata(get_class($user)); diff --git a/Doctrine/UserManager.php b/Doctrine/UserManager.php index f11ff87c7c..9028837649 100644 --- a/Doctrine/UserManager.php +++ b/Doctrine/UserManager.php @@ -13,6 +13,7 @@ use Doctrine\Common\Persistence\ObjectManager; use Doctrine\Common\Persistence\ObjectRepository; +use Doctrine\ORM\EntityManagerInterface; use FOS\UserBundle\Model\UserInterface; use FOS\UserBundle\Model\UserManager as BaseUserManager; use FOS\UserBundle\Util\CanonicalFieldsUpdater; @@ -35,10 +36,10 @@ class UserManager extends BaseUserManager * * @param PasswordUpdaterInterface $passwordUpdater * @param CanonicalFieldsUpdater $canonicalFieldsUpdater - * @param ObjectManager $om + * @param EntityManagerInterface $om * @param string $class */ - public function __construct(PasswordUpdaterInterface $passwordUpdater, CanonicalFieldsUpdater $canonicalFieldsUpdater, ObjectManager $om, $class) + public function __construct(PasswordUpdaterInterface $passwordUpdater, CanonicalFieldsUpdater $canonicalFieldsUpdater, EntityManagerInterface $om, $class) { parent::__construct($passwordUpdater, $canonicalFieldsUpdater); diff --git a/composer.json b/composer.json index 8337836cb9..0196d237ad 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5 || ^8.0", "paragonie/random_compat": "^1 || ^2 || ^9", "symfony/form": "^4.4 || ^5.0", "symfony/framework-bundle": "^4.4 || ^5.0", @@ -31,7 +31,7 @@ "symfony/translation-contracts": "^2.0", "symfony/twig-bundle": "^4.4 || ^5.0", "symfony/validator": "^4.4 || ^5.0", - "twig/twig": "^1.28 || ^2.0" + "twig/twig": "^1.28 || ^2.0 || ^3.0" }, "conflict": { "doctrine/doctrine-bundle": "<1.3",