Skip to content

Commit 181f8aa

Browse files
authored
Add Laravel 7.x support, drop 5.8 and below (#32)
1 parent 165d0f7 commit 181f8aa

File tree

5 files changed

+45
-37
lines changed

5 files changed

+45
-37
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,51 @@ on:
99

1010
jobs:
1111
phpunit:
12-
name: Test on laravel ${{ matrix.laravel }}
12+
name: Tests PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
1313
runs-on: ubuntu-latest
1414

1515
strategy:
16+
fail-fast: true
1617
matrix:
17-
laravel: ["5.8", "6.0" , "6.*"]
18-
19-
container:
20-
image: jackmdavis97/php:7.3
18+
php: [7.2, 7.3, 7.4]
19+
laravel: ["6.0" , "6.*", "7.0", "7.*"]
2120

2221
steps:
23-
- uses: actions/checkout@v1
22+
- uses: actions/checkout@v2
2423
with:
2524
fetch-depth: 1
26-
- name: Set Laravel version
25+
26+
- name: Cache dependencies
27+
uses: actions/cache@v1
28+
with:
29+
path: ~/.composer/cache/files
30+
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
31+
32+
- name: Setup PHP
33+
uses: shivammathur/setup-php@v2
34+
with:
35+
php-version: ${{ matrix.php }}
36+
extensions: dom, curl, libxml, mbstring, zip
37+
coverage: none
38+
39+
- name: Install dependencies
2740
run: |
2841
composer require "illuminate/auth:${{ matrix.laravel }}" --no-update
2942
composer require "illuminate/console:${{ matrix.laravel }}" --no-update
3043
composer require "illuminate/contracts:${{ matrix.laravel }}" --no-update
3144
composer require "illuminate/database:${{ matrix.laravel }}" --no-update
3245
composer require "illuminate/events:${{ matrix.laravel }}" --no-update
3346
composer require "illuminate/support:${{ matrix.laravel }}" --no-update
34-
composer require "illuminate/view:${{ matrix.laravel }}" --no-update
35-
- name: Composer update
36-
run: composer update --no-interaction --no-progress --no-suggest --prefer-dist
47+
composer require "illuminate/view:${{ matrix.laravel }}" --prefer-dist --no-interaction
48+
3749
- name: Run Testsuite
3850
run: ./vendor/bin/phpunit
51+
3952
jsunit:
4053
name: Test Javascript
4154
runs-on: ubuntu-latest
4255
steps:
43-
- uses: actions/checkout@v1
56+
- uses: actions/checkout@v2
4457
with:
4558
fetch-depth: 1
4659
- name: Yarn install

.travis.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,13 @@ cache:
1111
- $HOME/.composer/cache
1212

1313
php:
14-
- 7.1
1514
- 7.2
15+
- 7.3
16+
- 7.4
1617

1718
env:
18-
- LARAVEL_VERSION=5.5.*
19-
- LARAVEL_VERSION=5.6.*
20-
- LARAVEL_VERSION=5.7.*
21-
- LARAVEL_VERSION=5.8.*
2219
- LARAVEL_VERSION=6.*
23-
24-
matrix:
25-
exclude:
26-
- php: 7.1
27-
env: LARAVEL_VERSION=6.*
20+
- LARAVEL_VERSION=7.*
2821

2922
sudo: false
3023

composer.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
"license": "MIT",
66
"type": "project",
77
"require": {
8-
"php": ">=7.1",
9-
"illuminate/auth": "5.5.*|5.6.*|5.7.*|5.8.*|6.*",
10-
"illuminate/console": "5.5.*|5.6.*|5.7.*|5.8.*|6.*",
11-
"illuminate/contracts": "5.5.*|5.6.*|5.7.*|5.8.*|6.*",
12-
"illuminate/database": "5.5.*|5.6.*|5.7.*|5.8.*|6.*",
13-
"illuminate/events": "5.5.*|5.6.*|5.7.*|5.8.*|6.*",
14-
"illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*|6.*",
15-
"illuminate/view": "5.5.*|5.6.*|5.7.*|5.8.*|6.*"
8+
"php": ">=7.2.5",
9+
"illuminate/auth": "6.*|7.*",
10+
"illuminate/console": "6.*|7.*",
11+
"illuminate/contracts": "6.*|7.*",
12+
"illuminate/database": "6.*|7.*",
13+
"illuminate/events": "6.*|7.*",
14+
"illuminate/support": "6.*|7.*",
15+
"illuminate/view": "6.*|7.*"
1616
},
1717
"require-dev": {
18-
"fzaninotto/faker": "~1.4",
19-
"mockery/mockery": "^1.0",
20-
"phpunit/phpunit": "^6.0|^7.0|^8.0",
21-
"orchestra/testbench": "~3.5|~3.6|~3.7|~3.8|^4.0"
18+
"fzaninotto/faker": "~1.9.1",
19+
"mockery/mockery": "^1.3.1",
20+
"phpunit/phpunit": "^8.5|^9.0",
21+
"orchestra/testbench": "^4.0|^5.0"
2222
},
2323
"autoload": {
2424
"classmap": [
@@ -42,7 +42,7 @@
4242
},
4343
"extra": {
4444
"brach-alias": {
45-
"dev-master": "0.7.x-dev"
45+
"dev-master": "0.8.x-dev"
4646
},
4747
"laravel": {
4848
"providers": [

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.com/OneOffTech/laravel-tus-upload.svg?branch=master)](https://travis-ci.com/OneOffTech/laravel-tus-upload)
1+
![CI](https://github.com/OneOffTech/laravel-tus-upload/workflows/CI/badge.svg)
22

33
# Laravel [Tus](http://tus.io/) based Upload
44

@@ -20,7 +20,7 @@ This package contains a PHP component for controlling the Tus upload server and
2020

2121
To get started, install Laravel Tus Upload via the [Composer](http://getcomposer.org/) package manager.
2222

23-
> Requires PHP 7.1
23+
> Requires PHP 7.2
2424
2525
```bash
2626
composer require oneofftech/laravel-tus-upload

tests/Unit/TusUploadQueueControllerTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Tests\Unit;
44

5+
use Carbon\Carbon;
56
use Tests\AbstractTestCase;
67
use Illuminate\Foundation\Testing\DatabaseMigrations;
78
use Illuminate\Foundation\Testing\DatabaseTransactions;
@@ -146,7 +147,8 @@ public function upload_queue_item_can_be_cancelled()
146147
$cancelled_upload = $upload->fresh();
147148

148149
$this->assertTrue($cancelled_upload->cancelled);
149-
$this->assertEquals(json_encode($cancelled_upload), $response->getContent());
150+
$this->assertInstanceOf(Carbon::class, $cancelled_upload->cancelled_at);
151+
$this->assertJson($response->getContent());
150152

151153
Event::assertDispatched(TusUploadCancelled::class, function ($e) use ($cancelled_upload) {
152154
return $e->upload->id === $cancelled_upload->id;

0 commit comments

Comments
 (0)