Skip to content

Commit 861963e

Browse files
Slawomir Rostekslawro
authored andcommitted
replace asserting doctrine is instance of Registry with assert it is proper interface
doctrine migration commands is showing warning when using custom implemetation of doctrine manager this is why ive changed assert instance of Registry to assert instance of ManagerRegistry interface as only one method getManagerNames is used that is declared in this interface Fixes #400
1 parent 5718231 commit 861963e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Command/Helper/DoctrineCommandHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
namespace Doctrine\Bundle\MigrationsBundle\Command\Helper;
66

77
use Doctrine\Bundle\DoctrineBundle\Command\Proxy\DoctrineCommandHelper as BaseDoctrineCommandHelper;
8-
use Doctrine\Bundle\DoctrineBundle\Registry;
98
use Doctrine\DBAL\Sharding\PoolingShardConnection;
109
use Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper;
10+
use Doctrine\Persistence\ManagerRegistry;
1111
use LogicException;
1212
use Symfony\Bundle\FrameworkBundle\Console\Application;
1313
use Symfony\Component\Console\Input\InputInterface;
@@ -27,7 +27,7 @@ public static function setApplicationHelper(Application $application, InputInter
2727
{
2828
$container = $application->getKernel()->getContainer();
2929
$doctrine = $container->get('doctrine');
30-
assert($doctrine instanceof Registry);
30+
assert($doctrine instanceof ManagerRegistry);
3131

3232
$managerNames = $doctrine->getManagerNames();
3333

0 commit comments

Comments
 (0)