From 0a3758e2cb8e5516e0f898e974a848aee9e257a6 Mon Sep 17 00:00:00 2001 From: Hell Yeah Date: Wed, 26 Sep 2018 17:15:52 +0300 Subject: [PATCH 1/4] Create VerticaDriverServiceProvider.php --- src/VerticaDriverServiceProvider.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/VerticaDriverServiceProvider.php diff --git a/src/VerticaDriverServiceProvider.php b/src/VerticaDriverServiceProvider.php new file mode 100644 index 0000000..871ac4b --- /dev/null +++ b/src/VerticaDriverServiceProvider.php @@ -0,0 +1,24 @@ + Date: Wed, 26 Sep 2018 17:16:37 +0300 Subject: [PATCH 2/4] Update composer.json --- composer.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/composer.json b/composer.json index d4b004e..27b62fc 100644 --- a/composer.json +++ b/composer.json @@ -50,11 +50,20 @@ "ext-pdo": "*", "ext-odbc": "*", "doctrine/dbal": "~2.3", + "illuminate/support": "^5.5", + "illuminate/database": "^5.5", "symfony/options-resolver": "^3.2" }, "require-dev": { "phpmd/phpmd": "^2.4", "squizlabs/php_codesniffer": "^2.7", "phpunit/phpunit": "^5.6" + }, + "extra": { + "laravel": { + "providers": [ + "mixartemev\\VerticaDriver\\VerticaDriverServiceProvider" + ] + } } } From 2960a4b961e760f75c035147b82e7770314578a5 Mon Sep 17 00:00:00 2001 From: Hell Yeah Date: Wed, 26 Sep 2018 17:23:42 +0300 Subject: [PATCH 3/4] Update VerticaDriverServiceProvider.php --- src/VerticaDriverServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/VerticaDriverServiceProvider.php b/src/VerticaDriverServiceProvider.php index 871ac4b..1149d96 100644 --- a/src/VerticaDriverServiceProvider.php +++ b/src/VerticaDriverServiceProvider.php @@ -13,11 +13,11 @@ class VerticaDriverServiceProvider extends ServiceProvider */ public function boot() { - App::bind('db.connector.vertica', function () { + $this->app->bind('db.connector.vertica', function () { return new VerticaDriver(); }); - DB::resolverFor('vertica', function ($connection, $database, $prefix, $config) { + $this->app->make('db')->resolverFor('vertica', function ($connection, $database, $prefix, $config) { return new PostgresConnection($connection, $database, $prefix, $config); }); } From 4953d3c96b236cc465891b5fae54c3a7e52ec254 Mon Sep 17 00:00:00 2001 From: Hell Yeah Date: Wed, 26 Sep 2018 17:47:30 +0300 Subject: [PATCH 4/4] Update composer.json --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 27b62fc..d8e8edb 100644 --- a/composer.json +++ b/composer.json @@ -37,6 +37,9 @@ "autoload": { "psr-0": { "Doctrine\\DBAL\\Driver\\Vertica": "src/" + }, + "psr-4": { + "mixartemev\\VerticaDriver\\": "src" } }, "autoload-dev": {