Fix for Lumen
This commit is contained in:
parent
ebf2348485
commit
dd6771f8fe
@ -24,8 +24,7 @@ class ODBCZOSConnector extends ODBCConnector
|
||||
'Protocol=TCPIP',
|
||||
'Uid=%s',
|
||||
'Pwd=%s',
|
||||
'',
|
||||
// Just to add a semicolon to the end of string
|
||||
'', // Just to add a semicolon to the end of string
|
||||
];
|
||||
|
||||
$dsnConfig = [
|
||||
|
@ -101,7 +101,7 @@ class DB2Connection extends Connection
|
||||
*/
|
||||
protected function getDefaultSchemaGrammar()
|
||||
{
|
||||
return $this->withTablePrefix(new SchemaGrammar($this->config['driver'] == "odbc"?"i":"c"));
|
||||
return $this->withTablePrefix(new SchemaGrammar($this->config['driver'] == 'odbc' ? 'i' : 'c'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -115,6 +115,6 @@ class DB2Connection extends Connection
|
||||
return new DB2ZOSProcessor();
|
||||
}
|
||||
|
||||
return new DB2Processor($this->config['driver'] == "odbc"?"i":"c");
|
||||
return new DB2Processor($this->config['driver'] == 'odbc' ? 'i' : 'c');
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ use Cooperl\Database\DB2\Connectors\ODBCConnector;
|
||||
use Cooperl\Database\DB2\Connectors\IBMConnector;
|
||||
use Cooperl\Database\DB2\Connectors\ODBCZOSConnector;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Config;
|
||||
|
||||
/**
|
||||
* Class DB2ServiceProvider
|
||||
@ -39,18 +38,13 @@ class DB2ServiceProvider extends ServiceProvider
|
||||
public function register()
|
||||
{
|
||||
// get the configs
|
||||
$conns = is_array(Config::get('laravel-db2::database.connections'))
|
||||
? Config::get('laravel-db2::database.connections')
|
||||
: [];
|
||||
$conns = is_array(config('laravel-db2::database.connections')) ? config('laravel-db2::database.connections') : [];
|
||||
|
||||
// Add my database configurations to the default set of configurations
|
||||
$this->app['config']['database.connections'] = array_merge(
|
||||
$conns,
|
||||
$this->app['config']['database.connections']
|
||||
);
|
||||
config(['database.connections' => array_merge($conns, config('database.connections'))]);
|
||||
|
||||
// Extend the connections with pdo_odbc and pdo_ibm drivers
|
||||
foreach (Config::get('database.connections') as $conn => $config) {
|
||||
foreach (config('database.connections') as $conn => $config) {
|
||||
// Only use configurations that feature a "odbc", "ibm" or "odbczos" driver
|
||||
if (!isset($config['driver']) || !in_array($config['driver'], ['odbc', 'ibm', 'odbczos', 'odbcexpress'])) {
|
||||
continue;
|
||||
|
@ -62,7 +62,7 @@ class Blueprint extends \Illuminate\Database\Schema\Blueprint
|
||||
*
|
||||
* @return \Illuminate\Support\Fluent
|
||||
*/
|
||||
protected function indexCommand($type, $columns, $index, $algorithm = NULL)
|
||||
protected function indexCommand($type, $columns, $index, $algorithm = null)
|
||||
{
|
||||
$columns = (array) $columns;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user