8000 Use ConnectionRegistry instead of RegistryInterface. · symfony/symfony@ce6a5ad · GitHub
[go: up one dir, main page]

Skip to content

Commit ce6a5ad

Browse files
committed
Use ConnectionRegistry instead of RegistryInterface.
1 parent b79a1bf commit ce6a5ad

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/Symfony/Component/Messenger/Tests/Transport/Doctrine/DoctrineTransportFactoryTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
namespace Symfony\Component\Messenger\Tests\Transport\Doctrine;
1313

14+
use Doctrine\Common\Persistence\ConnectionRegistry;
1415
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\Doctrine\RegistryInterface;
1616
use Symfony\Component\Messenger\Transport\Doctrine\Connection;
1717
use Symfony\Component\Messenger\Transport\Doctrine\DoctrineTransport;
1818
use Symfony\Component\Messenger\Transport\Doctrine\DoctrineTransportFactory;
@@ -23,7 +23,7 @@ class DoctrineTransportFactoryTest extends TestCase
2323
public function testSupports()
2424
{
2525
$factory = new DoctrineTransportFactory(
26-
$this->getMockBuilder(RegistryInterface::class)->getMock()
26+
$this->getMockBuilder(ConnectionRegistry::class)->getMock()
2727
);
2828

2929
$this->assertTrue($factory->supports('doctrine://default', []));
@@ -35,7 +35,7 @@ public function testCreateTransport()
3535
$connection = $this->getMockBuilder(\Doctrine\DBAL\Connection::class)
3636
->disableOriginalConstructor()
3737
->getMock();
38-
$registry = $this->getMockBuilder(RegistryInterface::class)->getMock();
38+
$registry = $this->getMockBuilder(ConnectionRegistry::class)->getMock();
3939
$registry->expects($this->once())
4040
->method('getConnection')
4141
->willReturn($connection);
@@ -55,7 +55,7 @@ public function testCreateTransport()
5555
*/
5656
public function testCreateTransportMustThrowAnExceptionIfManagerIsNotFound()
5757
{
58-
$registry = $this->getMockBuilder(RegistryInterface::class)->getMock();
58+
$registry = $this->getMockBuilder(ConnectionRegistry::class)->getMock();
5959
$registry->expects($this->once())
6060
->method('getConnection')
6161
->willReturnCallback(function () {

src/Symfony/Component/Messenger/Transport/Doctrine/DoctrineTransportFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\Messenger\Transport\Doctrine;
1313

14-
use Symfony\Bridge\Doctrine\RegistryInterface;
14+
use Doctrine\Common\Persistence\ConnectionRegistry;
1515
use Symfony\Component\Messenger\Exception\TransportException;
1616
use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface;
1717
use Symfony\Component\Messenger\Transport\TransportFactoryInterface;
@@ -24,7 +24,7 @@ class DoctrineTransportFactory implements TransportFactoryInterface
2424
{
2525
private $registry;
2626

27-
public function __construct(RegistryInterface $registry)
27+
public function __construct(ConnectionRegistry $registry)
2828
{
2929
$this-> 9301 ;registry = $registry;
3030
}

src/Symfony/Component/Messenger/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"symfony/console": "^3.4|^4.0|^5.0",
2626
"symfony/dependency-injection": "^3.4.19|^4.1.8|^5.0",
2727
"symfony/error-catcher": "^4.4|^5.0",
28-
"symfony/doctrine-bridge": "^3.4|^4.0|^5.0",
2928
"symfony/event-dispatcher": "^4.3|^5.0",
3029
"symfony/http-kernel": "^4.4|^5.0",
3130
"symfony/process": "^3.4|^4.0|^5.0",

0 commit comments

Comments
 (0)
0