Skip to content

Commit 0f6fb91

Browse files
committed
chore: 🤖 Drop support for stale versions
1 parent c37a0f3 commit 0f6fb91

File tree

6 files changed

+29
-44
lines changed

6 files changed

+29
-44
lines changed

‎.github/workflows/test.yml‎

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,18 @@ jobs:
88

99
strategy:
1010
matrix:
11-
php: [7.3, 7.4, '8.0', 8.1]
11+
php: ['8.0', 8.1, 8.2]
1212
lib:
13+
- { laravel: ^11.0 }
1314
- { laravel: ^10.0 }
1415
- { laravel: ^9.0 }
15-
- { laravel: ^8.0 }
16-
- { laravel: ^7.0 }
17-
- { laravel: ^6.0 }
18-
- { laravel: ^6.0, flags: --prefer-lowest }
1916
exclude:
20-
- { php: 8.1, lib: { laravel: ^7.0 } }
21-
- { php: 8.1, lib: { laravel: ^6.0 } }
22-
- { php: 8.1, lib: { laravel: ^6.0, flags: --prefer-lowest } }
2317
- { php: 8.0, lib: { laravel: ^10.0 } }
24-
- { php: 7.4, lib: { laravel: ^10.0 } }
25-
- { php: 7.4, lib: { laravel: ^9.0 } }
26-
- { php: 7.3, lib: { laravel: ^10.0 } }
27-
- { php: 7.3, lib: { laravel: ^9.0 } }
18+
- { php: 8.0, lib: { laravel: ^11.0 } }
19+
- { php: 8.1, lib: { laravel: ^11.0 } }
2820

2921
steps:
30-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v3
3123

3224
- name: Setup PHP
3325
uses: shivammathur/setup-php@v2
@@ -37,7 +29,7 @@ jobs:
3729

3830
- name: Adjust package versions
3931
run: |
40-
composer require "laravel/framework:${{ matrix.lib.laravel }}" --dev ${{ matrix.lib.flags }}
32+
composer require "laravel/framework:${{ matrix.lib.laravel }}" --dev
4133
4234
- run: mkdir -p build/logs
4335
- run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml

‎.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
composer.lock
2+
/.idea/
23
/vendor/
34
/build/logs/
45
.php_cs.cache
5-
.phpunit.result.cache
6+
/.phpunit.cache/

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Rapid pagination without using OFFSET
2222

2323
## Requirements
2424

25-
- PHP: `^7.3 || ^8.0`
26-
- Laravel: `^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0`
25+
- PHP: `^8.0`
26+
- Laravel: `^9.0 || ^10.0 || ^11.0`
2727
- [lampager/lampager](https://github.com/lampager/lampager): `^0.4`
2828

2929
## Installing

‎composer.json‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
}
2222
},
2323
"require": {
24-
"php": "^7.3 || ^8.0",
24+
"php": "^8.0",
2525
"ext-json": "*",
2626
"lampager/lampager": "^0.4",
27-
"illuminate/contracts": "^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0",
28-
"illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0",
29-
"illuminate/database": "^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0"
27+
"illuminate/contracts": "^9.0 || ^10.0 || ^11.0",
28+
"illuminate/support": "^9.0 || ^10.0 || ^11.0",
29+
"illuminate/database": "^9.0 || ^10.0 || ^11.0"
3030
},
3131
"require-dev": {
3232
"orchestra/testbench": "*",
33-
"orchestra/testbench-core": "^4.9 || ^5.9 || >=6.6",
33+
"orchestra/testbench-core": ">=7.0",
3434
"phpunit/phpunit": ">=9.5",
3535
"nilportugues/sql-query-formatter": "^1.2.2"
3636
},

‎phpunit.xml‎

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
bootstrap="vendor/autoload.php"
4-
backupStaticAttributes="false"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false"
11-
>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
3+
<coverage>
4+
<include>
5+
<directory suffix=".php">src</directory>
6+
</include>
7+
</coverage>
128
<testsuites>
139
<testsuite name="Package Test Suite">
1410
<directory suffix="Test.php">./tests/</directory>
1511
</testsuite>
1612
</testsuites>
17-
<filter>
18-
<whitelist processUncoveredFilesFromWhitelist="true">
19-
<directory suffix=".php">src</directory>
20-
</whitelist>
21-
</filter>
2213
</phpunit>

‎tests/ResourceTest.php‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Lampager\Laravel\Tests;
44

5+
use Illuminate\Http\Request;
56
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
67
use Illuminate\Support\Arr;
78

@@ -111,11 +112,11 @@ public function testStructuredArrayOutput()
111112
$this->assertResultSame($expected, (new StructuredPostResourceCollection($standardPagination))->resolve());
112113

113114
$this->assertResultSame($expected, (new StructuredPostResourceCollection($records))
114-
->toResponse(null)->getData()
115+
->toResponse(Request::create('/'))->getData()
115116
);
116117
$this->assertResultSame($expected, (new PostResourceCollection($records))
117118
->additional(['post_resource_collection' => true])
118-
->toResponse(null)->getData()
119+
->toResponse(Request::create('/'))->getData()
119120
);
120121
}
121122

@@ -154,11 +155,11 @@ public function testLampagerPaginationOutput()
154155
$pagination = $this->getLampagerPagination();
155156

156157
$this->assertResultSame($expected1, (new StructuredPostResourceCollection($pagination))
157-
->toResponse(null)->getData()
158+
->toResponse(Request::create('/'))->getData()
158159
);
159160
$this->assertResultSame($expected2, (new PostResourceCollection($pagination))
160161
->additional(['post_resource_collection' => true])
161-
->toResponse(null)->getData()
162+
->toResponse(Request::create('/'))->getData()
162163
);
163164
}
164165

@@ -206,11 +207,11 @@ public function testStandardPaginationOutput()
206207
$pagination = $this->getStandardPagination();
207208

208209
$this->assertResultSame($expected1, (new StructuredPostResourceCollection($pagination))
209-
->toResponse(null)->getData()
210+
->toResponse(Request::create('/'))->getData()
210211
);
211212
$this->assertResultSame($expected2, (new PostResourceCollection($pagination))
212213
->additional(['post_resource_collection' => true])
213-
->toResponse(null)->getData()
214+
->toResponse(Request::create('/'))->getData()
214215
);
215216
}
216217

@@ -256,6 +257,6 @@ public function testAnonymousResourceCollection()
256257
'has_next' => true,
257258
'next_cursor' => ['updated_at' => '2017-01-01 11:00:00', 'id' => 4],
258259
];
259-
$this->assertResultSame($expected, $collection->toResponse(null)->getData());
260+
$this->assertResultSame($expected, $collection->toResponse(Request::create('/'))->getData());
260261
}
261262
}

0 commit comments

Comments
 (0)