Skip to content

Commit 596f87b

Browse files
authored
Merge pull request #8 from netsells/chore/laravel-11-support
Laravel 11 support
2 parents 6e083d3 + 846bef5 commit 596f87b

File tree

6 files changed

+18
-19
lines changed

6 files changed

+18
-19
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ jobs:
66
test:
77
runs-on: ubuntu-latest
88

9-
# we want to run it on supported combination of Laravel and PHP versions
109
strategy:
1110
fail-fast: false
1211
matrix:
13-
php: ['8.1', '8.2']
14-
laravel: ['^9.0', '^10.0']
12+
php: [ '8.2', '8.3' ]
13+
laravel: [ '^11.0' ]
1514

1615
steps:
1716
- name: Checkout the repo

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
}
2121
],
2222
"require": {
23-
"php": "^8.1 || ^8.2",
23+
"php": "^8.2",
2424
"ext-json": "*",
25-
"laravel/framework": "^9.0 || ^10.0"
25+
"laravel/framework": "^11.0"
2626
},
2727
"require-dev": {
28-
"orchestra/testbench": "^7.0 || ^8.0",
28+
"orchestra/testbench": "^9.0",
2929
"tmarsteel/mockery-callable-mock": "~2.1",
3030
"netsells/code-standards-laravel": "^1.1"
3131
},

tests/Integration/OptimalNumberOfQueriesTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static function resourceProvider(): array
2323
/**
2424
* @dataProvider resourceProvider
2525
*/
26-
public function testCreatesAsManyQueriesAsEagerLoadingResourceCollection(string $basicClass, string $superClass)
26+
public function test_creates_as_many_queries_as_eager_loading_resource_collection(string $basicClass, string $superClass)
2727
{
2828
$this->fullLibraryFactory()->create();
2929

@@ -55,7 +55,7 @@ public function testCreatesAsManyQueriesAsEagerLoadingResourceCollection(string
5555
/**
5656
* @dataProvider resourceProvider
5757
*/
58-
public function testCreatesAsManyQueriesAsLazyEagerLoadingResourceCollection(string $basicClass, string $superClass)
58+
public function test_creates_as_many_queries_as_lazy_eager_loading_resource_collection(string $basicClass, string $superClass)
5959
{
6060
$this->fullLibraryFactory()->create();
6161

@@ -81,7 +81,7 @@ public function testCreatesAsManyQueriesAsLazyEagerLoadingResourceCollection(str
8181
/**
8282
* @dataProvider resourceProvider
8383
*/
84-
public function testCreatesAsManyQueriesAsEagerLoadingResource(string $basicClass, string $superClass)
84+
public function test_creates_as_many_queries_as_eager_loading_resource(string $basicClass, string $superClass)
8585
{
8686
$this->fullLibraryFactory()->create();
8787

@@ -113,7 +113,7 @@ public function testCreatesAsManyQueriesAsEagerLoadingResource(string $basicClas
113113
/**
114114
* @dataProvider resourceProvider
115115
*/
116-
public function testCreatesAsManyQueriesAsLazyEagerLoadingResource(string $basicClass, string $superClass)
116+
public function test_creates_as_many_queries_as_lazy_eager_loading_resource(string $basicClass, string $superClass)
117117
{
118118
$this->fullLibraryFactory()->create();
119119

tests/Integration/PreloadModeTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class PreloadModeTest extends TestCase
1010
{
11-
public function testPreloadLoadsSingleRelationOnResource()
11+
public function test_preload_loads_single_relation_on_resource()
1212
{
1313
/** @var Book $book */
1414
$book = Book::factory()->forAuthor()->create()->fresh();
@@ -18,7 +18,7 @@ public function testPreloadLoadsSingleRelationOnResource()
1818
$this->assertTrue($book->relationLoaded('author'));
1919
}
2020

21-
public function testPreloadLoadsMultipleRelationsOnResource()
21+
public function test_preload_loads_multiple_relations_on_resource()
2222
{
2323
/** @var Book $book */
2424
$book = Book::factory()->forAuthor()->create()->fresh();
@@ -29,7 +29,7 @@ public function testPreloadLoadsMultipleRelationsOnResource()
2929
$this->assertTrue($book->relationLoaded('genres'));
3030
}
3131

32-
public function testPreloadLoadsSingleRelationOnResourceCollection()
32+
public function test_preload_loads_single_relation_on_resource_collection()
3333
{
3434
/** @var Book[] $books */
3535
$books = Book::factory()->count(3)->forAuthor()->create()->fresh();
@@ -41,7 +41,7 @@ public function testPreloadLoadsSingleRelationOnResourceCollection()
4141
}
4242
}
4343

44-
public function testPreloadLoadsMultipleRelationsOnResourceCollection()
44+
public function test_preload_loads_multiple_relations_on_resource_collection()
4545
{
4646
/** @var Book[] $books */
4747
$books = Book::factory()->count(3)->forAuthor()->create()->fresh();

tests/Integration/ResourceTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ abstract class ResourceTestCase extends TestCase
1616
/**
1717
* @dataProvider resourceProvider
1818
*/
19-
public function testSuperReducesQueriesOverBasicResourceAndBothMatch(string $basicClass, string $superClass)
19+
public function test_super_reduces_queries_over_basic_resource_and_both_match(string $basicClass, string $superClass)
2020
{
2121
/** @var Model $model */
2222
$model = $this->produce(1)->fresh();
@@ -35,7 +35,7 @@ public function testSuperReducesQueriesOverBasicResourceAndBothMatch(string $bas
3535
/**
3636
* @dataProvider resourceProvider
3737
*/
38-
public function testSuperReducesQueriesOverBasicResourceCollectionAndBothMatch(string $basicClass, string $superClass)
38+
public function test_super_reduces_queries_over_basic_resource_collection_and_both_match(string $basicClass, string $superClass)
3939
{
4040
/** @var Collection $models */
4141
$models = $this->produce($this->collectionSize)->fresh();

tests/Integration/UseModeTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class UseModeTest extends TestCase
1313
{
14-
public function testUseLoadsAndProvidesSingleRelation()
14+
public function test_use_loads_and_provides_single_relation()
1515
{
1616
/** @var Book $book */
1717
$book = Book::factory()->forAuthor()->create()->fresh();
@@ -25,7 +25,7 @@ public function testUseLoadsAndProvidesSingleRelation()
2525
->response();
2626
}
2727

28-
public function testUseLoadsAndProvidesMultipleRelations()
28+
public function test_use_loads_and_provides_multiple_relations()
2929
{
3030
/** @var Book $book */
3131
$book = Book::factory()->forAuthor()->create()->fresh();
@@ -40,7 +40,7 @@ public function testUseLoadsAndProvidesMultipleRelations()
4040
->response();
4141
}
4242

43-
public function testUseSkipsMissingValue()
43+
public function test_use_skips_missing_value()
4444
{
4545
/** @var Book $book */
4646
$book = Book::factory()->forAuthor()->create()->fresh();

0 commit comments

Comments
 (0)