Skip to content

Commit da6b5d6

Browse files
committed
Merge pull request #599 from lucadegasperi/laravel52
Add Laravel 5.2 support
2 parents 8378a97 + 67512cc commit da6b5d6

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 5.1.0 (released 2015-11-15)
4+
5+
- Added Laravel 5.2 support
6+
37
## 5.0.3 (released 2015-11-02)
48

59
- Added new access token exception

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
],
1616
"require": {
1717
"php": ">=5.5.9",
18-
"illuminate/database": "5.1.*",
19-
"illuminate/console": "5.1.*",
20-
"illuminate/contracts": "5.1.*",
21-
"illuminate/http": "5.1.*",
22-
"illuminate/support": "5.1.*",
23-
"illuminate/config": "5.1.*",
18+
"illuminate/database": "5.1.* || 5.2.*",
19+
"illuminate/console": "5.1.* || 5.2.*",
20+
"illuminate/contracts": "5.1.* || 5.2.*",
21+
"illuminate/http": "5.1.* || 5.2.*",
22+
"illuminate/support": "5.1.* || 5.2.*",
23+
"illuminate/config": "5.1.* || 5.2.*",
2424
"league/oauth2-server": "4.1.*"
2525
},
2626
"require-dev": {
@@ -49,7 +49,7 @@
4949
},
5050
"extra": {
5151
"branch-alias": {
52-
"dev-master": "5.0-dev"
52+
"dev-master": "5.1-dev"
5353
}
5454
},
5555
"minimum-stability": "dev",

src/OAuth2ServerServiceProvider.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
namespace LucaDegasperi\OAuth2Server;
1313

1414
use Illuminate\Contracts\Foundation\Application;
15+
use Illuminate\Foundation\Application as LaravelApplication;
1516
use Illuminate\Support\ServiceProvider;
17+
use Laravel\Lumen\Application as LumenApplication;
1618
use League\OAuth2\Server\AuthorizationServer;
1719
use League\OAuth2\Server\ResourceServer;
1820
use League\OAuth2\Server\Storage\AccessTokenInterface;
@@ -55,9 +57,9 @@ protected function setupConfig(Application $app)
5557
{
5658
$source = realpath(__DIR__.'/../config/oauth2.php');
5759

58-
if (class_exists('Illuminate\Foundation\Application', false) && $app->runningInConsole()) {
60+
if ($app instanceof LaravelApplication && $app->runningInConsole()) {
5961
$this->publishes([$source => config_path('oauth2.php')]);
60-
} elseif (class_exists('Laravel\Lumen\Application', false)) {
62+
} elseif ($app instanceof LumenApplication) {
6163
$app->configure('oauth2');
6264
}
6365

@@ -75,7 +77,7 @@ protected function setupMigrations(Application $app)
7577
{
7678
$source = realpath(__DIR__.'/../database/migrations/');
7779

78-
if (class_exists('Illuminate\Foundation\Application', false) && $app->runningInConsole()) {
80+
if ($app instanceof LaravelApplication && $app->runningInConsole()) {
7981
$this->publishes([$source => database_path('migrations')], 'migrations');
8082
}
8183
}

0 commit comments

Comments
 (0)