Skip to content

Commit 19d49ad

Browse files
authored
Merge pull request #6 from GTCrais/v2.1
Rename some options for consistency.
2 parents 6117656 + 0292af4 commit 19d49ad

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

src/Classes/Database.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ protected static function setDumpOptions($dumper, $connection)
121121
$dumper = $dumper->setHost($connection['host']);
122122
}
123123

124-
if (self::optionIsSet('dump_binary_path') && method_exists($dumper, 'setDumpBinaryPath')) {
125-
$dumper = $dumper->setDumpBinaryPath(self::getOption('dump_binary_path'));
124+
if (self::optionIsSet('dumpBinaryPath') && method_exists($dumper, 'setDumpBinaryPath')) {
125+
$dumper = $dumper->setDumpBinaryPath(self::getOption('dumpBinaryPath'));
126126
}
127127

128128
if (self::optionIsSet('timeout') && method_exists($dumper, 'setTimeout')) {
@@ -140,8 +140,8 @@ protected static function setDumpOptions($dumper, $connection)
140140
if (method_exists($dumper, 'setSocket')) {
141141
if (!empty($connection['unix_socket'])) {
142142
$dumper = $dumper->setSocket($connection['unix_socket']);
143-
} else if (self::optionIsSet('unix_socket')) {
144-
$dumper = $dumper->setSocket(self::getOption('unix_socket'));
143+
} else if (self::optionIsSet('unixSocket')) {
144+
$dumper = $dumper->setSocket(self::getOption('unixSocket'));
145145
}
146146
}
147147

src/Lumen/Config.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ protected static function validateConnectionData($connection)
3636
{
3737
if (
3838
$connection['driver'] &&
39-
$connection['host'] &&
40-
$connection['database'] &&
41-
$connection['username']
39+
$connection['database']
4240
) {
4341
return true;
4442
}

src/config/centinelApi.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,24 @@
4141

4242
'database' => [
4343
'connection' => '{default}',
44-
'dump_binary_path' => null,
44+
'dumpBinaryPath' => null,
4545
'timeout' => 120,
4646

4747
// MySQL, PostgreSQL, MongoDB
4848
'port' => null, // can be overridden through /config/database.php config file
4949

5050
// MySQL, PostgreSQL
51-
'unix_socket' => null, // can be overridden through /config/database.php config file
52-
'includeTables' => null, // array
53-
'excludeTables' => null, // array
51+
'unixSocket' => null, // can be overridden with 'unix_socket' in /config/database.php config file
52+
'includeTables' => null, // null or array
53+
'excludeTables' => null, // null or array
5454

5555
// MySQL
5656
'dontSkipComments' => null, // null or true
5757
'dontUseExtendedInserts' => null, // null or true
5858
'useSingleTransaction' => null, // null or true
5959
'defaultCharacterSet' => null,
6060
'gtidPurged' => null,
61-
'extraOptions' => null, // array
61+
'extraOptions' => null, // null or array
6262

6363
// PostgreSQL
6464
'useInserts' => null, // null or true

0 commit comments

Comments
 (0)