-
-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1179 Deprecate doctrine:query:sql command
- Loading branch information
1 parent
6396475
commit 95c9daf
Showing
5 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Doctrine\Bundle\DoctrineBundle\Dbal; | ||
|
||
use Doctrine\DBAL\Connection; | ||
use Doctrine\DBAL\Tools\Console\ConnectionProvider; | ||
use Doctrine\Persistence\AbstractManagerRegistry; | ||
|
||
class ManagerRegistryAwareConnectionProvider implements ConnectionProvider | ||
{ | ||
/** @var AbstractManagerRegistry */ | ||
private $managerRegistry; | ||
|
||
public function __construct(AbstractManagerRegistry $managerRegistry) | ||
{ | ||
$this->managerRegistry = $managerRegistry; | ||
} | ||
|
||
public function getDefaultConnection() : Connection | ||
{ | ||
return $this->managerRegistry->getConnection(); | ||
} | ||
|
||
public function getConnection(string $name) : Connection | ||
{ | ||
return $this->managerRegistry->getConnection($name); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
UPGRADE FROM 2.1 to 2.2 | ||
======================= | ||
|
||
Commands | ||
-------- | ||
|
||
* `doctrine:query:sql` command has been deprecated. Use `dbal:run-sql` command instead. |