From 8e1c1c2e40cb994403511ced7a88f250c4f3aca1 Mon Sep 17 00:00:00 2001 From: Cooperl Arc Atlantique Date: Thu, 21 Sep 2017 16:05:08 +0200 Subject: [PATCH] Add package auto discovery feature compatibility from Laravel 5.5 --- README.md | 18 ------------------ composer.json | 52 ++++++++++++++++++++++++++++++++------------------- 2 files changed, 33 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index e875d0b..5c16a00 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ # laravel-db2 - [![Latest Stable Version](https://poser.pugx.org/cooperl/laravel-db2/v/stable)](https://packagist.org/packages/cooperl/laravel-db2) [![Total Downloads](https://poser.pugx.org/cooperl/laravel-db2/downloads)](https://packagist.org/packages/cooperl/laravel-db2) [![Latest Unstable Version](https://poser.pugx.org/cooperl/laravel-db2/v/unstable)](https://packagist.org/packages/cooperl/laravel-db2) @@ -11,38 +10,22 @@ It provides DB2 Connection by extending the Illuminate Database component of the --- - [Installation](#installation) -- [Registering the Package](#registering-the-package) - [Configuration](#configuration) - [Usage](#usage) ## Installation - Add laravel-db2 to your composer.json file: - ``` "require": { "cooperl/laravel-db2": "~5.4" } ``` - Use [composer](http://getcomposer.org) to install this package. - ``` $ composer update ``` -### Registering the Package - -Add the laravel-db2 Service Provider to your config in ``app/config/app.php``: - -```php -'providers' => [ - 'Cooperl\Database\DB2\DB2ServiceProvider' -], -``` - ### Configuration - There are two ways to configure laravel-db2. You can choose the most convenient way for you. You can put your DB2 credentials into ``app/config/database.php`` (option 1) file or use package config file which you can generate through command line by artisan (option 2). Please check appropriate specific DSN parameters for your connection. @@ -54,7 +37,6 @@ For PHP applications using the UTF8 locale the workaround to prevent the extra g DEBUG = 65536 #### Option 1: Configure DB2 using ``app/config/database.php`` file - Simply add this code at the end of your ``app/config/database.php`` file: ```php diff --git a/composer.json b/composer.json index 0a4c5a7..1949148 100644 --- a/composer.json +++ b/composer.json @@ -1,22 +1,36 @@ { - "name": "cooperl/laravel-db2", - "description": "laravel-db2 is a simple DB2 service provider for Laravel. It provides DB2 Connection by extending the Illuminate Database component of the laravel framework.", - "keywords": ["laravel", "DB2", "Database", "PDO", "ODBC"], - "license": "MIT", - "authors": [ - { - "name": "Maxime Rault", - "role": "Developer" - } - ], - "require": { - "php": ">=5.6.4" - }, - "require-dev": { - }, - "autoload": { - "psr-4": { - "Cooperl\\Database\\DB2\\": "src/" - } + "name": "cooperl/laravel-db2", + "description": "laravel-db2 is a simple DB2 service provider for Laravel. It provides DB2 Connection by extending the Illuminate Database component of the laravel framework.", + "keywords": [ + "laravel", + "DB2", + "Database", + "PDO", + "ODBC" + ], + "license": "MIT", + "authors": [ + { + "name": "Maxime Rault", + "role": "Developer" } + ], + "require": { + "php": ">=7.0.0", + "laravel/framework": "5.5.*" + }, + "require-dev": { + }, + "autoload": { + "psr-4": { + "Cooperl\\Database\\DB2\\": "src/" + } + }, + "extra": { + "laravel": { + "providers": [ + "Cooperl\\Database\\DB2\\DB2ServiceProvider" + ] + } + } }