Unverified Commit 70666011 authored by Sergei Morozov's avatar Sergei Morozov Committed by GitHub

Merge pull request #3793 from mhitza/patch-1

Remove superfluous Configuration instance
parents 400f6044 b5a71d17
...@@ -10,7 +10,6 @@ You can get a DBAL Connection through the ...@@ -10,7 +10,6 @@ You can get a DBAL Connection through the
.. code-block:: php .. code-block:: php
<?php <?php
$config = new \Doctrine\DBAL\Configuration();
//.. //..
$connectionParams = array( $connectionParams = array(
'dbname' => 'mydb', 'dbname' => 'mydb',
...@@ -19,19 +18,18 @@ You can get a DBAL Connection through the ...@@ -19,19 +18,18 @@ You can get a DBAL Connection through the
'host' => 'localhost', 'host' => 'localhost',
'driver' => 'pdo_mysql', 'driver' => 'pdo_mysql',
); );
$conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config); $conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams);
Or, using the simpler URL form: Or, using the simpler URL form:
.. code-block:: php .. code-block:: php
<?php <?php
$config = new \Doctrine\DBAL\Configuration();
//.. //..
$connectionParams = array( $connectionParams = array(
'url' => 'mysql://user:secret@localhost/mydb', 'url' => 'mysql://user:secret@localhost/mydb',
); );
$conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config); $conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams);
The ``DriverManager`` returns an instance of The ``DriverManager`` returns an instance of
``Doctrine\DBAL\Connection`` which is a wrapper around the ``Doctrine\DBAL\Connection`` which is a wrapper around the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment