Skip to content

Commit d4cf9fd

Browse files
authored
chore(deps): Support Laravel 7 (#1947)
* chore(deps): Support Laravel 7 * fix travis * remove composer memory limit * drop 5.1 * cleanup * composer
1 parent f57a0ff commit d4cf9fd

File tree

6 files changed

+13
-250
lines changed

6 files changed

+13
-250
lines changed

.travis.yml

+6-26
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,12 @@ matrix:
2020
dist: trusty
2121
env: LARAVEL='5.4.*' XDEBUG=1
2222
group: edge
23-
- php: 5.5.9
24-
dist: trusty
25-
env: LARAVEL='5.1.*'
2623
- php: 5.5.9
2724
dist: trusty
2825
env: LARAVEL='5.2.*'
29-
- php: 5.5
30-
dist: trusty
31-
env: LARAVEL='5.1.*'
3226
- php: 5.5
3327
dist: trusty
3428
env: LARAVEL='5.2.*'
35-
- php: 5.6
36-
dist: trusty
37-
env: LARAVEL='5.1.*'
3829
- php: 5.6
3930
dist: trusty
4031
env: LARAVEL='5.2.*'
@@ -44,8 +35,6 @@ matrix:
4435
- php: 5.6
4536
dist: trusty
4637
env: LARAVEL='5.4.*'
47-
- php: 7.0
48-
env: LARAVEL='5.1.*'
4938
- php: 7.0
5039
env: LARAVEL='5.2.*'
5140
- php: 7.0
@@ -54,8 +43,6 @@ matrix:
5443
env: LARAVEL='5.4.*'
5544
- php: 7.0
5645
env: LARAVEL='5.5.*'
57-
- php: 7.1
58-
env: LARAVEL='5.1.*'
5946
- php: 7.1
6047
env: LARAVEL='5.2.*'
6148
- php: 7.1
@@ -70,8 +57,6 @@ matrix:
7057
env: LARAVEL='5.7.*'
7158
- php: 7.1
7259
env: LARAVEL='5.8.*'
73-
- php: 7.2
74-
env: LARAVEL='5.1.*'
7560
- php: 7.2
7661
env: LARAVEL='5.2.*'
7762
- php: 7.2
@@ -88,8 +73,8 @@ matrix:
8873
env: LARAVEL='5.8.*'
8974
- php: 7.2
9075
env: LARAVEL='6.*'
91-
- php: 7.3
92-
env: LARAVEL='5.1.*' XDEBUG=1
76+
- php: 7.2
77+
env: LARAVEL='7.*'
9378
- php: 7.3
9479
env: LARAVEL='5.2.*' XDEBUG=1
9580
- php: 7.3
@@ -106,6 +91,8 @@ matrix:
10691
env: LARAVEL='5.8.*' XDEBUG=1
10792
- php: 7.3
10893
env: COVERAGE=1 LARAVEL='6.*' XDEBUG=1
94+
- php: 7.3
95+
env: COVERAGE=1 LARAVEL='7.*' XDEBUG=1
10996
fast_finish: true
11097

11198

@@ -115,17 +102,10 @@ before_install:
115102
- travis_retry composer require "illuminate/contracts:${LARAVEL}" --no-interaction --no-update
116103

117104
install:
118-
- travis_retry composer install --prefer-dist --no-interaction --no-suggest
105+
- COMPOSER_MEMORY_LIMIT=-1 travis_retry composer install --prefer-dist --no-interaction --no-suggest
119106

120107
script:
121-
- |
122-
if [[ $LARAVEL == '6.*' ]]; then
123-
composer test:ci -- --exclude-group sentinel-2
124-
elif [[ $LARAVEL == '5.1.*' ]]; then
125-
composer test:ci -- --exclude-group laravel-5.2
126-
else
127-
composer test:ci
128-
fi
108+
- composer test:ci
129109

130110
after_success:
131111
- if [[ $COVERAGE = 1 ]]; then bash <(curl -s https://codecov.io/bash); fi

composer.json

+7-8
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,18 @@
2424
],
2525
"require": {
2626
"php": "^5.5.9|^7.0",
27-
"illuminate/auth": "^5.1|^6",
28-
"illuminate/contracts": "^5.1|^6",
29-
"illuminate/http": "^5.1|^6",
30-
"illuminate/support": "^5.1|^6",
27+
"illuminate/auth": "^5.2|^6|^7",
28+
"illuminate/contracts": "^5.2|^6|^7",
29+
"illuminate/http": "^5.2|^6|^7",
30+
"illuminate/support": "^5.2|^6|^7",
3131
"lcobucci/jwt": "^3.2",
3232
"namshi/jose": "^7.0",
3333
"nesbot/carbon": "^1.0|^2.0"
3434
},
3535
"require-dev": {
36-
"cartalyst/sentinel": "^2|^3",
37-
"illuminate/console": "^5.1|^6",
38-
"illuminate/database": "^5.1|^6",
39-
"illuminate/routing": "^5.1|^6",
36+
"illuminate/console": "^5.2|^6|^7",
37+
"illuminate/database": "^5.2|^6|^7",
38+
"illuminate/routing": "^5.2|^6|^7",
4039
"mockery/mockery": ">=0.9.9",
4140
"phpunit/phpunit": "~4.8|~6.0"
4241
},

src/Providers/Auth/Sentinel.php

-77
This file was deleted.

tests/JWTGuardTest.php

-24
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public function setUp()
4848

4949
/**
5050
* @test
51-
* @group laravel-5.2
5251
*/
5352
public function it_should_get_the_request()
5453
{
@@ -57,7 +56,6 @@ public function it_should_get_the_request()
5756

5857
/**
5958
* @test
60-
* @group laravel-5.2
6159
*/
6260
public function it_should_get_the_authenticated_user_if_a_valid_token_is_provided()
6361
{
@@ -92,7 +90,6 @@ public function it_should_get_the_authenticated_user_if_a_valid_token_is_provide
9290

9391
/**
9492
* @test
95-
* @group laravel-5.2
9693
*/
9794
public function it_should_get_the_authenticated_user_if_a_valid_token_is_provided_and_not_throw_an_exception()
9895
{
@@ -124,7 +121,6 @@ public function it_should_get_the_authenticated_user_if_a_valid_token_is_provide
124121

125122
/**
126123
* @test
127-
* @group laravel-5.2
128124
*/
129125
public function it_should_return_null_if_an_invalid_token_is_provided()
130126
{
@@ -140,7 +136,6 @@ public function it_should_return_null_if_an_invalid_token_is_provided()
140136

141137
/**
142138
* @test
143-
* @group laravel-5.2
144139
*/
145140
public function it_should_return_null_if_no_token_is_provided()
146141
{
@@ -156,7 +151,6 @@ public function it_should_return_null_if_no_token_is_provided()
156151

157152
/**
158153
* @test
159-
* @group laravel-5.2
160154
* @expectedException \Tymon\JWTAuth\Exceptions\UserNotDefinedException
161155
* @expectedExceptionMessage An error occurred
162156
*/
@@ -174,7 +168,6 @@ public function it_should_throw_an_exception_if_an_invalid_token_is_provided()
174168

175169
/**
176170
* @test
177-
* @group laravel-5.2
178171
* @expectedException \Tymon\JWTAuth\Exceptions\UserNotDefinedException
179172
* @expectedExceptionMessage An error occurred
180173
*/
@@ -192,7 +185,6 @@ public function it_should_throw_an_exception_if_no_token_is_provided()
192185

193186
/**
194187
* @test
195-
* @group laravel-5.2
196188
*/
197189
public function it_should_return_a_token_if_credentials_are_ok_and_user_is_found()
198190
{
@@ -232,7 +224,6 @@ public function it_should_return_a_token_if_credentials_are_ok_and_user_is_found
232224

233225
/**
234226
* @test
235-
* @group laravel-5.2
236227
*/
237228
public function it_should_return_true_if_credentials_are_ok_and_user_is_found_when_choosing_not_to_login()
238229
{
@@ -255,7 +246,6 @@ public function it_should_return_true_if_credentials_are_ok_and_user_is_found_wh
255246

256247
/**
257248
* @test
258-
* @group laravel-5.2
259249
*/
260250
public function it_should_return_false_if_credentials_are_invalid()
261251
{
@@ -277,7 +267,6 @@ public function it_should_return_false_if_credentials_are_invalid()
277267

278268
/**
279269
* @test
280-
* @group laravel-5.2
281270
*/
282271
public function it_should_magically_call_the_jwt_instance()
283272
{
@@ -287,7 +276,6 @@ public function it_should_magically_call_the_jwt_instance()
287276

288277
/**
289278
* @test
290-
* @group laravel-5.2
291279
*/
292280
public function it_should_logout_the_user_by_invalidating_the_token()
293281
{
@@ -302,7 +290,6 @@ public function it_should_logout_the_user_by_invalidating_the_token()
302290

303291
/**
304292
* @test
305-
* @group laravel-5.2
306293
*/
307294
public function it_should_refresh_the_token()
308295
{
@@ -315,7 +302,6 @@ public function it_should_refresh_the_token()
315302

316303
/**
317304
* @test
318-
* @group laravel-5.2
319305
*/
320306
public function it_should_invalidate_the_token()
321307
{
@@ -328,7 +314,6 @@ public function it_should_invalidate_the_token()
328314

329315
/**
330316
* @test
331-
* @group laravel-5.2
332317
* @expectedException \Tymon\JWTAuth\Exceptions\JWTException
333318
* @expectedExceptionMessage Token could not be parsed from the request.
334319
*/
@@ -343,7 +328,6 @@ public function it_should_throw_an_exception_if_there_is_no_token_present_when_r
343328

344329
/**
345330
* @test
346-
* @group laravel-5.2
347331
*/
348332
public function it_should_generate_a_token_by_id()
349333
{
@@ -364,7 +348,6 @@ public function it_should_generate_a_token_by_id()
364348

365349
/**
366350
* @test
367-
* @group laravel-5.2
368351
*/
369352
public function it_should_not_generate_a_token_by_id()
370353
{
@@ -378,7 +361,6 @@ public function it_should_not_generate_a_token_by_id()
378361

379362
/**
380363
* @test
381-
* @group laravel-5.2
382364
*/
383365
public function it_should_authenticate_the_user_by_credentials_and_return_true_if_valid()
384366
{
@@ -400,7 +382,6 @@ public function it_should_authenticate_the_user_by_credentials_and_return_true_i
400382

401383
/**
402384
* @test
403-
* @group laravel-5.2
404385
*/
405386
public function it_should_attempt_to_authenticate_the_user_by_credentials_and_return_false_if_invalid()
406387
{
@@ -422,7 +403,6 @@ public function it_should_attempt_to_authenticate_the_user_by_credentials_and_re
422403

423404
/**
424405
* @test
425-
* @group laravel-5.2
426406
*/
427407
public function it_should_authenticate_the_user_by_id_and_return_boolean()
428408
{
@@ -439,7 +419,6 @@ public function it_should_authenticate_the_user_by_id_and_return_boolean()
439419

440420
/**
441421
* @test
442-
* @group laravel-5.2
443422
*/
444423
public function it_should_not_authenticate_the_user_by_id_and_return_false()
445424
{
@@ -454,7 +433,6 @@ public function it_should_not_authenticate_the_user_by_id_and_return_false()
454433

455434
/**
456435
* @test
457-
* @group laravel-5.2
458436
*/
459437
public function it_should_create_a_token_from_a_user_object()
460438
{
@@ -477,7 +455,6 @@ public function it_should_create_a_token_from_a_user_object()
477455

478456
/**
479457
* @test
480-
* @group laravel-5.2
481458
*/
482459
public function it_should_get_the_payload()
483460
{
@@ -489,7 +466,6 @@ public function it_should_get_the_payload()
489466

490467
/**
491468
* @test
492-
* @group laravel-5.2
493469
*/
494470
public function it_should_be_macroable()
495471
{

0 commit comments

Comments
 (0)