composer update
This commit is contained in:
@@ -1,35 +1,16 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Driver\PDOPgSql;
|
||||
|
||||
use Doctrine\DBAL\DBALException;
|
||||
use Doctrine\DBAL\Driver\AbstractPostgreSQLDriver;
|
||||
use Doctrine\DBAL\Driver\PDOConnection;
|
||||
use Doctrine\DBAL\DBALException;
|
||||
use PDOException;
|
||||
use PDO;
|
||||
use PDOException;
|
||||
use function defined;
|
||||
|
||||
/**
|
||||
* Driver that connects through pdo_pgsql.
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
class Driver extends AbstractPostgreSQLDriver
|
||||
{
|
||||
@@ -48,7 +29,7 @@ class Driver extends AbstractPostgreSQLDriver
|
||||
|
||||
if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')
|
||||
&& (! isset($driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES])
|
||||
|| true === $driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES]
|
||||
|| $driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES] === true
|
||||
)
|
||||
) {
|
||||
$pdo->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES, true);
|
||||
@@ -71,7 +52,7 @@ class Driver extends AbstractPostgreSQLDriver
|
||||
/**
|
||||
* Constructs the Postgres PDO DSN.
|
||||
*
|
||||
* @param array $params
|
||||
* @param mixed[] $params
|
||||
*
|
||||
* @return string The DSN.
|
||||
*/
|
||||
@@ -79,11 +60,11 @@ class Driver extends AbstractPostgreSQLDriver
|
||||
{
|
||||
$dsn = 'pgsql:';
|
||||
|
||||
if (isset($params['host']) && $params['host'] != '') {
|
||||
if (isset($params['host']) && $params['host'] !== '') {
|
||||
$dsn .= 'host=' . $params['host'] . ';';
|
||||
}
|
||||
|
||||
if (isset($params['port']) && $params['port'] != '') {
|
||||
if (isset($params['port']) && $params['port'] !== '') {
|
||||
$dsn .= 'port=' . $params['port'] . ';';
|
||||
}
|
||||
|
||||
@@ -95,7 +76,7 @@ class Driver extends AbstractPostgreSQLDriver
|
||||
// Used for temporary connections to allow operations like dropping the database currently connected to.
|
||||
// Connecting without an explicit database does not work, therefore "postgres" database is used
|
||||
// as it is mostly present in every server setup.
|
||||
$dsn .= 'dbname=postgres' . ';';
|
||||
$dsn .= 'dbname=postgres;';
|
||||
}
|
||||
|
||||
if (isset($params['sslmode'])) {
|
||||
|
Reference in New Issue
Block a user