Skip to content

Commit 050dd36

Browse files
committed
Deprecate php < 7.2 and L5.x (#159)
1 parent 628a694 commit 050dd36

File tree

6 files changed

+28
-21
lines changed

6 files changed

+28
-21
lines changed

.github/workflows/phpunit.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
php: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4]
11+
php-versions: ['7.2', '7.3', '7.4', '8.0']
1212

1313
steps:
14-
- uses: actions/checkout@v1
14+
- uses: actions/checkout@v2
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: ${{ matrix.php-versions }}
1520

1621
- name: Validate composer.json and composer.lock
1722
run: composer validate

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
vendor
2-
.idea
2+
.idea
3+
composer.lock
4+
.phpunit.result.cache

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
}
1818
],
1919
"require": {
20-
"php": ">=5.5.9",
21-
"illuminate/console": "~5.0|~6.0|~7.0|~8.0",
22-
"illuminate/filesystem": "~5.0|~6.0|~7.0|~8.0",
23-
"illuminate/database": "~5.0|~6.0|~7.0|~8.0",
24-
"illuminate/support": "~5.0|~6.0|~7.0|~8.0",
25-
"illuminate/config": "~5.0|~6.0|~7.0|~8.0",
26-
"illuminate/pagination": "~5.0|~6.0|~7.0|~8.0"
20+
"php": ">=7.2",
21+
"illuminate/console": "~6.0|~7.0|~8.0",
22+
"illuminate/filesystem": "~6.0|~7.0|~8.0",
23+
"illuminate/database": "~6.0|~7.0|~8.0",
24+
"illuminate/support": "~6.0|~7.0|~8.0",
25+
"illuminate/config": "~6.0|~7.0|~8.0",
26+
"illuminate/pagination": "~6.0|~7.0|~8.0"
2727
},
2828
"require-dev": {
29-
"phpunit/phpunit": "~5.4.0",
30-
"mockery/mockery": "^1.3.1"
29+
"phpunit/phpunit": "^8",
30+
"mockery/mockery": "^1.3"
3131
},
3232
"autoload": {
3333
"psr-4": {

tests/MakeEloquentFilterCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ class MakeEloquentFilterCommandTest extends TestCase
99

1010
protected $command;
1111

12-
public function setUp()
12+
public function setUp(): void
1313
{
1414
$this->filesystem = m::mock(Illuminate\Filesystem\Filesystem::class);
1515
$this->command = m::mock('EloquentFilter\Commands\MakeEloquentFilter[argument]', [$this->filesystem]);
1616
}
1717

18-
public function tearDown()
18+
public function tearDown(): void
1919
{
2020
m::close();
2121
}

tests/ModelFilterChildTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ class ModelFilterChildTest extends TestCase
2525
*/
2626
protected $db;
2727

28-
public function setUp()
28+
public function setUp(): void
2929
{
3030
$this->model = new User;
3131
$this->dbSetup();
3232
}
3333

34-
public function tearDown()
34+
public function tearDown(): void
3535
{
3636
m::close();
3737
}

tests/ModelFilterTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ class ModelFilterTest extends TestCase
2727
*/
2828
protected $config;
2929

30-
public function setUp()
30+
public function setUp(): void
3131
{
3232
$this->builder = m::mock(EloquentBuilder::class);
3333
$this->filter = new TestModelFilter($this->builder);
3434
$this->config = require __DIR__.'/config.php';
3535
$this->testInput = $this->config['test_input'];
3636
}
3737

38-
public function tearDown()
38+
public function tearDown(): void
3939
{
4040
m::close();
4141
}
@@ -193,7 +193,7 @@ public function testRelatedMethod()
193193
// Return closure
194194
$relatedClosure = $this->filter->getLocalRelation('testRelation')[0];
195195

196-
$this->assertInternalType('callable', $relatedClosure);
196+
$this->assertIsCallable($relatedClosure);
197197

198198
$query = m::mock(EloquentBuilder::class);
199199

@@ -211,7 +211,7 @@ public function testWhereRelatedMethodWithoutValue()
211211

212212
$relatedClosure = $this->filter->getLocalRelation('fakeRelation')[0];
213213

214-
$this->assertInternalType('callable', $relatedClosure);
214+
$this->assertIsCallable($relatedClosure);
215215

216216
$query = m::mock(EloquentBuilder::class);
217217

@@ -229,7 +229,7 @@ public function testWhereRelatedMethodWithValue()
229229

230230
$relatedClosure = $this->filter->getLocalRelation('fakeRelation')[0];
231231

232-
$this->assertInternalType('callable', $relatedClosure);
232+
$this->assertIsCallable($relatedClosure);
233233

234234
$query = m::mock(EloquentBuilder::class);
235235

0 commit comments

Comments
 (0)