8000 [9.x] Bump DBAL to 2.12 by driesvints · Pull Request #35974 · laravel/framework · GitHub
[go: up one dir, main page]

Skip to content

[9.x] Bump DBAL to 2.12 #35974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix invalid signatures
  • Loading branch information
driesvints committed Jan 21, 2021
commit c478b267502d94e48ad86a271857128b98a62936
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ public function getDoctrineConnection()
$this->doctrineConnection = new DoctrineConnection(array_filter([
'pdo' => $this->getPdo(),
'dbname' => $this->getDatabaseName(),
'driver' => method_exists($driver, 'getName') ? $driver->getName() : null,
'driver' => $driver->getName(),
'serverVersion' => $this->getConfig('server_version'),
]), $driver);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ trait ConnectsToDatabase
* @param array $params
* @return \Illuminate\Database\PDO\Connection
*/
public function connect(array $params)
public function connect(array $params, $username = null, $password = null, array $driverOptions = [])
{
if (! isset($params['pdo']) || ! $params['pdo'] instanceof PDO) {
throw new \InvalidArgumentException('Laravel requires the "pdo" property to be set and be a PDO instance.');
Expand Down
12 changes: 12 additions & 0 deletions src/Illuminate/Database/PDO/MySqlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,16 @@
class MySqlDriver extends AbstractMySQLDriver
{
use ConnectsToDatabase;

/**
* Gets the name of the driver.
*
* @deprecated
*
* @return string The name of the driver.
*/
public function getName()
{
return 'pdo_mysql';
}
}
12 changes: 12 additions & 0 deletions src/Illuminate/Database/PDO/PostgresDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,16 @@
class PostgresDriver extends AbstractPostgreSQLDriver
{
use ConnectsToDatabase;

/**
* Gets the name of the driver.
*
* @deprecated
*
* @return string The name of the driver.
*/
public function getName()
{
return 'pdo_pgsql';
}
}
12 changes: 12 additions & 0 deletions src/Illuminate/Database/PDO/SQLiteDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,16 @@
class SQLiteDriver extends AbstractSQLiteDriver
{
use ConnectsToDatabase;

/**
* Gets the name of the driver.
*
* @deprecated
*
* @return string The name of the driver.
*/
public function getName()
{
return 'pdo_sqlite';
}
}
14 changes: 13 additions & 1 deletion src/Illuminate/Database/PDO/SqlServerDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,22 @@

class SqlServerDriver extends AbstractSQLServerDriver
{
public function connect(array $params)
public function connect(array $params, $username = null, $password = null, array $driverOptions = [])
{
return new SqlServerConnection(
new Connection($params['pdo'])
);
}

/**
* Gets the name of the driver.
*
* @deprecated
*
* @return string The name of the driver.
*/
public function getName()
{
return 'pdo_sqlsrv';
}
}
0