From 59f081a0d99748c6177a8f43158333ba378b877d Mon Sep 17 00:00:00 2001 From: Jeroen Thora Date: Sat, 10 Jul 2021 16:29:52 +0200 Subject: [PATCH] [AllBundles] Fix doctrine common deprecations and resolve doctrine bundle v2 incompatibility --- composer.json | 5 +++-- src/Kunstmaan/AdminBundle/Service/GroupManager.php | 4 ++-- src/Kunstmaan/AdminBundle/composer.json | 2 +- .../AdminListBundle/Controller/AdminListController.php | 2 +- .../Controller/EntityLockCheckController.php | 3 ++- .../AdminListBundle/Service/EntityVersionLockService.php | 2 +- .../Tests/Service/EntityVersionLockServiceTest.php | 2 +- src/Kunstmaan/AdminListBundle/composer.json | 3 +++ .../FixturesBundle/Builder/BuildingSupervisor.php | 2 +- src/Kunstmaan/FixturesBundle/Loader/FixtureLoader.php | 2 +- src/Kunstmaan/FixturesBundle/composer.json | 3 +++ .../GeneratorBundle/Command/KunstmaanGenerateCommand.php | 2 +- .../GeneratorBundle/DataFixtures/ORM/GroupFixtures.php | 2 +- .../GeneratorBundle/DataFixtures/ORM/RoleFixtures.php | 2 +- .../GeneratorBundle/DataFixtures/ORM/UserFixtures.php | 2 +- .../GeneratorBundle/Generator/ArticleGenerator.php | 4 ++-- .../GeneratorBundle/Generator/ConfigGenerator.php | 4 ++-- .../GeneratorBundle/Generator/KunstmaanGenerator.php | 8 ++++---- .../Generator/Symfony4EntityRepositoryGenerator.php | 4 ++-- .../DataFixtures/ORM/ArticleGenerator/ArticleFixtures.php | 2 +- .../skeleton/article/Entity/Pages/OverviewPage.php | 2 +- .../ORM/DefaultSiteGenerator/DefaultSiteFixtures.php | 2 +- .../ORM/DefaultSiteGenerator/SitemapFixtures.php | 2 +- .../ORM/SearchPageGenerator/SearchFixtures.php | 2 +- src/Kunstmaan/GeneratorBundle/composer.json | 4 ++++ .../MediaBundle/DataFixtures/ORM/FolderFixtures.php | 2 +- .../MediaBundle/Form/Type/IdToMediaTransformer.php | 2 +- src/Kunstmaan/MediaBundle/Form/Type/MediaType.php | 2 +- src/Kunstmaan/MediaBundle/Tests/Form/AbstractTypeTest.php | 2 +- .../MediaBundle/Tests/Helper/FolderManagerTest.php | 4 ++-- src/Kunstmaan/MediaBundle/composer.json | 3 +++ .../NodeBundle/EventListener/NodeTranslationListener.php | 2 +- .../NodeBundle/Helper/NodeAdmin/NodeVersionLockHelper.php | 2 +- src/Kunstmaan/NodeBundle/Tests/Helper/NodeHelperTest.php | 2 +- src/Kunstmaan/NodeBundle/composer.json | 3 +++ .../Tests/Form/PagePartAdminTypeTestCase.php | 2 +- src/Kunstmaan/RedirectBundle/Router/RedirectRouter.php | 2 +- .../RedirectBundle/Tests/Router/RedirectRouterTest.php | 2 +- src/Kunstmaan/RedirectBundle/composer.json | 3 +++ .../DataFixtures/ORM/TranslationFixtures.php | 2 +- src/Kunstmaan/VotingBundle/composer.json | 2 +- 41 files changed, 65 insertions(+), 44 deletions(-) diff --git a/composer.json b/composer.json index 8f8833e6fb..961b8c852b 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "doctrine/inflector": "^1.4|^2.0", "doctrine/orm": "^2.5", "doctrine/dbal": "^2.9", - "doctrine/doctrine-bundle": "^1.6.12|^2.0", + "doctrine/doctrine-bundle": "^1.12.3|^2.0.3", "doctrine/doctrine-cache-bundle": "^1.2", "doctrine/doctrine-migrations-bundle": "^1.3|^2.1", "symfony/swiftmailer-bundle": "^2.3|^3.0", @@ -124,7 +124,8 @@ "kunstmaan/voting-bundle": "self.version" }, "conflict": { - "friendsofsymfony/user-bundle": "<2.0.0" + "friendsofsymfony/user-bundle": "<2.0.0", + "doctrine/persistence": "<1.3" }, "autoload": { "psr-4": { diff --git a/src/Kunstmaan/AdminBundle/Service/GroupManager.php b/src/Kunstmaan/AdminBundle/Service/GroupManager.php index c691b31d16..9150183c2c 100644 --- a/src/Kunstmaan/AdminBundle/Service/GroupManager.php +++ b/src/Kunstmaan/AdminBundle/Service/GroupManager.php @@ -2,8 +2,8 @@ namespace Kunstmaan\AdminBundle\Service; -use Doctrine\Common\Persistence\ObjectRepository; use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\EntityRepository; use Kunstmaan\AdminBundle\Entity\GroupInterface; class GroupManager @@ -12,7 +12,7 @@ class GroupManager private $em; /** @var string */ private $class; - /** @var ObjectRepository */ + /** @var EntityRepository */ private $repository; public function __construct(EntityManagerInterface $em, string $class) diff --git a/src/Kunstmaan/AdminBundle/composer.json b/src/Kunstmaan/AdminBundle/composer.json index bccf1a0cef..761fe19533 100644 --- a/src/Kunstmaan/AdminBundle/composer.json +++ b/src/Kunstmaan/AdminBundle/composer.json @@ -17,7 +17,7 @@ "babdev/pagerfanta-bundle": "^2.5", "doctrine/orm": "^2.5", "doctrine/dbal": "^2.5", - "doctrine/doctrine-bundle": "^1.6.12|^2.0", + "doctrine/doctrine-bundle": "^1.12.3|^2.0.3", "doctrine/doctrine-cache-bundle": "^1.2", "friendsofsymfony/user-bundle": "^2.0", "guzzlehttp/guzzle": "~6.1", diff --git a/src/Kunstmaan/AdminListBundle/Controller/AdminListController.php b/src/Kunstmaan/AdminListBundle/Controller/AdminListController.php index f3ba6604bd..57bf7f75b9 100644 --- a/src/Kunstmaan/AdminListBundle/Controller/AdminListController.php +++ b/src/Kunstmaan/AdminListBundle/Controller/AdminListController.php @@ -31,7 +31,7 @@ abstract class AdminListController extends Controller /** * You can override this method to return the correct entity manager when using multiple databases ... * - * @return \Doctrine\Common\Persistence\ObjectManager|object + * @return \Doctrine\Persistence\ObjectManager|object */ protected function getEntityManager() { diff --git a/src/Kunstmaan/AdminListBundle/Controller/EntityLockCheckController.php b/src/Kunstmaan/AdminListBundle/Controller/EntityLockCheckController.php index 1f681d6b86..0d89d45b7b 100644 --- a/src/Kunstmaan/AdminListBundle/Controller/EntityLockCheckController.php +++ b/src/Kunstmaan/AdminListBundle/Controller/EntityLockCheckController.php @@ -2,6 +2,7 @@ namespace Kunstmaan\AdminListBundle\Controller; +use Kunstmaan\AdminListBundle\Entity\LockableEntityInterface; use Kunstmaan\AdminListBundle\Service\EntityVersionLockService; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\JsonResponse; @@ -14,7 +15,7 @@ class EntityLockCheckController extends Controller /** * You can override this method to return the correct entity manager when using multiple databases ... * - * @return \Doctrine\Common\Persistence\ObjectManager|object + * @return \Doctrine\Persistence\ObjectManager|object */ protected function getEntityManager() { diff --git a/src/Kunstmaan/AdminListBundle/Service/EntityVersionLockService.php b/src/Kunstmaan/AdminListBundle/Service/EntityVersionLockService.php index 884a1ea108..b82ad001db 100644 --- a/src/Kunstmaan/AdminListBundle/Service/EntityVersionLockService.php +++ b/src/Kunstmaan/AdminListBundle/Service/EntityVersionLockService.php @@ -2,7 +2,7 @@ namespace Kunstmaan\AdminListBundle\Service; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Persistence\ObjectManager; use FOS\UserBundle\Model\User; use Kunstmaan\AdminBundle\Entity\UserInterface; use Kunstmaan\AdminListBundle\Entity\EntityVersionLock; diff --git a/src/Kunstmaan/AdminListBundle/Tests/Service/EntityVersionLockServiceTest.php b/src/Kunstmaan/AdminListBundle/Tests/Service/EntityVersionLockServiceTest.php index 7fd8026469..e202eca820 100644 --- a/src/Kunstmaan/AdminListBundle/Tests/Service/EntityVersionLockServiceTest.php +++ b/src/Kunstmaan/AdminListBundle/Tests/Service/EntityVersionLockServiceTest.php @@ -123,7 +123,7 @@ protected function setUp(): void [EntityVersionLock::class, $mockLockRepository], [LockableEntity::class, $mockLockableRepository], ]; - $mockObjectManager = $this->getMockBuilder('Doctrine\Common\Persistence\ObjectManager') + $mockObjectManager = $this->getMockBuilder('Doctrine\Persistence\ObjectManager') ->disableOriginalConstructor() ->getMock(); $mockObjectManager diff --git a/src/Kunstmaan/AdminListBundle/composer.json b/src/Kunstmaan/AdminListBundle/composer.json index 2474f342fa..c180964ac8 100644 --- a/src/Kunstmaan/AdminListBundle/composer.json +++ b/src/Kunstmaan/AdminListBundle/composer.json @@ -29,6 +29,9 @@ "kunstmaan/menu-bundle": "^5.2", "kunstmaan/translator-bundle": "^5.2" }, + "conflict": { + "doctrine/persistence": "<1.3" + }, "minimum-stability": "dev", "autoload": { "psr-4": { "Kunstmaan\\AdminListBundle\\": "" } diff --git a/src/Kunstmaan/FixturesBundle/Builder/BuildingSupervisor.php b/src/Kunstmaan/FixturesBundle/Builder/BuildingSupervisor.php index a2677bf1a4..d126b0c9b4 100644 --- a/src/Kunstmaan/FixturesBundle/Builder/BuildingSupervisor.php +++ b/src/Kunstmaan/FixturesBundle/Builder/BuildingSupervisor.php @@ -3,7 +3,7 @@ namespace Kunstmaan\FixturesBundle\Builder; use Doctrine\Common\Collections\ArrayCollection; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Persistence\ObjectManager; use Kunstmaan\FixturesBundle\Loader\Fixture; use Kunstmaan\FixturesBundle\Parser\Parser; use Kunstmaan\FixturesBundle\Populator\Populator; diff --git a/src/Kunstmaan/FixturesBundle/Loader/FixtureLoader.php b/src/Kunstmaan/FixturesBundle/Loader/FixtureLoader.php index 36737a44d2..2cd3a376ec 100644 --- a/src/Kunstmaan/FixturesBundle/Loader/FixtureLoader.php +++ b/src/Kunstmaan/FixturesBundle/Loader/FixtureLoader.php @@ -3,7 +3,7 @@ namespace Kunstmaan\FixturesBundle\Loader; use Doctrine\Common\DataFixtures\FixtureInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Persistence\ObjectManager; use Faker\Factory; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; diff --git a/src/Kunstmaan/FixturesBundle/composer.json b/src/Kunstmaan/FixturesBundle/composer.json index 826ac4db39..4a608b248b 100644 --- a/src/Kunstmaan/FixturesBundle/composer.json +++ b/src/Kunstmaan/FixturesBundle/composer.json @@ -35,6 +35,9 @@ "symfony/phpunit-bridge": "^5.1", "phpunit/phpunit": "^8.5" }, + "conflict": { + "doctrine/persistence": "<1.3" + }, "autoload": { "psr-4": { "Kunstmaan\\FixturesBundle\\": "" diff --git a/src/Kunstmaan/GeneratorBundle/Command/KunstmaanGenerateCommand.php b/src/Kunstmaan/GeneratorBundle/Command/KunstmaanGenerateCommand.php index c9d1f2e845..9d1c69d3f0 100644 --- a/src/Kunstmaan/GeneratorBundle/Command/KunstmaanGenerateCommand.php +++ b/src/Kunstmaan/GeneratorBundle/Command/KunstmaanGenerateCommand.php @@ -471,7 +471,7 @@ function ($name) use ($generator, $container) { /* * Replace slash to backslash. Eg: CmsBundle:Blog/Comment --> CmsBundle:Blog\Comment * - * @see \Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory::getMetadataFor() + * @see \Doctrine\Persistence\Mapping\AbstractClassMetadataFactory::getMetadataFor() * @see \Doctrine\ORM\Mapping\ClassMetadataFactory::getFqcnFromAlias() */ if (!$this->isSymfony4()) { diff --git a/src/Kunstmaan/GeneratorBundle/DataFixtures/ORM/GroupFixtures.php b/src/Kunstmaan/GeneratorBundle/DataFixtures/ORM/GroupFixtures.php index d02e0327d0..93d478b368 100644 --- a/src/Kunstmaan/GeneratorBundle/DataFixtures/ORM/GroupFixtures.php +++ b/src/Kunstmaan/GeneratorBundle/DataFixtures/ORM/GroupFixtures.php @@ -4,7 +4,7 @@ use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Persistence\ObjectManager; use Kunstmaan\AdminBundle\Entity\Group; /** diff --git a/src/Kunstmaan/GeneratorBundle/DataFixtures/ORM/RoleFixtures.php b/src/Kunstmaan/GeneratorBundle/DataFixtures/ORM/RoleFixtures.php index ad60513252..2afb9ae2b1 100644 --- a/src/Kunstmaan/GeneratorBundle/DataFixtures/ORM/RoleFixtures.php +++ b/src/Kunstmaan/GeneratorBundle/DataFixtures/ORM/RoleFixtures.php @@ -4,7 +4,7 @@ use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Persistence\ObjectManager; use Kunstmaan\AdminBundle\Entity\Role; /** diff --git a/src/Kunstmaan/GeneratorBundle/DataFixtures/ORM/UserFixtures.php b/src/Kunstmaan/GeneratorBundle/DataFixtures/ORM/UserFixtures.php index 17a83e0ae5..e97c71d54e 100644 --- a/src/Kunstmaan/GeneratorBundle/DataFixtures/ORM/UserFixtures.php +++ b/src/Kunstmaan/GeneratorBundle/DataFixtures/ORM/UserFixtures.php @@ -4,7 +4,7 @@ use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Persistence\ObjectManager; use Kunstmaan\AdminBundle\Entity\User; use Symfony\Component\Console\Output\ConsoleOutput; use Symfony\Component\DependencyInjection\ContainerAwareInterface; diff --git a/src/Kunstmaan/GeneratorBundle/Generator/ArticleGenerator.php b/src/Kunstmaan/GeneratorBundle/Generator/ArticleGenerator.php index 85a6a61478..7424dcffac 100644 --- a/src/Kunstmaan/GeneratorBundle/Generator/ArticleGenerator.php +++ b/src/Kunstmaan/GeneratorBundle/Generator/ArticleGenerator.php @@ -2,9 +2,9 @@ namespace Kunstmaan\GeneratorBundle\Generator; +use Doctrine\Persistence\ManagerRegistry; use Kunstmaan\GeneratorBundle\Helper\CommandAssistant; use Kunstmaan\GeneratorBundle\Helper\GeneratorUtils; -use Symfony\Bridge\Doctrine\RegistryInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpKernel\Bundle\BundleInterface; @@ -32,7 +32,7 @@ class ArticleGenerator extends KunstmaanGenerator /** * @param string $skeletonDir */ - public function __construct(Filesystem $filesystem, RegistryInterface $registry, $skeletonDir, array $parentPages, CommandAssistant $assistant, ContainerInterface $container) + public function __construct(Filesystem $filesystem, ManagerRegistry $registry, $skeletonDir, array $parentPages, CommandAssistant $assistant, ContainerInterface $container) { parent::__construct($filesystem, $registry, $skeletonDir, $assistant, $container); $this->parentPages = $parentPages; diff --git a/src/Kunstmaan/GeneratorBundle/Generator/ConfigGenerator.php b/src/Kunstmaan/GeneratorBundle/Generator/ConfigGenerator.php index 62ca2188c7..37c8b2cdff 100644 --- a/src/Kunstmaan/GeneratorBundle/Generator/ConfigGenerator.php +++ b/src/Kunstmaan/GeneratorBundle/Generator/ConfigGenerator.php @@ -2,8 +2,8 @@ namespace Kunstmaan\GeneratorBundle\Generator; +use Doctrine\Persistence\ManagerRegistry; use Kunstmaan\GeneratorBundle\Helper\CommandAssistant; -use Symfony\Bridge\Doctrine\RegistryInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\Filesystem\Filesystem; @@ -15,7 +15,7 @@ class ConfigGenerator extends KunstmaanGenerator /** @var bool */ private $newAuthentication; - public function __construct(Filesystem $filesystem, RegistryInterface $registry, $skeletonDir, CommandAssistant $assistant, ContainerInterface $container = null, bool $newAuthentication = false) + public function __construct(Filesystem $filesystem, ManagerRegistry $registry, $skeletonDir, CommandAssistant $assistant, ContainerInterface $container = null, bool $newAuthentication = false) { parent::__construct($filesystem, $registry, $skeletonDir, $assistant, $container); $this->newAuthentication = $newAuthentication; diff --git a/src/Kunstmaan/GeneratorBundle/Generator/KunstmaanGenerator.php b/src/Kunstmaan/GeneratorBundle/Generator/KunstmaanGenerator.php index 0a3e0bf13c..66bb865148 100644 --- a/src/Kunstmaan/GeneratorBundle/Generator/KunstmaanGenerator.php +++ b/src/Kunstmaan/GeneratorBundle/Generator/KunstmaanGenerator.php @@ -7,10 +7,10 @@ use Doctrine\ORM\Mapping\UnderscoreNamingStrategy; use Doctrine\ORM\Tools\EntityGenerator; use Doctrine\ORM\Tools\EntityRepositoryGenerator; +use Doctrine\Persistence\ManagerRegistry; use Kunstmaan\GeneratorBundle\Helper\CommandAssistant; use Kunstmaan\GeneratorBundle\Helper\GeneratorUtils; use Sensio\Bundle\GeneratorBundle\Generator\Generator; -use Symfony\Bridge\Doctrine\RegistryInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Finder\Finder; @@ -31,7 +31,7 @@ class KunstmaanGenerator extends Generator protected $filesystem; /** - * @var RegistryInterface + * @var ManagerRegistry */ protected $registry; @@ -52,14 +52,14 @@ class KunstmaanGenerator extends Generator /** * @param Filesystem $filesystem The filesystem - * @param RegistryInterface $registry The registry + * @param ManagerRegistry $registry The registry * @param string $skeletonDir The directory of the skeleton * @param CommandAssistant $assistant The command assistant * @param ContainerInterface $container The container */ public function __construct( Filesystem $filesystem, - RegistryInterface $registry, + ManagerRegistry $registry, $skeletonDir, CommandAssistant $assistant, ContainerInterface $container = null diff --git a/src/Kunstmaan/GeneratorBundle/Generator/Symfony4EntityRepositoryGenerator.php b/src/Kunstmaan/GeneratorBundle/Generator/Symfony4EntityRepositoryGenerator.php index ceb95e2b98..b2c990478c 100644 --- a/src/Kunstmaan/GeneratorBundle/Generator/Symfony4EntityRepositoryGenerator.php +++ b/src/Kunstmaan/GeneratorBundle/Generator/Symfony4EntityRepositoryGenerator.php @@ -14,11 +14,11 @@ final class Symfony4EntityRepositoryGenerator use ; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; -use Symfony\Bridge\Doctrine\RegistryInterface; +use Doctrine\Persistence\ManagerRegistry; class extends ServiceEntityRepository { - public function __construct(RegistryInterface $registry) + public function __construct(ManagerRegistry $registry) { parent::__construct($registry, ::class); } diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/DataFixtures/ORM/ArticleGenerator/ArticleFixtures.php b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/DataFixtures/ORM/ArticleGenerator/ArticleFixtures.php index ba404b06bb..33df0d1a12 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/DataFixtures/ORM/ArticleGenerator/ArticleFixtures.php +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/DataFixtures/ORM/ArticleGenerator/ArticleFixtures.php @@ -5,7 +5,7 @@ use Doctrine\Bundle\FixturesBundle\ORMFixtureInterface; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Persistence\ObjectManager; use Faker\Factory; use Faker\Provider\DateTime; use Faker\Provider\Lorem; diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/Entity/Pages/OverviewPage.php b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/Entity/Pages/OverviewPage.php index 2e8042a09b..3826a88e44 100755 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/Entity/Pages/OverviewPage.php +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/Entity/Pages/OverviewPage.php @@ -29,7 +29,7 @@ public function getPageTemplates(): array /** * @param \Doctrine\ORM\EntityManagerInterface $em * - * @return \Doctrine\Common\Persistence\ObjectRepository + * @return \Doctrine\Persistence\ObjectRepository */ public function getArticleRepository($em) { diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/DataFixtures/ORM/DefaultSiteGenerator/DefaultSiteFixtures.php b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/DataFixtures/ORM/DefaultSiteGenerator/DefaultSiteFixtures.php index dcd5b80f40..469eca31ec 100755 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/DataFixtures/ORM/DefaultSiteGenerator/DefaultSiteFixtures.php +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/DataFixtures/ORM/DefaultSiteGenerator/DefaultSiteFixtures.php @@ -5,7 +5,7 @@ use Doctrine\Bundle\FixturesBundle\ORMFixtureInterface; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Persistence\ObjectManager; use Kunstmaan\AdminBundle\Entity\DashboardConfiguration; use Kunstmaan\MediaBundle\Entity\Media; use Kunstmaan\MediaBundle\Helper\RemoteVideo\RemoteVideoHelper; diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/DataFixtures/ORM/DefaultSiteGenerator/SitemapFixtures.php b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/DataFixtures/ORM/DefaultSiteGenerator/SitemapFixtures.php index edba89c530..a164b1d7ac 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/DataFixtures/ORM/DefaultSiteGenerator/SitemapFixtures.php +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/DataFixtures/ORM/DefaultSiteGenerator/SitemapFixtures.php @@ -5,7 +5,7 @@ use Doctrine\Bundle\FixturesBundle\ORMFixtureInterface; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Persistence\ObjectManager; use Kunstmaan\SitemapBundle\Entity\SitemapPage; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/searchpage/DataFixtures/ORM/SearchPageGenerator/SearchFixtures.php b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/searchpage/DataFixtures/ORM/SearchPageGenerator/SearchFixtures.php index 5b82b357f9..5d8dcf0aa8 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/searchpage/DataFixtures/ORM/SearchPageGenerator/SearchFixtures.php +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/searchpage/DataFixtures/ORM/SearchPageGenerator/SearchFixtures.php @@ -5,7 +5,7 @@ use Doctrine\Bundle\FixturesBundle\ORMFixtureInterface; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Persistence\ObjectManager; use Kunstmaan\UtilitiesBundle\Helper\Slugifier; diff --git a/src/Kunstmaan/GeneratorBundle/composer.json b/src/Kunstmaan/GeneratorBundle/composer.json index 7edb852ea5..7fe232fb8d 100644 --- a/src/Kunstmaan/GeneratorBundle/composer.json +++ b/src/Kunstmaan/GeneratorBundle/composer.json @@ -16,6 +16,7 @@ "require": { "php": "^7.2", "doctrine/inflector": "^1.4|^2.0", + "doctrine/data-fixtures": "^1.5", "fzaninotto/faker": "~1.6", "kunstmaan/admin-bundle": "^5.9", "kunstmaan/adminlist-bundle": "~5.2", @@ -32,6 +33,9 @@ "symfony/phpunit-bridge": "^5.1", "phpunit/phpunit": "^8.5" }, + "conflict": { + "doctrine/persistence": "<1.3" + }, "autoload": { "psr-4": { "Kunstmaan\\GeneratorBundle\\": "" } }, diff --git a/src/Kunstmaan/MediaBundle/DataFixtures/ORM/FolderFixtures.php b/src/Kunstmaan/MediaBundle/DataFixtures/ORM/FolderFixtures.php index 24fcebe956..7b16da69bf 100644 --- a/src/Kunstmaan/MediaBundle/DataFixtures/ORM/FolderFixtures.php +++ b/src/Kunstmaan/MediaBundle/DataFixtures/ORM/FolderFixtures.php @@ -4,7 +4,7 @@ use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Persistence\ObjectManager; use Kunstmaan\MediaBundle\Entity\Folder; /** diff --git a/src/Kunstmaan/MediaBundle/Form/Type/IdToMediaTransformer.php b/src/Kunstmaan/MediaBundle/Form/Type/IdToMediaTransformer.php index 348290686c..808207c25a 100644 --- a/src/Kunstmaan/MediaBundle/Form/Type/IdToMediaTransformer.php +++ b/src/Kunstmaan/MediaBundle/Form/Type/IdToMediaTransformer.php @@ -3,7 +3,7 @@ namespace Kunstmaan\MediaBundle\Form\Type; use Doctrine\Common\Collections\Collection; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Persistence\ObjectManager; use Kunstmaan\MediaBundle\Entity\Media; use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\Exception\TransformationFailedException; diff --git a/src/Kunstmaan/MediaBundle/Form/Type/MediaType.php b/src/Kunstmaan/MediaBundle/Form/Type/MediaType.php index adcd2d5894..829390604e 100644 --- a/src/Kunstmaan/MediaBundle/Form/Type/MediaType.php +++ b/src/Kunstmaan/MediaBundle/Form/Type/MediaType.php @@ -2,7 +2,7 @@ namespace Kunstmaan\MediaBundle\Form\Type; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Persistence\ObjectManager; use Kunstmaan\MediaBundle\Helper\MediaManager; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\FormType; diff --git a/src/Kunstmaan/MediaBundle/Tests/Form/AbstractTypeTest.php b/src/Kunstmaan/MediaBundle/Tests/Form/AbstractTypeTest.php index 933273cc7d..30ed628fe9 100644 --- a/src/Kunstmaan/MediaBundle/Tests/Form/AbstractTypeTest.php +++ b/src/Kunstmaan/MediaBundle/Tests/Form/AbstractTypeTest.php @@ -36,7 +36,7 @@ protected function setUp(): void { $formFactoryBuilderInterface = Forms::createFormFactoryBuilder(); $formFactoryBuilderInterface->addType(new URLChooserType()); - $formFactoryBuilderInterface->addTypeGuesser(new DoctrineOrmTypeGuesser($this->createMock('Doctrine\Common\Persistence\ManagerRegistry'))); + $formFactoryBuilderInterface->addTypeGuesser(new DoctrineOrmTypeGuesser($this->createMock('Doctrine\Persistence\ManagerRegistry'))); $this->factory = $formFactoryBuilderInterface->getFormFactory(); $this->dispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $this->builder = new FormBuilder(null, null, $this->dispatcher, $this->factory); diff --git a/src/Kunstmaan/MediaBundle/Tests/Helper/FolderManagerTest.php b/src/Kunstmaan/MediaBundle/Tests/Helper/FolderManagerTest.php index 5b76893533..d291a5761a 100644 --- a/src/Kunstmaan/MediaBundle/Tests/Helper/FolderManagerTest.php +++ b/src/Kunstmaan/MediaBundle/Tests/Helper/FolderManagerTest.php @@ -2,7 +2,7 @@ namespace Kunstmaan\MediaBundle\Tests\Helper; -use Doctrine\Common\Persistence\ObjectRepository; +use Doctrine\ORM\EntityRepository; use Kunstmaan\MediaBundle\Entity\Folder; use Kunstmaan\MediaBundle\Helper\FolderManager; use PHPUnit\Framework\TestCase; @@ -10,7 +10,7 @@ class FolderManagerTest extends TestCase { /** - * @var ObjectRepository + * @var EntityRepository */ protected $repository; diff --git a/src/Kunstmaan/MediaBundle/composer.json b/src/Kunstmaan/MediaBundle/composer.json index 3f426ff19f..cf087ca3a2 100644 --- a/src/Kunstmaan/MediaBundle/composer.json +++ b/src/Kunstmaan/MediaBundle/composer.json @@ -29,6 +29,9 @@ "symfony/phpunit-bridge": "^5.1", "phpunit/phpunit": "^8.5" }, + "conflict": { + "doctrine/persistence": "<1.3" + }, "suggest": { "ext-imagick": "to support PDF preview images" }, diff --git a/src/Kunstmaan/NodeBundle/EventListener/NodeTranslationListener.php b/src/Kunstmaan/NodeBundle/EventListener/NodeTranslationListener.php index 8723fd0ac9..0247c59154 100644 --- a/src/Kunstmaan/NodeBundle/EventListener/NodeTranslationListener.php +++ b/src/Kunstmaan/NodeBundle/EventListener/NodeTranslationListener.php @@ -2,11 +2,11 @@ namespace Kunstmaan\NodeBundle\EventListener; -use Doctrine\Common\Persistence\Mapping\MappingException; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Event\LifecycleEventArgs; use Doctrine\ORM\Event\OnFlushEventArgs; use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\Persistence\Mapping\MappingException; use Kunstmaan\AdminBundle\FlashMessages\FlashTypes; use Kunstmaan\AdminBundle\Helper\DomainConfigurationInterface; use Kunstmaan\NodeBundle\Entity\HasNodeInterface; diff --git a/src/Kunstmaan/NodeBundle/Helper/NodeAdmin/NodeVersionLockHelper.php b/src/Kunstmaan/NodeBundle/Helper/NodeAdmin/NodeVersionLockHelper.php index 0379232d5c..63d108c35f 100644 --- a/src/Kunstmaan/NodeBundle/Helper/NodeAdmin/NodeVersionLockHelper.php +++ b/src/Kunstmaan/NodeBundle/Helper/NodeAdmin/NodeVersionLockHelper.php @@ -2,7 +2,7 @@ namespace Kunstmaan\NodeBundle\Helper\NodeAdmin; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Persistence\ObjectManager; use Kunstmaan\AdminBundle\Entity\BaseUser; use Kunstmaan\NodeBundle\Entity\NodeTranslation; use Kunstmaan\NodeBundle\Entity\NodeVersionLock; diff --git a/src/Kunstmaan/NodeBundle/Tests/Helper/NodeHelperTest.php b/src/Kunstmaan/NodeBundle/Tests/Helper/NodeHelperTest.php index 5a328168b8..273416678a 100644 --- a/src/Kunstmaan/NodeBundle/Tests/Helper/NodeHelperTest.php +++ b/src/Kunstmaan/NodeBundle/Tests/Helper/NodeHelperTest.php @@ -2,9 +2,9 @@ namespace Kunstmaan\NodeBundle\Tests\Helper; -use Doctrine\Common\Persistence\ObjectRepository; use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManagerInterface; +use Doctrine\Persistence\ObjectRepository; use Kunstmaan\AdminBundle\Entity\User; use Kunstmaan\AdminBundle\Helper\CloneHelper; use Kunstmaan\AdminBundle\Helper\FormWidgets\Tabs\TabPane; diff --git a/src/Kunstmaan/NodeBundle/composer.json b/src/Kunstmaan/NodeBundle/composer.json index df0d281f31..c8a6cb2ac2 100644 --- a/src/Kunstmaan/NodeBundle/composer.json +++ b/src/Kunstmaan/NodeBundle/composer.json @@ -28,6 +28,9 @@ "symfony/phpunit-bridge": "^5.1", "phpunit/phpunit": "^8.5" }, + "conflict": { + "doctrine/persistence": "<1.3" + }, "minimum-stability": "dev", "autoload": { "psr-4": { "Kunstmaan\\NodeBundle\\": "" } diff --git a/src/Kunstmaan/PagePartBundle/Tests/Form/PagePartAdminTypeTestCase.php b/src/Kunstmaan/PagePartBundle/Tests/Form/PagePartAdminTypeTestCase.php index 5d024ea07f..c8567a09ef 100644 --- a/src/Kunstmaan/PagePartBundle/Tests/Form/PagePartAdminTypeTestCase.php +++ b/src/Kunstmaan/PagePartBundle/Tests/Form/PagePartAdminTypeTestCase.php @@ -39,7 +39,7 @@ protected function setUp(): void { $formFactoryBuilderInterface = Forms::createFormFactoryBuilder(); $formFactoryBuilderInterface->addType(new URLChooserType()); - $formFactoryBuilderInterface->addTypeGuesser(new DoctrineOrmTypeGuesser($this->createMock('Doctrine\Common\Persistence\ManagerRegistry'))); + $formFactoryBuilderInterface->addTypeGuesser(new DoctrineOrmTypeGuesser($this->createMock('Doctrine\Persistence\ManagerRegistry'))); $this->factory = $formFactoryBuilderInterface->getFormFactory(); $this->dispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $this->builder = new FormBuilder(null, null, $this->dispatcher, $this->factory); diff --git a/src/Kunstmaan/RedirectBundle/Router/RedirectRouter.php b/src/Kunstmaan/RedirectBundle/Router/RedirectRouter.php index 592148fdd4..b8a5935601 100644 --- a/src/Kunstmaan/RedirectBundle/Router/RedirectRouter.php +++ b/src/Kunstmaan/RedirectBundle/Router/RedirectRouter.php @@ -2,7 +2,7 @@ namespace Kunstmaan\RedirectBundle\Router; -use Doctrine\Common\Persistence\ObjectRepository; +use Doctrine\Persistence\ObjectRepository; use Kunstmaan\AdminBundle\Helper\DomainConfigurationInterface; use Kunstmaan\RedirectBundle\Entity\Redirect; use Symfony\Component\Routing\Exception\RouteNotFoundException; diff --git a/src/Kunstmaan/RedirectBundle/Tests/Router/RedirectRouterTest.php b/src/Kunstmaan/RedirectBundle/Tests/Router/RedirectRouterTest.php index 2f9d3e41c1..52f91c7c3c 100644 --- a/src/Kunstmaan/RedirectBundle/Tests/Router/RedirectRouterTest.php +++ b/src/Kunstmaan/RedirectBundle/Tests/Router/RedirectRouterTest.php @@ -2,7 +2,7 @@ namespace Kunstmaan\RedirectBundle\Tests\Router; -use Doctrine\Common\Persistence\ObjectRepository; +use Doctrine\Persistence\ObjectRepository; use Kunstmaan\AdminBundle\Helper\DomainConfigurationInterface; use Kunstmaan\RedirectBundle\Entity\Redirect; use Kunstmaan\RedirectBundle\Router\RedirectRouter; diff --git a/src/Kunstmaan/RedirectBundle/composer.json b/src/Kunstmaan/RedirectBundle/composer.json index 243d9fd14d..9b2a2daf77 100644 --- a/src/Kunstmaan/RedirectBundle/composer.json +++ b/src/Kunstmaan/RedirectBundle/composer.json @@ -23,6 +23,9 @@ "symfony/phpunit-bridge": "^5.1", "phpunit/phpunit": "^8.5" }, + "conflict": { + "doctrine/persistence": "<1.3" + }, "minimum-stability": "dev", "autoload": { "psr-4": { "Kunstmaan\\RedirectBundle\\": "" } diff --git a/src/Kunstmaan/TranslatorBundle/DataFixtures/ORM/TranslationFixtures.php b/src/Kunstmaan/TranslatorBundle/DataFixtures/ORM/TranslationFixtures.php index fae8dd5e11..e2d248212b 100644 --- a/src/Kunstmaan/TranslatorBundle/DataFixtures/ORM/TranslationFixtures.php +++ b/src/Kunstmaan/TranslatorBundle/DataFixtures/ORM/TranslationFixtures.php @@ -4,7 +4,7 @@ use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Persistence\ObjectManager; use Kunstmaan\TranslatorBundle\Entity\Translation as Entity; use Kunstmaan\TranslatorBundle\Model\Translation as Model; diff --git a/src/Kunstmaan/VotingBundle/composer.json b/src/Kunstmaan/VotingBundle/composer.json index f8f519cf5d..e9bf711812 100644 --- a/src/Kunstmaan/VotingBundle/composer.json +++ b/src/Kunstmaan/VotingBundle/composer.json @@ -17,7 +17,7 @@ "php": "^7.2", "doctrine/orm": "^2.5", "doctrine/dbal": "^2.5", - "doctrine/doctrine-bundle": "^1.6.12|^2.0", + "doctrine/doctrine-bundle": "^1.12.3|^2.0.3", "doctrine/doctrine-cache-bundle": "^1.2", "sensio/framework-extra-bundle": "^5.0", "symfony/config": "^3.4|^4.4",