diff --git a/.travis.yml b/.travis.yml index 027bfb6..b5535bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,7 @@ language: php php: - - 7.0 - - hhvm + - 7.2 matrix: allow_failures: diff --git a/CHANGELOG.md b/CHANGELOG.md index 11e5ee5..ceaf876 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,5 +2,13 @@ All Notable changes to `laravel-identify` will be documented in this file -## 2015-11-04 -- Initial release \ No newline at end of file +## Jan 19, 2016 +- Initial release + +## May 6, 2019 +- Add support for Laravel 5.3, 5.4 +- Bump Browser Detector to v6 + +## May 7, 2019 +- Add support for Laravel 5.5, 5.6, 5.7 and 5.8 +- Add support for Laravel auto package discovery \ No newline at end of file diff --git a/README.md b/README.md index 1f80fdb..c21caff 100644 --- a/README.md +++ b/README.md @@ -12,17 +12,18 @@ ## Installation -[PHP](https://php.net) 5.4+ or [HHVM](http://hhvm.com) 3.3+, and [Composer](https://getcomposer.org) are required. +[PHP](https://php.net) 7.1+ or [HHVM](http://hhvm.com) 3.3+, and [Composer](https://getcomposer.org) are required. To get the latest version of Laravel Identify, simply add the following line to the require block of your `composer.json` file. ``` -"unicodeveloper/laravel-identify": "1.1.*" +"unicodeveloper/laravel-identify": "1.7.*" ``` You'll then need to run `composer install` or `composer update` to download it and have the autoloader updated. -Once Laravel Identify is installed, you need to register the service provider. Open up `config/app.php` and add the following to the `providers` key. +- If you're on Laravel 5.5 or above, that's all you need to do! Check out the usage examples below. +- If you're on Laravel < 5.5, you'll need to register the service provider once the package is installed. Open up `config/app.php` and add the following to the `providers` array: * `Unicodeveloper\Identify\IdentifyServiceProvider::class` diff --git a/composer.json b/composer.json index 7955431..4b10046 100644 --- a/composer.json +++ b/composer.json @@ -9,14 +9,13 @@ "email": "prosperotemuyiwa@gmail.com" } ], - "minimum-stability": "stable", "require": { - "php": ">=5.6.4", - "illuminate/support": "~5.2.0|~5.3.0", - "sinergi/browser-detector": "6.0.*" + "php": ">=7.1.3", + "illuminate/support": "~5.7.0|~5.8.0", + "sinergi/browser-detector": "6.1.*" }, "require-dev": { - "phpunit/phpunit": "5.3.*", + "phpunit/phpunit": "~6.0.0", "mockery/mockery": "0.9.*", "scrutinizer/ocular": "~1.1", "satooshi/php-coveralls": "^0.7.0" @@ -33,5 +32,15 @@ }, "scripts": { "test": "vendor/bin/phpunit" + }, + "extra": { + "laravel": { + "providers": [ + "Unicodeveloper\\Identify\\IdentifyServiceProvider" + ], + "aliases": { + "Identify": "Unicodeveloper\\Identify\\Facades\\IdentifyFacade" + } + } } } diff --git a/tests/IdentifyServiceProviderTest.php b/tests/IdentifyServiceProviderTest.php index 75cd533..7b3f19d 100644 --- a/tests/IdentifyServiceProviderTest.php +++ b/tests/IdentifyServiceProviderTest.php @@ -3,10 +3,10 @@ namespace Unicodeveloper\Identify\Test; use Mockery as m; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; use Unicodeveloper\Identify\{ Identify, IdentifyServiceProvider }; -class IdentifyServiceProviderTest extends PHPUnit_Framework_TestCase +class IdentifyServiceProviderTest extends TestCase { /** @@ -19,7 +19,7 @@ class IdentifyServiceProviderTest extends PHPUnit_Framework_TestCase */ protected $provider; - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->mockApp = m::mock('\Illuminate\Contracts\Foundation\Application'); diff --git a/tests/IdentifyTest.php b/tests/IdentifyTest.php index 352c2c9..805a058 100644 --- a/tests/IdentifyTest.php +++ b/tests/IdentifyTest.php @@ -2,11 +2,11 @@ namespace Unicodeveloper\Identify\Test; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; use Sinergi\BrowserDetector\{ Browser, Device, Language, Os }; use Unicodeveloper\Identify\Identify; -class IdentifyTest extends PHPUnit_Framework_TestCase +class IdentifyTest extends TestCase { /** @@ -15,7 +15,7 @@ class IdentifyTest extends PHPUnit_Framework_TestCase */ protected $identify; - protected function setUp() + protected function setUp() : void { parent::setUp(); $this->identify = new Identify();