Skip to content

Commit

Permalink
Merge pull request #2 from spira/feature/lumen-5.2
Browse files Browse the repository at this point in the history
Feature/lumen 5.2
  • Loading branch information
zakhenry committed Jan 11, 2016
2 parents 79c4f13 + 6c5680c commit 7e4a46d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ language: php
php:
- 5.5
- 5.6
- 7.0
- hhvm

before_script:
Expand Down
2 changes: 1 addition & 1 deletion src/Connectors/ConnectionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ConnectionFactory extends \Illuminate\Database\Connectors\ConnectionFactor
* @return PostgresConnection|MySqlConnection|SQLiteConnection|SqlServerConnection|mixed|object
* @throws \InvalidArgumentException
*/
protected function createConnection($driver, PDO $connection, $database, $prefix = '', array $config = array())
protected function createConnection($driver, $connection, $database, $prefix = '', array $config = array())
{
if ($this->container->bound($key = "db.connection.{$driver}")) {
return $this->container->make($key, array($connection, $database, $prefix, $config));
Expand Down
4 changes: 2 additions & 2 deletions src/DatabaseServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ public function register()
// The connection factory is used to create the actual connection instances on
// the database. We will inject the factory into the manager so that it may
// make the connections while they are actually needed and not of before.
$this->app->bindShared('db.factory', function ($app) {
$this->app->singleton('db.factory', function ($app) {
return new ConnectionFactory($app);
});

// The database manager is used to resolve various connections, since multiple
// connections might be managed. It also implements the connection resolver
// interface which may be used by other components requiring connections.
$this->app->bindShared('db', function ($app) {
$this->app->singleton('db', function ($app) {
return new DatabaseManager($app, $app['db.factory']);
});
}
Expand Down

0 comments on commit 7e4a46d

Please sign in to comment.