Skip to content

Commit

Permalink
chore(deps): Support Laravel 7 (#1947)
Browse files Browse the repository at this point in the history
* chore(deps): Support Laravel 7

* fix travis

* remove composer memory limit

* drop 5.1

* cleanup

* composer
  • Loading branch information
pulkitjalan authored Mar 4, 2020
1 parent f57a0ff commit d4cf9fd
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 250 deletions.
32 changes: 6 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,12 @@ matrix:
dist: trusty
env: LARAVEL='5.4.*' XDEBUG=1
group: edge
- php: 5.5.9
dist: trusty
env: LARAVEL='5.1.*'
- php: 5.5.9
dist: trusty
env: LARAVEL='5.2.*'
- php: 5.5
dist: trusty
env: LARAVEL='5.1.*'
- php: 5.5
dist: trusty
env: LARAVEL='5.2.*'
- php: 5.6
dist: trusty
env: LARAVEL='5.1.*'
- php: 5.6
dist: trusty
env: LARAVEL='5.2.*'
Expand All @@ -44,8 +35,6 @@ matrix:
- php: 5.6
dist: trusty
env: LARAVEL='5.4.*'
- php: 7.0
env: LARAVEL='5.1.*'
- php: 7.0
env: LARAVEL='5.2.*'
- php: 7.0
Expand All @@ -54,8 +43,6 @@ matrix:
env: LARAVEL='5.4.*'
- php: 7.0
env: LARAVEL='5.5.*'
- php: 7.1
env: LARAVEL='5.1.*'
- php: 7.1
env: LARAVEL='5.2.*'
- php: 7.1
Expand All @@ -70,8 +57,6 @@ matrix:
env: LARAVEL='5.7.*'
- php: 7.1
env: LARAVEL='5.8.*'
- php: 7.2
env: LARAVEL='5.1.*'
- php: 7.2
env: LARAVEL='5.2.*'
- php: 7.2
Expand All @@ -88,8 +73,8 @@ matrix:
env: LARAVEL='5.8.*'
- php: 7.2
env: LARAVEL='6.*'
- php: 7.3
env: LARAVEL='5.1.*' XDEBUG=1
- php: 7.2
env: LARAVEL='7.*'
- php: 7.3
env: LARAVEL='5.2.*' XDEBUG=1
- php: 7.3
Expand All @@ -106,6 +91,8 @@ matrix:
env: LARAVEL='5.8.*' XDEBUG=1
- php: 7.3
env: COVERAGE=1 LARAVEL='6.*' XDEBUG=1
- php: 7.3
env: COVERAGE=1 LARAVEL='7.*' XDEBUG=1
fast_finish: true


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

install:
- travis_retry composer install --prefer-dist --no-interaction --no-suggest
- COMPOSER_MEMORY_LIMIT=-1 travis_retry composer install --prefer-dist --no-interaction --no-suggest

script:
- |
if [[ $LARAVEL == '6.*' ]]; then
composer test:ci -- --exclude-group sentinel-2
elif [[ $LARAVEL == '5.1.*' ]]; then
composer test:ci -- --exclude-group laravel-5.2
else
composer test:ci
fi
- composer test:ci

after_success:
- if [[ $COVERAGE = 1 ]]; then bash <(curl -s https://codecov.io/bash); fi
15 changes: 7 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,18 @@
],
"require": {
"php": "^5.5.9|^7.0",
"illuminate/auth": "^5.1|^6",
"illuminate/contracts": "^5.1|^6",
"illuminate/http": "^5.1|^6",
"illuminate/support": "^5.1|^6",
"illuminate/auth": "^5.2|^6|^7",
"illuminate/contracts": "^5.2|^6|^7",
"illuminate/http": "^5.2|^6|^7",
"illuminate/support": "^5.2|^6|^7",
"lcobucci/jwt": "^3.2",
"namshi/jose": "^7.0",
"nesbot/carbon": "^1.0|^2.0"
},
"require-dev": {
"cartalyst/sentinel": "^2|^3",
"illuminate/console": "^5.1|^6",
"illuminate/database": "^5.1|^6",
"illuminate/routing": "^5.1|^6",
"illuminate/console": "^5.2|^6|^7",
"illuminate/database": "^5.2|^6|^7",
"illuminate/routing": "^5.2|^6|^7",
"mockery/mockery": ">=0.9.9",
"phpunit/phpunit": "~4.8|~6.0"
},
Expand Down
77 changes: 0 additions & 77 deletions src/Providers/Auth/Sentinel.php

This file was deleted.

24 changes: 0 additions & 24 deletions tests/JWTGuardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public function setUp()

/**
* @test
* @group laravel-5.2
*/
public function it_should_get_the_request()
{
Expand All @@ -57,7 +56,6 @@ public function it_should_get_the_request()

/**
* @test
* @group laravel-5.2
*/
public function it_should_get_the_authenticated_user_if_a_valid_token_is_provided()
{
Expand Down Expand Up @@ -92,7 +90,6 @@ public function it_should_get_the_authenticated_user_if_a_valid_token_is_provide

/**
* @test
* @group laravel-5.2
*/
public function it_should_get_the_authenticated_user_if_a_valid_token_is_provided_and_not_throw_an_exception()
{
Expand Down Expand Up @@ -124,7 +121,6 @@ public function it_should_get_the_authenticated_user_if_a_valid_token_is_provide

/**
* @test
* @group laravel-5.2
*/
public function it_should_return_null_if_an_invalid_token_is_provided()
{
Expand All @@ -140,7 +136,6 @@ public function it_should_return_null_if_an_invalid_token_is_provided()

/**
* @test
* @group laravel-5.2
*/
public function it_should_return_null_if_no_token_is_provided()
{
Expand All @@ -156,7 +151,6 @@ public function it_should_return_null_if_no_token_is_provided()

/**
* @test
* @group laravel-5.2
* @expectedException \Tymon\JWTAuth\Exceptions\UserNotDefinedException
* @expectedExceptionMessage An error occurred
*/
Expand All @@ -174,7 +168,6 @@ public function it_should_throw_an_exception_if_an_invalid_token_is_provided()

/**
* @test
* @group laravel-5.2
* @expectedException \Tymon\JWTAuth\Exceptions\UserNotDefinedException
* @expectedExceptionMessage An error occurred
*/
Expand All @@ -192,7 +185,6 @@ public function it_should_throw_an_exception_if_no_token_is_provided()

/**
* @test
* @group laravel-5.2
*/
public function it_should_return_a_token_if_credentials_are_ok_and_user_is_found()
{
Expand Down Expand Up @@ -232,7 +224,6 @@ public function it_should_return_a_token_if_credentials_are_ok_and_user_is_found

/**
* @test
* @group laravel-5.2
*/
public function it_should_return_true_if_credentials_are_ok_and_user_is_found_when_choosing_not_to_login()
{
Expand All @@ -255,7 +246,6 @@ public function it_should_return_true_if_credentials_are_ok_and_user_is_found_wh

/**
* @test
* @group laravel-5.2
*/
public function it_should_return_false_if_credentials_are_invalid()
{
Expand All @@ -277,7 +267,6 @@ public function it_should_return_false_if_credentials_are_invalid()

/**
* @test
* @group laravel-5.2
*/
public function it_should_magically_call_the_jwt_instance()
{
Expand All @@ -287,7 +276,6 @@ public function it_should_magically_call_the_jwt_instance()

/**
* @test
* @group laravel-5.2
*/
public function it_should_logout_the_user_by_invalidating_the_token()
{
Expand All @@ -302,7 +290,6 @@ public function it_should_logout_the_user_by_invalidating_the_token()

/**
* @test
* @group laravel-5.2
*/
public function it_should_refresh_the_token()
{
Expand All @@ -315,7 +302,6 @@ public function it_should_refresh_the_token()

/**
* @test
* @group laravel-5.2
*/
public function it_should_invalidate_the_token()
{
Expand All @@ -328,7 +314,6 @@ public function it_should_invalidate_the_token()

/**
* @test
* @group laravel-5.2
* @expectedException \Tymon\JWTAuth\Exceptions\JWTException
* @expectedExceptionMessage Token could not be parsed from the request.
*/
Expand All @@ -343,7 +328,6 @@ public function it_should_throw_an_exception_if_there_is_no_token_present_when_r

/**
* @test
* @group laravel-5.2
*/
public function it_should_generate_a_token_by_id()
{
Expand All @@ -364,7 +348,6 @@ public function it_should_generate_a_token_by_id()

/**
* @test
* @group laravel-5.2
*/
public function it_should_not_generate_a_token_by_id()
{
Expand All @@ -378,7 +361,6 @@ public function it_should_not_generate_a_token_by_id()

/**
* @test
* @group laravel-5.2
*/
public function it_should_authenticate_the_user_by_credentials_and_return_true_if_valid()
{
Expand All @@ -400,7 +382,6 @@ public function it_should_authenticate_the_user_by_credentials_and_return_true_i

/**
* @test
* @group laravel-5.2
*/
public function it_should_attempt_to_authenticate_the_user_by_credentials_and_return_false_if_invalid()
{
Expand All @@ -422,7 +403,6 @@ public function it_should_attempt_to_authenticate_the_user_by_credentials_and_re

/**
* @test
* @group laravel-5.2
*/
public function it_should_authenticate_the_user_by_id_and_return_boolean()
{
Expand All @@ -439,7 +419,6 @@ public function it_should_authenticate_the_user_by_id_and_return_boolean()

/**
* @test
* @group laravel-5.2
*/
public function it_should_not_authenticate_the_user_by_id_and_return_false()
{
Expand All @@ -454,7 +433,6 @@ public function it_should_not_authenticate_the_user_by_id_and_return_false()

/**
* @test
* @group laravel-5.2
*/
public function it_should_create_a_token_from_a_user_object()
{
Expand All @@ -477,7 +455,6 @@ public function it_should_create_a_token_from_a_user_object()

/**
* @test
* @group laravel-5.2
*/
public function it_should_get_the_payload()
{
Expand All @@ -489,7 +466,6 @@ public function it_should_get_the_payload()

/**
* @test
* @group laravel-5.2
*/
public function it_should_be_macroable()
{
Expand Down
Loading

0 comments on commit d4cf9fd

Please sign in to comment.