Skip to content

Commit e4e52b1

Browse files
Garfield-frfabpot
authored andcommitted
Change syntax on doctrine dbal call
1 parent d8966d0 commit e4e52b1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

guides/doctrine/dbal/configuration.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@ them under the key named ``connections``:
5252
host: localhost
5353
5454
If you have defined multiple connections you can use the
55-
``getDatabaseConnection()`` as well but you must pass it an argument with the
55+
``$this->get('doctrine.dbal.[connectionname]_connection)``
56+
as well but you must pass it an argument with the
5657
connection name that you want get::
5758

5859
class UserController extends Controller
5960
{
6061
public function indexAction()
6162
{
62-
$conn = $this->container->getDatabaseConnection('customer');
63+
$conn = $this->get('doctrine.dbal.customer_connection');
6364
}
6465
}

0 commit comments

Comments
 (0)