Skip to content

Commit

Permalink
Revert the accidental rename of driverOptions to driver_options
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Aug 20, 2020
1 parent 0112caa commit f970697
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Driver/IBMDB2/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function connect(array $params)
isset($params['persistent']) && $params['persistent'] === true,
$params['user'] ?? '',
$params['password'] ?? '',
$params['driver_options'] ?? []
$params['driverOptions'] ?? []
);
}
}
4 changes: 2 additions & 2 deletions src/Driver/Mysqli/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public function connect(array $params)

$preInitializers = $postInitializers = [];

if (isset($params['driver_options'])) {
$driverOptions = $params['driver_options'];
if (isset($params['driverOptions'])) {
$driverOptions = $params['driverOptions'];

if (isset($driverOptions[Connection::OPTION_FLAGS])) {
$flags = $driverOptions[Connection::OPTION_FLAGS];
Expand Down
2 changes: 1 addition & 1 deletion src/Driver/PDO/MySQL/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class Driver extends AbstractMySQLDriver
*/
public function connect(array $params)
{
$driverOptions = $params['driver_options'] ?? [];
$driverOptions = $params['driverOptions'] ?? [];

if (! empty($params['persistent'])) {
$driverOptions[PDO::ATTR_PERSISTENT] = true;
Expand Down
2 changes: 1 addition & 1 deletion src/Driver/PDO/OCI/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class Driver extends AbstractOracleDriver
*/
public function connect(array $params)
{
$driverOptions = $params['driver_options'] ?? [];
$driverOptions = $params['driverOptions'] ?? [];

if (! empty($params['persistent'])) {
$driverOptions[PDO::ATTR_PERSISTENT] = true;
Expand Down
2 changes: 1 addition & 1 deletion src/Driver/PDO/PgSQL/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class Driver extends AbstractPostgreSQLDriver
*/
public function connect(array $params)
{
$driverOptions = $params['driver_options'] ?? [];
$driverOptions = $params['driverOptions'] ?? [];

if (! empty($params['persistent'])) {
$driverOptions[PDO::ATTR_PERSISTENT] = true;
Expand Down
4 changes: 2 additions & 2 deletions src/Driver/PDO/SQLSrv/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public function connect(array $params)
{
$pdoOptions = $dsnOptions = [];

if (isset($params['driver_options'])) {
foreach ($params['driver_options'] as $option => $value) {
if (isset($params['driverOptions'])) {
foreach ($params['driverOptions'] as $option => $value) {
if (is_int($option)) {
$pdoOptions[$option] = $value;
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/Driver/PDO/SQLite/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class Driver extends AbstractSQLiteDriver
*/
public function connect(array $params)
{
$driverOptions = $params['driver_options'] ?? [];
$driverOptions = $params['driverOptions'] ?? [];

if (isset($driverOptions['userDefinedFunctions'])) {
$this->_userDefinedFunctions = array_merge(
Expand Down
2 changes: 1 addition & 1 deletion src/Driver/SQLSrv/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function connect(array $params)
throw PortWithoutHost::new();
}

$driverOptions = $params['driver_options'] ?? [];
$driverOptions = $params['driverOptions'] ?? [];

if (isset($params['dbname'])) {
$driverOptions['Database'] = $params['dbname'];
Expand Down
2 changes: 1 addition & 1 deletion tests/Driver/PDO/PgSQL/DriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private function connect(array $driverOptions): Connection
return $this->createDriver()->connect(
array_merge(
TestUtil::getConnectionParams(),
['driver_options' => $driverOptions]
['driverOptions' => $driverOptions]
)
);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Driver/Mysqli/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private function getConnection(array $driverOptions): Connection
return (new Driver())->connect(
array_merge(
$params,
['driver_options' => $driverOptions]
['driverOptions' => $driverOptions]
)
);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Driver/PDO/SQLSrv/DriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private function getConnection(array $driverOptions): Connection
return $this->connection->getDriver()->connect(
array_merge(
TestUtil::getConnectionParams(),
['driver_options' => $driverOptions]
['driverOptions' => $driverOptions]
)
);
}
Expand Down

0 comments on commit f970697

Please sign in to comment.