Skip to content

Commit

Permalink
change Symfony\Bridge\Doctrine\RegistryInterface to Doctrine\Persiste…
Browse files Browse the repository at this point in the history
…nce\ManagerRegistry
  • Loading branch information
mhinterding committed Feb 8, 2023
1 parent e1da65b commit e012144
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/Entity/BlockInteractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
namespace Sonata\PageBundle\Entity;

use Doctrine\ORM\EntityManager;
use Doctrine\Persistence\ManagerRegistry;
use Sonata\BlockBundle\Model\BlockManagerInterface;
use Sonata\PageBundle\Model\BlockInteractorInterface;
use Sonata\PageBundle\Model\PageInterface;
use Symfony\Bridge\Doctrine\RegistryInterface;

/**
* This class interacts with blocks.
Expand All @@ -32,7 +32,7 @@ class BlockInteractor implements BlockInteractorInterface
protected $pageBlocksLoaded = [];

/**
* @var RegistryInterface
* @var ManagerRegistry
*/
protected $registry;

Expand All @@ -42,10 +42,10 @@ class BlockInteractor implements BlockInteractorInterface
protected $blockManager;

/**
* @param RegistryInterface $registry Doctrine registry
* @param ManagerRegistry $registry Doctrine registry
* @param BlockManagerInterface $blockManager Block manager
*/
public function __construct(RegistryInterface $registry, BlockManagerInterface $blockManager)
public function __construct(ManagerRegistry $registry, BlockManagerInterface $blockManager)
{
$this->blockManager = $blockManager;
$this->registry = $registry;
Expand Down
7 changes: 4 additions & 3 deletions src/Entity/Transformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\Persistence\ManagerRegistry;
use Sonata\BlockBundle\Model\BlockInterface;
use Sonata\BlockBundle\Model\BlockManagerInterface;
use Sonata\PageBundle\Model\PageInterface;
Expand Down Expand Up @@ -51,17 +52,17 @@ class Transformer implements TransformerInterface
protected $children = [];

/**
* @var RegistryInterface
* @var ManagerRegistry
*/
protected $registry;

/**
* @param SnapshotManagerInterface $snapshotManager
* @param PageManagerInterface $pageManager
* @param BlockManagerInterface $blockManager
* @param RegistryInterface $registry
* @param ManagerRegistry $registry
*/
public function __construct(SnapshotManagerInterface $snapshotManager, PageManagerInterface $pageManager, BlockManagerInterface $blockManager, RegistryInterface $registry)
public function __construct(SnapshotManagerInterface $snapshotManager, PageManagerInterface $pageManager, BlockManagerInterface $blockManager, ManagerRegistry $registry)
{
$this->snapshotManager = $snapshotManager;
$this->pageManager = $pageManager;
Expand Down
4 changes: 2 additions & 2 deletions tests/Model/BlockInteractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

namespace Sonata\PageBundle\Tests\Model;

use Doctrine\Persistence\ManagerRegistry;
use PHPUnit\Framework\TestCase;
use Sonata\BlockBundle\Model\Block;
use Sonata\BlockBundle\Model\BlockInterface;
use Sonata\BlockBundle\Model\BlockManagerInterface;
use Sonata\PageBundle\Entity\BlockInteractor;
use Symfony\Bridge\Doctrine\RegistryInterface;

/**
* @author Vincent Composieux <[email protected]>
Expand All @@ -30,7 +30,7 @@ class BlockInteractorTest extends TestCase
*/
public function testCreateNewContainer()
{
$registry = $this->createMock(RegistryInterface::class);
$registry = $this->createMock(ManagerRegistry::class);

$blockManager = $this->createMock(BlockManagerInterface::class);
$blockManager->expects($this->any())->method('create')->willReturn(new Block());
Expand Down

0 comments on commit e012144

Please sign in to comment.