diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a1089fe..246d2986 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 5.1.0 (released 2015-11-15) + +- Added Laravel 5.2 support + ## 5.0.3 (released 2015-11-02) - Added new access token exception diff --git a/composer.json b/composer.json index 74d53b68..b6de14f3 100644 --- a/composer.json +++ b/composer.json @@ -15,12 +15,12 @@ ], "require": { "php": ">=5.5.9", - "illuminate/database": "5.1.*", - "illuminate/console": "5.1.*", - "illuminate/contracts": "5.1.*", - "illuminate/http": "5.1.*", - "illuminate/support": "5.1.*", - "illuminate/config": "5.1.*", + "illuminate/database": "5.1.* || 5.2.*", + "illuminate/console": "5.1.* || 5.2.*", + "illuminate/contracts": "5.1.* || 5.2.*", + "illuminate/http": "5.1.* || 5.2.*", + "illuminate/support": "5.1.* || 5.2.*", + "illuminate/config": "5.1.* || 5.2.*", "league/oauth2-server": "4.1.*" }, "require-dev": { @@ -49,7 +49,7 @@ }, "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "minimum-stability": "dev", diff --git a/src/OAuth2ServerServiceProvider.php b/src/OAuth2ServerServiceProvider.php index c11b1cfa..5dba0cce 100644 --- a/src/OAuth2ServerServiceProvider.php +++ b/src/OAuth2ServerServiceProvider.php @@ -12,7 +12,9 @@ namespace LucaDegasperi\OAuth2Server; use Illuminate\Contracts\Foundation\Application; +use Illuminate\Foundation\Application as LaravelApplication; use Illuminate\Support\ServiceProvider; +use Laravel\Lumen\Application as LumenApplication; use League\OAuth2\Server\AuthorizationServer; use League\OAuth2\Server\ResourceServer; use League\OAuth2\Server\Storage\AccessTokenInterface; @@ -55,9 +57,9 @@ protected function setupConfig(Application $app) { $source = realpath(__DIR__.'/../config/oauth2.php'); - if (class_exists('Illuminate\Foundation\Application', false) && $app->runningInConsole()) { + if ($app instanceof LaravelApplication && $app->runningInConsole()) { $this->publishes([$source => config_path('oauth2.php')]); - } elseif (class_exists('Laravel\Lumen\Application', false)) { + } elseif ($app instanceof LumenApplication) { $app->configure('oauth2'); } @@ -75,7 +77,7 @@ protected function setupMigrations(Application $app) { $source = realpath(__DIR__.'/../database/migrations/'); - if (class_exists('Illuminate\Foundation\Application', false) && $app->runningInConsole()) { + if ($app instanceof LaravelApplication && $app->runningInConsole()) { $this->publishes([$source => database_path('migrations')], 'migrations'); } }