Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 11 support #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ jobs:
test:
runs-on: ubuntu-latest

# we want to run it on supported combination of Laravel and PHP versions
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2']
laravel: ['^9.0', '^10.0']
php: [ '8.2', '8.3' ]
laravel: [ '^11.0' ]

steps:
- name: Checkout the repo
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
}
],
"require": {
"php": "^8.1 || ^8.2",
"php": "^8.2",
"ext-json": "*",
"laravel/framework": "^9.0 || ^10.0"
"laravel/framework": "^11.0"
},
"require-dev": {
"orchestra/testbench": "^7.0 || ^8.0",
"orchestra/testbench": "^9.0",
"tmarsteel/mockery-callable-mock": "~2.1",
"netsells/code-standards-laravel": "^1.1"
},
Expand Down
8 changes: 4 additions & 4 deletions tests/Integration/OptimalNumberOfQueriesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static function resourceProvider(): array
/**
* @dataProvider resourceProvider
*/
public function testCreatesAsManyQueriesAsEagerLoadingResourceCollection(string $basicClass, string $superClass)
public function test_creates_as_many_queries_as_eager_loading_resource_collection(string $basicClass, string $superClass)
{
$this->fullLibraryFactory()->create();

Expand Down Expand Up @@ -55,7 +55,7 @@ public function testCreatesAsManyQueriesAsEagerLoadingResourceCollection(string
/**
* @dataProvider resourceProvider
*/
public function testCreatesAsManyQueriesAsLazyEagerLoadingResourceCollection(string $basicClass, string $superClass)
public function test_creates_as_many_queries_as_lazy_eager_loading_resource_collection(string $basicClass, string $superClass)
{
$this->fullLibraryFactory()->create();

Expand All @@ -81,7 +81,7 @@ public function testCreatesAsManyQueriesAsLazyEagerLoadingResourceCollection(str
/**
* @dataProvider resourceProvider
*/
public function testCreatesAsManyQueriesAsEagerLoadingResource(string $basicClass, string $superClass)
public function test_creates_as_many_queries_as_eager_loading_resource(string $basicClass, string $superClass)
{
$this->fullLibraryFactory()->create();

Expand Down Expand Up @@ -113,7 +113,7 @@ public function testCreatesAsManyQueriesAsEagerLoadingResource(string $basicClas
/**
* @dataProvider resourceProvider
*/
public function testCreatesAsManyQueriesAsLazyEagerLoadingResource(string $basicClass, string $superClass)
public function test_creates_as_many_queries_as_lazy_eager_loading_resource(string $basicClass, string $superClass)
{
$this->fullLibraryFactory()->create();

Expand Down
8 changes: 4 additions & 4 deletions tests/Integration/PreloadModeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class PreloadModeTest extends TestCase
{
public function testPreloadLoadsSingleRelationOnResource()
public function test_preload_loads_single_relation_on_resource()
{
/** @var Book $book */
$book = Book::factory()->forAuthor()->create()->fresh();
Expand All @@ -18,7 +18,7 @@ public function testPreloadLoadsSingleRelationOnResource()
$this->assertTrue($book->relationLoaded('author'));
}

public function testPreloadLoadsMultipleRelationsOnResource()
public function test_preload_loads_multiple_relations_on_resource()
{
/** @var Book $book */
$book = Book::factory()->forAuthor()->create()->fresh();
Expand All @@ -29,7 +29,7 @@ public function testPreloadLoadsMultipleRelationsOnResource()
$this->assertTrue($book->relationLoaded('genres'));
}

public function testPreloadLoadsSingleRelationOnResourceCollection()
public function test_preload_loads_single_relation_on_resource_collection()
{
/** @var Book[] $books */
$books = Book::factory()->count(3)->forAuthor()->create()->fresh();
Expand All @@ -41,7 +41,7 @@ public function testPreloadLoadsSingleRelationOnResourceCollection()
}
}

public function testPreloadLoadsMultipleRelationsOnResourceCollection()
public function test_preload_loads_multiple_relations_on_resource_collection()
{
/** @var Book[] $books */
$books = Book::factory()->count(3)->forAuthor()->create()->fresh();
Expand Down
4 changes: 2 additions & 2 deletions tests/Integration/ResourceTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ abstract class ResourceTestCase extends TestCase
/**
* @dataProvider resourceProvider
*/
public function testSuperReducesQueriesOverBasicResourceAndBothMatch(string $basicClass, string $superClass)
public function test_super_reduces_queries_over_basic_resource_and_both_match(string $basicClass, string $superClass)
{
/** @var Model $model */
$model = $this->produce(1)->fresh();
Expand All @@ -35,7 +35,7 @@ public function testSuperReducesQueriesOverBasicResourceAndBothMatch(string $bas
/**
* @dataProvider resourceProvider
*/
public function testSuperReducesQueriesOverBasicResourceCollectionAndBothMatch(string $basicClass, string $superClass)
public function test_super_reduces_queries_over_basic_resource_collection_and_both_match(string $basicClass, string $superClass)
{
/** @var Collection $models */
$models = $this->produce($this->collectionSize)->fresh();
Expand Down
6 changes: 3 additions & 3 deletions tests/Integration/UseModeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class UseModeTest extends TestCase
{
public function testUseLoadsAndProvidesSingleRelation()
public function test_use_loads_and_provides_single_relation()
{
/** @var Book $book */
$book = Book::factory()->forAuthor()->create()->fresh();
Expand All @@ -25,7 +25,7 @@ public function testUseLoadsAndProvidesSingleRelation()
->response();
}

public function testUseLoadsAndProvidesMultipleRelations()
public function test_use_loads_and_provides_multiple_relations()
{
/** @var Book $book */
$book = Book::factory()->forAuthor()->create()->fresh();
Expand All @@ -40,7 +40,7 @@ public function testUseLoadsAndProvidesMultipleRelations()
->response();
}

public function testUseSkipsMissingValue()
public function test_use_skips_missing_value()
{
/** @var Book $book */
$book = Book::factory()->forAuthor()->create()->fresh();
Expand Down
Loading