From 1800c46ccfa3316e34126e40c9fd054c5ba0108f Mon Sep 17 00:00:00 2001 From: Afonso Gloeden Date: Wed, 8 May 2019 21:03:45 -0300 Subject: [PATCH 01/11] Connection port separate from connection host --- README.md | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4ec59e0..64f0c16 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Update the package dependencies executing: composer update ``` -Add the following entry to your providers array in **config/app.php** file: +Add the following entry to your providers array in **config/app.php** file: ```php Uepg\LaravelSybase\Database\SybaseServiceProvider::class @@ -46,13 +46,14 @@ return [ ... 'sqlsrv' => [ - 'driver' => 'sqlsrv', - 'host' => env('DB_HOST', 'sybase.myserver.br:5000'), + 'driver' => 'sqlsrv', + 'host' => env('DB_HOST', 'sybase.myserver.com'), + 'port' => env('DB_PORT', '5000'), 'database' => env('DB_DATABASE', 'mydatabase'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', 'secret'), - 'charset' => 'utf8', - 'prefix' => '', + 'username' => env('DB_USERNAME', 'user'), + 'password' => env('DB_PASSWORD', 'password'), + 'charset' => 'utf8', + 'prefix' => '', ], ... @@ -62,6 +63,21 @@ return [ ] ``` +Update your **.env** with the settings for the **sqlsrv** or your custom odbc. See the following example: + +```text +... + +DB_CONNECTION=sqlsrv +DB_HOST=sybase.myserver.com +DB_PORT=5000 +DB_DATABASE=mydatabase +DB_USERNAME=user +DB_PASSWORD=password + +... +``` + ## Configuration of freetds driver In Linux systems the driver version must be set in **freetds.conf** file to the right use of charset pages. From b10cf7314b951ae26ff2b692b5f4a7acdf5f233f Mon Sep 17 00:00:00 2001 From: Afonso Gloeden Date: Wed, 8 May 2019 21:52:02 -0300 Subject: [PATCH 02/11] Renamed files --- .../{SybaseConnection.php => Connection.php} | 15 +++---- .../{SybaseConnector.php => Connector.php} | 2 +- .../Query/{SybaseGrammar.php => Grammar.php} | 5 ++- Database/Query/Processor.php | 10 +++++ Database/Query/SybaseProcessor.php | 10 ----- .../{BlueprintSybase.php => Blueprint.php} | 4 +- .../Schema/{SybaseGrammar.php => Grammar.php} | 39 ++++++++++--------- Database/SybaseServiceProvider.php | 10 ++--- README.md | 4 +- 9 files changed, 51 insertions(+), 48 deletions(-) rename Database/{SybaseConnection.php => Connection.php} (98%) rename Database/{SybaseConnector.php => Connector.php} (69%) rename Database/Query/{SybaseGrammar.php => Grammar.php} (96%) create mode 100644 Database/Query/Processor.php delete mode 100644 Database/Query/SybaseProcessor.php rename Database/Schema/{BlueprintSybase.php => Blueprint.php} (74%) rename Database/Schema/{SybaseGrammar.php => Grammar.php} (91%) diff --git a/Database/SybaseConnection.php b/Database/Connection.php similarity index 98% rename from Database/SybaseConnection.php rename to Database/Connection.php index 0a60df7..883c75f 100644 --- a/Database/SybaseConnection.php +++ b/Database/Connection.php @@ -6,13 +6,14 @@ use Exception; use Doctrine\DBAL\Driver\PDOSqlsrv\Driver as DoctrineDriver; use Illuminate\Database\Query\Processors\SqlServerProcessor; -use Uepg\LaravelSybase\Database\Query\SybaseGrammar as QueryGrammar; -use Uepg\LaravelSybase\Database\Schema\BlueprintSybase; -use Uepg\LaravelSybase\Database\Schema\SybaseGrammar as SchemaGrammar; -use Illuminate\Database\Connection; +use Uepg\LaravelSybase\Database\Query\Grammar as QueryGrammar; +use Uepg\LaravelSybase\Database\Schema\Blueprint; +use Uepg\LaravelSybase\Database\Schema\Grammar as SchemaGrammar; +use Illuminate\Database\Connection as IlluminateConnection; use Illuminate\Database\Query\Builder; -class SybaseConnection extends Connection { +class Connection extends IlluminateConnection +{ /** * All types without quotes in Sybase's query. * @@ -90,7 +91,7 @@ protected function getDefaultSchemaGrammar() /** * Get the default post processor instance. * - * @return \Illuminate\Database\Query\Processors\Processor + * @return \Illuminate\Database\Query\Processors\SqlServerProcessor */ protected function getDefaultPostProcessor() { @@ -719,7 +720,7 @@ public function getSchemaBuilder() } $builder = new \Illuminate\Database\Schema\Builder($this); $builder->blueprintResolver(function ($table, $callback) { - return new BlueprintSybase($table, $callback); + return new Blueprint($table, $callback); }); return $builder; } diff --git a/Database/SybaseConnector.php b/Database/Connector.php similarity index 69% rename from Database/SybaseConnector.php rename to Database/Connector.php index 2efa81c..a753cbe 100644 --- a/Database/SybaseConnector.php +++ b/Database/Connector.php @@ -4,7 +4,7 @@ use Illuminate\Database\Connectors\SqlServerConnector; -class SybaseConnector extends SqlServerConnector +class Connector extends SqlServerConnector { // } diff --git a/Database/Query/SybaseGrammar.php b/Database/Query/Grammar.php similarity index 96% rename from Database/Query/SybaseGrammar.php rename to Database/Query/Grammar.php index 65bceae..3da71d4 100644 --- a/Database/Query/SybaseGrammar.php +++ b/Database/Query/Grammar.php @@ -3,9 +3,10 @@ namespace Uepg\LaravelSybase\Database\Query; use Illuminate\Database\Query\Builder; -use Illuminate\Database\Query\Grammars\Grammar; +use Illuminate\Database\Query\Grammars\Grammar as IlluminateGrammar; -class SybaseGrammar extends Grammar { +class Grammar extends IlluminateGrammar +{ /** * All of the available clause operators. * diff --git a/Database/Query/Processor.php b/Database/Query/Processor.php new file mode 100644 index 0000000..395f4c2 --- /dev/null +++ b/Database/Query/Processor.php @@ -0,0 +1,10 @@ +app->bind('db.connector.sqlsrv', function ($app) { - return new SybaseConnector(); + return new Connector(); }); // $this->app->bind('db.connection.sqlsrv', function ( diff --git a/README.md b/README.md index 64f0c16..581664c 100644 --- a/README.md +++ b/README.md @@ -92,14 +92,14 @@ The file is usualy found in **/etc/freetds/freetds.conf**. Set the configuration ## Setting to use numeric data type -In the migration file you must replace `use Illuminate\Database\Schema\Blueprint;` with `use Uepg\LaravelSybase\Database\Schema\BlueprintSybase as Blueprint;`. See the following example: +In the migration file you must replace `use Illuminate\Database\Schema\Blueprint;` with `use Uepg\LaravelSybase\Database\Schema\Blueprint;`. See the following example: ```php Date: Wed, 8 May 2019 22:36:45 -0300 Subject: [PATCH 03/11] Refactored files --- Database/Connection.php | 23 ++++---- Database/Query/Builder.php | 10 ++++ Database/Query/Grammar.php | 14 ++--- Database/Query/Processor.php | 4 +- Database/Schema/Grammar.php | 86 +++++++++++++++--------------- Database/SybaseServiceProvider.php | 4 +- Support/Fluent.php | 10 ++++ composer.json | 3 +- 8 files changed, 88 insertions(+), 66 deletions(-) create mode 100644 Database/Query/Builder.php create mode 100644 Support/Fluent.php diff --git a/Database/Connection.php b/Database/Connection.php index 883c75f..f27db2f 100644 --- a/Database/Connection.php +++ b/Database/Connection.php @@ -4,13 +4,14 @@ use Closure; use Exception; +use PDO; +use Illuminate\Database\Connection as IlluminateConnection; use Doctrine\DBAL\Driver\PDOSqlsrv\Driver as DoctrineDriver; -use Illuminate\Database\Query\Processors\SqlServerProcessor; +use Uepg\LaravelSybase\Database\Query\Builder; use Uepg\LaravelSybase\Database\Query\Grammar as QueryGrammar; +use Uepg\LaravelSybase\Database\Query\Processor; use Uepg\LaravelSybase\Database\Schema\Blueprint; use Uepg\LaravelSybase\Database\Schema\Grammar as SchemaGrammar; -use Illuminate\Database\Connection as IlluminateConnection; -use Illuminate\Database\Query\Builder; class Connection extends IlluminateConnection { @@ -71,7 +72,7 @@ public function transaction(Closure $callback, $attempts = 1) /** * Get the default query grammar instance. * - * @return \Illuminate\Database\Query\Grammars\SqlServerGrammar + * @return \Uepg\LaravelSybase\Database\Query\Grammar */ protected function getDefaultQueryGrammar() { @@ -81,7 +82,7 @@ protected function getDefaultQueryGrammar() /** * Get the default schema grammar instance. * - * @return \Illuminate\Database\Schema\Grammars\SqlServerGrammar + * @return \Uepg\LaravelSybase\Database\Schema\Grammar */ protected function getDefaultSchemaGrammar() { @@ -91,11 +92,11 @@ protected function getDefaultSchemaGrammar() /** * Get the default post processor instance. * - * @return \Illuminate\Database\Query\Processors\SqlServerProcessor + * @return \Uepg\LaravelSybase\Database\Query\Processor */ protected function getDefaultPostProcessor() { - return new SqlServerProcessor; + return new Processor; } /** @@ -130,7 +131,7 @@ private function compileForSelect(Builder $builder, $bindings) { } $queryString = $this->queryStringForSelect($tables); $queryRes = $this->getPdo()->query($queryString); - $types[$tables] = $queryRes->fetchAll(\PDO::FETCH_NAMED); + $types[$tables] = $queryRes->fetchAll(PDO::FETCH_NAMED); foreach ($types[$tables] as &$row) { $tipos[strtolower($row['name'])] = $row['type']; @@ -369,7 +370,7 @@ private function compileBindings($query, $bindings) $queryRes = $this->getPdo()->query( $this->queryStringForCompileBindings($table) ); - $types[$table] = $queryRes->fetchAll(\PDO::FETCH_ASSOC); + $types[$table] = $queryRes->fetchAll(PDO::FETCH_ASSOC); for ($k = 0; $k < count($types[$table]); $k++) { $types[$table][ $types[$table][$k]['name'] @@ -711,14 +712,14 @@ public function getFetchMode() } /** - * @return \Illuminate\Database\Schema\Builder + * @return \Uepg\LaravelSybase\Database\Query\Builder */ public function getSchemaBuilder() { if (is_null($this->schemaGrammar)) { $this->useDefaultSchemaGrammar(); } - $builder = new \Illuminate\Database\Schema\Builder($this); + $builder = new Builder($this); $builder->blueprintResolver(function ($table, $callback) { return new Blueprint($table, $callback); }); diff --git a/Database/Query/Builder.php b/Database/Query/Builder.php new file mode 100644 index 0000000..3731bb8 --- /dev/null +++ b/Database/Query/Builder.php @@ -0,0 +1,10 @@ + Date: Fri, 10 May 2019 20:11:19 -0300 Subject: [PATCH 04/11] composer.json restructured --- .gitignore | 1 + composer.json | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 61ead86..8b7ef35 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /vendor +composer.lock diff --git a/composer.json b/composer.json index 0258e32..e6175c4 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "uepg/laravel-sybase", - "description": "Sybase based Eloquent module extension for Laravel 5.x.", "type": "library", + "description": "Sybase based Eloquent module extension for Laravel 5.x.", "authors": [ { "name": "Gabriel Tadra Mainginski", @@ -12,15 +12,26 @@ "email": "mazer@uepg.br" } ], - "minimum-stability": "dev", + "keywords": [ + "sybase" + ], + "license": "GPL-2.0-only", "require": { "php": ">=5.5", "laravel/framework": "5.*" }, + "require-dev": {}, + "config": { + "optimize-autoloader": true, + "preferred-install": "dist", + "sort-packages": true + }, "autoload": { "psr-4": { "Uepg\\LaravelSybase\\Database\\": "Database/", "Uepg\\LaravelSybase\\Support\\": "Support/" } - } + }, + "minimum-stability": "dev", + "prefer-stable": true } From 525ad6a04a973d7d726adbf601a0129ee85ef0ff Mon Sep 17 00:00:00 2001 From: Afonso Gloeden Date: Fri, 10 May 2019 20:23:08 -0300 Subject: [PATCH 05/11] Dependencies for version 2.* updated --- composer.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index e6175c4..3671c73 100644 --- a/composer.json +++ b/composer.json @@ -17,8 +17,10 @@ ], "license": "GPL-2.0-only", "require": { - "php": ">=5.5", - "laravel/framework": "5.*" + "php": ">=5.6.4", + "doctrine/dbal": "^2.9", + "illuminate/database": "^5.4", + "illuminate/support": "^5.4" }, "require-dev": {}, "config": { From a551763160968795779723c53c2c77b783c433bc Mon Sep 17 00:00:00 2001 From: Afonso Gloeden Date: Fri, 10 May 2019 21:06:27 -0300 Subject: [PATCH 06/11] Badges added in README.md --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 581664c..ff5b416 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ -# laravel-sybase +# Sybase ASE based Eloquent module extension for Laravel 5.x + +[![Packagist Version](https://img.shields.io/packagist/v/uepg/laravel-sybase.svg)](https://packagist.org/packages/uepg/laravel-sybase) +[![PHP from Packagist](https://img.shields.io/packagist/php-v/uepg/laravel-sybase.svg)](https://packagist.org/packages/uepg/laravel-sybase) +[![Packagist](https://img.shields.io/packagist/dt/uepg/laravel-sybase.svg)](https://packagist.org/packages/uepg/laravel-sybase/stats) +[![GitHub contributors](https://img.shields.io/github/contributors-anon/uepg/laravel-sybase.svg)](https://github.com/uepg/laravel-sybase/graphs/contributors) +[![GitHub](https://img.shields.io/github/license/uepg/laravel-sybase.svg)](https://github.com/uepg/laravel-sybase/blob/master/LICENSE) -Sybase ASE based Eloquent module extension for Laravel 5.x. * Enables use of multiple kinds of fields. * Use default eloquent: works with odbc and dblib! * Migrations! (WIP - Work in Progress) From 521552c68db03eacefd295b58479e0d596ed973b Mon Sep 17 00:00:00 2001 From: Afonso Gloeden Date: Fri, 10 May 2019 21:26:36 -0300 Subject: [PATCH 07/11] Files put in src folder --- README.md | 2 +- composer.json | 10 ++++++++-- .../Uepg/LaravelSybase/Database}/Connection.php | 0 .../Uepg/LaravelSybase/Database}/Connector.php | 0 .../Uepg/LaravelSybase/Database}/Query/Builder.php | 0 .../Uepg/LaravelSybase/Database}/Query/Grammar.php | 0 .../Uepg/LaravelSybase/Database}/Query/Processor.php | 0 .../Uepg/LaravelSybase/Database}/Schema/Blueprint.php | 0 .../Uepg/LaravelSybase/Database}/Schema/Grammar.php | 0 {Support => src/Uepg/LaravelSybase/Support}/Fluent.php | 0 .../Uepg/LaravelSybase}/SybaseServiceProvider.php | 2 +- 11 files changed, 10 insertions(+), 4 deletions(-) rename {Database => src/Uepg/LaravelSybase/Database}/Connection.php (100%) rename {Database => src/Uepg/LaravelSybase/Database}/Connector.php (100%) rename {Database => src/Uepg/LaravelSybase/Database}/Query/Builder.php (100%) rename {Database => src/Uepg/LaravelSybase/Database}/Query/Grammar.php (100%) rename {Database => src/Uepg/LaravelSybase/Database}/Query/Processor.php (100%) rename {Database => src/Uepg/LaravelSybase/Database}/Schema/Blueprint.php (100%) rename {Database => src/Uepg/LaravelSybase/Database}/Schema/Grammar.php (100%) rename {Support => src/Uepg/LaravelSybase/Support}/Fluent.php (100%) rename {Database => src/Uepg/LaravelSybase}/SybaseServiceProvider.php (96%) diff --git a/README.md b/README.md index ff5b416..100f9e7 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ composer update Add the following entry to your providers array in **config/app.php** file: ```php -Uepg\LaravelSybase\Database\SybaseServiceProvider::class +Uepg\LaravelSybase\SybaseServiceProvider::class ``` Update your **config/database.php's** default driver with the settings for the **sqlsrv** or your custom odbc. See the following example: diff --git a/composer.json b/composer.json index 3671c73..88a50e4 100644 --- a/composer.json +++ b/composer.json @@ -28,10 +28,16 @@ "preferred-install": "dist", "sort-packages": true }, + "extra": { + "laravel": { + "providers": [ + "Uepg\\LaravelSybase\\SybaseServiceProvider" + ] + } + }, "autoload": { "psr-4": { - "Uepg\\LaravelSybase\\Database\\": "Database/", - "Uepg\\LaravelSybase\\Support\\": "Support/" + "Uepg\\LaravelSybase\\": "src/" } }, "minimum-stability": "dev", diff --git a/Database/Connection.php b/src/Uepg/LaravelSybase/Database/Connection.php similarity index 100% rename from Database/Connection.php rename to src/Uepg/LaravelSybase/Database/Connection.php diff --git a/Database/Connector.php b/src/Uepg/LaravelSybase/Database/Connector.php similarity index 100% rename from Database/Connector.php rename to src/Uepg/LaravelSybase/Database/Connector.php diff --git a/Database/Query/Builder.php b/src/Uepg/LaravelSybase/Database/Query/Builder.php similarity index 100% rename from Database/Query/Builder.php rename to src/Uepg/LaravelSybase/Database/Query/Builder.php diff --git a/Database/Query/Grammar.php b/src/Uepg/LaravelSybase/Database/Query/Grammar.php similarity index 100% rename from Database/Query/Grammar.php rename to src/Uepg/LaravelSybase/Database/Query/Grammar.php diff --git a/Database/Query/Processor.php b/src/Uepg/LaravelSybase/Database/Query/Processor.php similarity index 100% rename from Database/Query/Processor.php rename to src/Uepg/LaravelSybase/Database/Query/Processor.php diff --git a/Database/Schema/Blueprint.php b/src/Uepg/LaravelSybase/Database/Schema/Blueprint.php similarity index 100% rename from Database/Schema/Blueprint.php rename to src/Uepg/LaravelSybase/Database/Schema/Blueprint.php diff --git a/Database/Schema/Grammar.php b/src/Uepg/LaravelSybase/Database/Schema/Grammar.php similarity index 100% rename from Database/Schema/Grammar.php rename to src/Uepg/LaravelSybase/Database/Schema/Grammar.php diff --git a/Support/Fluent.php b/src/Uepg/LaravelSybase/Support/Fluent.php similarity index 100% rename from Support/Fluent.php rename to src/Uepg/LaravelSybase/Support/Fluent.php diff --git a/Database/SybaseServiceProvider.php b/src/Uepg/LaravelSybase/SybaseServiceProvider.php similarity index 96% rename from Database/SybaseServiceProvider.php rename to src/Uepg/LaravelSybase/SybaseServiceProvider.php index cf0dda8..78ba1c1 100644 --- a/Database/SybaseServiceProvider.php +++ b/src/Uepg/LaravelSybase/SybaseServiceProvider.php @@ -1,6 +1,6 @@ Date: Fri, 10 May 2019 22:54:41 -0300 Subject: [PATCH 08/11] CHANGELOG.md added --- CHANGELOG.md | 154 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..c5cb1fb --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,154 @@ +# Release Notes + +## [Unreleased](https://github.com/uepg/laravel-sybase/compare/2.1.2...master) + + +## [2.1.2 (2019-04-19)](https://github.com/uepg/laravel-sybase/compare/2.1.1...2.1.2) + +Merge pull request [#43](https://github.com/uepg/laravel-sybase/pull/43) from afgloeden/master + +Problem with constraint length of the primary key fixed + + +## [2.1.1 (2019-04-05)](https://github.com/uepg/laravel-sybase/compare/2.1.0...2.1.1) + +Merge pull request [#42](https://github.com/uepg/laravel-sybase/pull/42) from afgloeden/master + +Changes related to PSR's + + +## [2.1.0 (2019-01-23)](https://github.com/uepg/laravel-sybase/compare/2.0...2.1.0) + +See README + + +## [2.0 (2017-08-02)](https://github.com/uepg/laravel-sybase/compare/1.3.2...2.0) + +Merge pull request [#36](https://github.com/uepg/laravel-sybase/pull/36) from marcelovsantos/master + +Correction test for 5.3 and 5.4 + + +## [1.3.2 (2017-03-14)](https://github.com/uepg/laravel-sybase/compare/1.3.1...1.3.2) + +Better identention + + +## [1.3.1 (2017-03-14)](https://github.com/uepg/laravel-sybase/compare/1.3...1.3.1) + +Fix [#29](https://github.com/uepg/laravel-sybase/issues/29) + + +## [1.3 (2017-01-24)](https://github.com/uepg/laravel-sybase/compare/1.2.1...1.3) + +Merging dev in master + + +## [1.2.1 (2016-09-16)](https://github.com/uepg/laravel-sybase/compare/1.2.0.7...1.2.1) + +Added support to multiples resultset + + +## [1.2.0.7 (2016-06-09)](https://github.com/uepg/laravel-sybase/compare/1.2.0.6...1.2.0.7) + +Merge branch 'case_insensitive' + + +## [1.2.0.6 (2016-06-06)](https://github.com/uepg/laravel-sybase/compare/1.2.0.5...1.2.0.6) + +Merge branch 'multiple_connections' + + +## [1.2.0.5 (2016-06-02)](https://github.com/uepg/laravel-sybase/compare/1.2.0.4...1.2.0.5) + +Fix a offset problem in joins + + +## [1.2.0.4 (2016-05-23)](https://github.com/uepg/laravel-sybase/compare/1.2.0.3...1.2.0.4) + +Fix [#13](https://github.com/uepg/laravel-sybase/issues/13) + + +## [1.2.0.3 (2016-05-19)](https://github.com/uepg/laravel-sybase/compare/1.2.0.2...1.2.0.3) + +Fix [#13](https://github.com/uepg/laravel-sybase/issues/13) for insert, remove and update + + +## [1.2.0.2 (2016-05-18)](https://github.com/uepg/laravel-sybase/compare/1.2.0.1...1.2.0.2) + +Fix [#14](https://github.com/uepg/laravel-sybase/issues/14) + + +## [1.2.0.1 (2016-05-12)](https://github.com/uepg/laravel-sybase/compare/1.2...1.2.0.1) + +Add money to + + +## [1.2 (2016-05-03)](https://github.com/uepg/laravel-sybase/compare/1.1...1.2) + +Merge branch 'dev' + + +## [1.1 (2016-03-16)](https://github.com/uepg/laravel-sybase/compare/1.0.3...1.1) + +Probably fixed [#11](https://github.com/uepg/laravel-sybase/issues/11) and possible other problems with querys builded without query builder (but all binds will be considered strings by default) + + +## [1.0.3 (2016-02-18)](https://github.com/uepg/laravel-sybase/compare/1.0.2...1.0.3) + +Fix [#8](https://github.com/uepg/laravel-sybase/issues/8) + + +## [1.0.2 (2015-12-21)](https://github.com/uepg/laravel-sybase/compare/1.0.1...1.0.2) + +Minor fixes and better stability. + + +## [1.0.1 (2015-12-21)](https://github.com/uepg/laravel-sybase/compare/1.0...1.0.1) + +Now offset works, but it is slow. + + +## [1.0 (2015-12-21)](https://github.com/uepg/laravel-sybase/compare/0.3...1.0) + +Now offset works, but it is slow. + + +## [0.3 (2015-12-16)](https://github.com/uepg/laravel-sybase/compare/0.2.4...0.3) + +Probably fixed [#4](https://github.com/uepg/laravel-sybase/issues/4) and [#5](https://github.com/uepg/laravel-sybase/issues/5) + + +## [0.2.4 (2015-12-10)](https://github.com/uepg/laravel-sybase/compare/0.2.3...0.2.4) + +This fix [#3](https://github.com/uepg/laravel-sybase/issues/3) (workaround). + + +## [0.2.3 (2015-12-10)](https://github.com/uepg/laravel-sybase/compare/0.2.2...0.2.3) + +Improving functions. + + +## [0.2.2 (2015-12-08)](https://github.com/uepg/laravel-sybase/compare/0.2.1...0.2.2) + +Update Readme. + + +## [0.2.1 (2015-12-07)](https://github.com/uepg/laravel-sybase/compare/0.2...0.2.1) + +This finally fix [#2](https://github.com/uepg/laravel-sybase/issues/2). + + +## [0.2 (2015-12-04)](https://github.com/uepg/laravel-sybase/compare/0.1.1...0.2) + +This fix [#2](https://github.com/uepg/laravel-sybase/issues/2) + + +## [0.1.1 (2015-11-27)](https://github.com/uepg/laravel-sybase/compare/0.1.0...0.1.1) + +Improvement in query seeking types. + + +## [0.1.0 (2015-11-18)](https://github.com/uepg/laravel-sybase/compare/fd48f2b402acbfd72c3a2e903dabdb2df0a8cbc6...0.1.0) + +Single quote problem solved. From 1b6dc3e38b7c25253f27882113aafaaf75340cf5 Mon Sep 17 00:00:00 2001 From: Afonso Gloeden Date: Sat, 11 May 2019 11:25:05 -0300 Subject: [PATCH 09/11] Path of files for composer.json's PSR-4 fixed --- src/{Uepg/LaravelSybase => }/Database/Connection.php | 0 src/{Uepg/LaravelSybase => }/Database/Connector.php | 0 src/{Uepg/LaravelSybase => }/Database/Query/Builder.php | 0 src/{Uepg/LaravelSybase => }/Database/Query/Grammar.php | 0 src/{Uepg/LaravelSybase => }/Database/Query/Processor.php | 0 src/{Uepg/LaravelSybase => }/Database/Schema/Blueprint.php | 0 src/{Uepg/LaravelSybase => }/Database/Schema/Grammar.php | 0 src/{Uepg/LaravelSybase => }/Support/Fluent.php | 0 src/{Uepg/LaravelSybase => }/SybaseServiceProvider.php | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename src/{Uepg/LaravelSybase => }/Database/Connection.php (100%) rename src/{Uepg/LaravelSybase => }/Database/Connector.php (100%) rename src/{Uepg/LaravelSybase => }/Database/Query/Builder.php (100%) rename src/{Uepg/LaravelSybase => }/Database/Query/Grammar.php (100%) rename src/{Uepg/LaravelSybase => }/Database/Query/Processor.php (100%) rename src/{Uepg/LaravelSybase => }/Database/Schema/Blueprint.php (100%) rename src/{Uepg/LaravelSybase => }/Database/Schema/Grammar.php (100%) rename src/{Uepg/LaravelSybase => }/Support/Fluent.php (100%) rename src/{Uepg/LaravelSybase => }/SybaseServiceProvider.php (100%) diff --git a/src/Uepg/LaravelSybase/Database/Connection.php b/src/Database/Connection.php similarity index 100% rename from src/Uepg/LaravelSybase/Database/Connection.php rename to src/Database/Connection.php diff --git a/src/Uepg/LaravelSybase/Database/Connector.php b/src/Database/Connector.php similarity index 100% rename from src/Uepg/LaravelSybase/Database/Connector.php rename to src/Database/Connector.php diff --git a/src/Uepg/LaravelSybase/Database/Query/Builder.php b/src/Database/Query/Builder.php similarity index 100% rename from src/Uepg/LaravelSybase/Database/Query/Builder.php rename to src/Database/Query/Builder.php diff --git a/src/Uepg/LaravelSybase/Database/Query/Grammar.php b/src/Database/Query/Grammar.php similarity index 100% rename from src/Uepg/LaravelSybase/Database/Query/Grammar.php rename to src/Database/Query/Grammar.php diff --git a/src/Uepg/LaravelSybase/Database/Query/Processor.php b/src/Database/Query/Processor.php similarity index 100% rename from src/Uepg/LaravelSybase/Database/Query/Processor.php rename to src/Database/Query/Processor.php diff --git a/src/Uepg/LaravelSybase/Database/Schema/Blueprint.php b/src/Database/Schema/Blueprint.php similarity index 100% rename from src/Uepg/LaravelSybase/Database/Schema/Blueprint.php rename to src/Database/Schema/Blueprint.php diff --git a/src/Uepg/LaravelSybase/Database/Schema/Grammar.php b/src/Database/Schema/Grammar.php similarity index 100% rename from src/Uepg/LaravelSybase/Database/Schema/Grammar.php rename to src/Database/Schema/Grammar.php diff --git a/src/Uepg/LaravelSybase/Support/Fluent.php b/src/Support/Fluent.php similarity index 100% rename from src/Uepg/LaravelSybase/Support/Fluent.php rename to src/Support/Fluent.php diff --git a/src/Uepg/LaravelSybase/SybaseServiceProvider.php b/src/SybaseServiceProvider.php similarity index 100% rename from src/Uepg/LaravelSybase/SybaseServiceProvider.php rename to src/SybaseServiceProvider.php From c234d39a75ac8832c51b5f60960963aea5394e9b Mon Sep 17 00:00:00 2001 From: Afonso Gloeden Date: Sat, 11 May 2019 11:26:52 -0300 Subject: [PATCH 10/11] Templates for issues and pull requests added --- .github/ISSUE_TEMPLATE.md | 20 ++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 10 ++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..0f0c189 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,20 @@ +## Versions + + * Laravel: Run `php artisan --version` to show the version. + * PHP: Run `php --version` to show the version. + * Composer: Run `composer --version` to show the version. + * uepg/laravel-sybase: Get the version in `composer.lock`. + +## Expected behavior + +What should have happened? Please include as much detail as possible. + +## Actual behavior + +What actually happened? Please include as much detail as possible. + +## Steps to reproduce + +1. Step 1 +1. Step 2 +1. Step 3 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..dcf3fa1 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,10 @@ +## Changes + + * Feature 1 + * Feature 2 + * Change 1 + * Change 2 + * Change 3 + * Deletion 1 + * Fix #123 + * ... From 18d9ff40b928aaf386c1df850aae30be528e091d Mon Sep 17 00:00:00 2001 From: Afonso Gloeden Date: Sat, 11 May 2019 14:26:29 -0300 Subject: [PATCH 11/11] Usage of the package updated --- README.md | 16 +++++++++++----- composer.json | 36 +++++++++++++++++------------------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 100f9e7..394f5ef 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,16 @@ Update the package dependencies executing: composer update ``` -Add the following entry to your providers array in **config/app.php** file: +Add the following entry to your providers array in **config/app.php** file, optional in Laravel 5.5 or above: ```php -Uepg\LaravelSybase\SybaseServiceProvider::class +Uepg\LaravelSybase\SybaseServiceProvider::class, +``` + +Add the following entry to your aliases array in **config/app.php** file, optional in Laravel 5.5 or above: + +```php +'UepgBlueprint' => Uepg\LaravelSybase\Database\Schema\Blueprint::class, ``` Update your **config/database.php's** default driver with the settings for the **sqlsrv** or your custom odbc. See the following example: @@ -50,7 +56,7 @@ return [ 'connections' => [ ... - 'sqlsrv' => [ + 'sybase' => [ 'driver' => 'sqlsrv', 'host' => env('DB_HOST', 'sybase.myserver.com'), 'port' => env('DB_PORT', '5000'), @@ -73,7 +79,7 @@ Update your **.env** with the settings for the **sqlsrv** or your custom odbc. S ```text ... -DB_CONNECTION=sqlsrv +DB_CONNECTION=sybase DB_HOST=sybase.myserver.com DB_PORT=5000 DB_DATABASE=mydatabase @@ -104,7 +110,7 @@ In the migration file you must replace `use Illuminate\Database\Schema\Blueprint use Illuminate\Support\Facades\Schema; // use Illuminate\Database\Schema\Blueprint; -use Uepg\LaravelSybase\Database\Schema\Blueprint; +use Uepg\LaravelSybase\Database\Schema\Blueprint; // or "use UepgBlueprint as Blueprint" use Illuminate\Database\Migrations\Migration; class CreateTable extends Migration diff --git a/composer.json b/composer.json index 88a50e4..fbc3387 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,10 @@ { "name": "uepg/laravel-sybase", - "type": "library", "description": "Sybase based Eloquent module extension for Laravel 5.x.", + "keywords": [ + "sybase" + ], + "license": "GPL-2.0-only", "authors": [ { "name": "Gabriel Tadra Mainginski", @@ -12,34 +15,29 @@ "email": "mazer@uepg.br" } ], - "keywords": [ - "sybase" - ], - "license": "GPL-2.0-only", - "require": { - "php": ">=5.6.4", - "doctrine/dbal": "^2.9", - "illuminate/database": "^5.4", - "illuminate/support": "^5.4" + "support": { + "issues": "https://github.com/uepg/laravel-sybase/issues", + "wiki": "https://github.com/uepg/laravel-sybase/wiki" }, - "require-dev": {}, - "config": { - "optimize-autoloader": true, - "preferred-install": "dist", - "sort-packages": true + "require": { + "php": "^5.6.4 || ^7.0", + "doctrine/dbal": "^2.5", + "illuminate/database": "5.4.*|5.5.*|5.6.*|5.7.*", + "illuminate/support": "5.4.*|5.5.*|5.6.*|5.7.*" }, "extra": { "laravel": { "providers": [ "Uepg\\LaravelSybase\\SybaseServiceProvider" - ] + ], + "aliases": { + "UepgBlueprint": "Uepg\\LaravelSybase\\Database\\Schema\\Blueprint" + } } }, "autoload": { "psr-4": { "Uepg\\LaravelSybase\\": "src/" } - }, - "minimum-stability": "dev", - "prefer-stable": true + } }