Skip to content

[DoctrineClearIdentityMapExtension] allow instances of ManagerRegistry #927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

namespace Enqueue\Bundle\Consumption\Extension;

use Doctrine\Common\Persistence\ManagerRegistry;
use Enqueue\Consumption\Context\MessageReceived;
use Enqueue\Consumption\MessageReceivedExtensionInterface;
use Symfony\Bridge\Doctrine\RegistryInterface;

class DoctrineClearIdentityMapExtension implements MessageReceivedExtensionInterface
{
/**
* @var RegistryInterface
* @var ManagerRegistry
*/
protected $registry;

/**
* @param RegistryInterface $registry
* @param ManagerRegistry $registry
*/
public function __construct(RegistryInterface $registry)
public function __construct(ManagerRegistry $registry)
{
$this->registry = $registry;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Enqueue\Bundle\Tests\Unit\Consumption\Extension;

use Doctrine\Common\Persistence\ManagerRegistry;
use Doctrine\Common\Persistence\ObjectManager;
use Enqueue\Bundle\Consumption\Extension\DoctrineClearIdentityMapExtension;
use Enqueue\Consumption\Context\MessageReceived;
Expand All @@ -11,7 +12,6 @@
use Interop\Queue\Processor;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
use Symfony\Bridge\Doctrine\RegistryInterface;

class DoctrineClearIdentityMapExtensionTest extends TestCase
{
Expand Down Expand Up @@ -59,11 +59,11 @@ protected function createContext(): MessageReceived
}

/**
* @return \PHPUnit_Framework_MockObject_MockObject|RegistryInterface
* @return \PHPUnit_Framework_MockObject_MockObject|ManagerRegistry
*/
protected function createRegistryMock(): RegistryInterface
protected function createRegistryMock(): ManagerRegistry
{
return $this->createMock(RegistryInterface::class);
return $this->createMock(ManagerRegistry::class);
}

/**
Expand Down