From 16731d91fc725823452b6ea6c001942739d0839b Mon Sep 17 00:00:00 2001 From: Jonas Staudenmeir Date: Sat, 9 Mar 2024 10:59:19 +0100 Subject: [PATCH] Support Laravel 11 --- .github/workflows/static-analysis.yml | 2 +- composer.json | 1 + tests/Concatenation/ConcatenationTest.php | 4 ---- tests/Models/Employee.php | 2 +- tests/Models/Task.php | 2 +- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index f56b7b2..56f2939 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -1,6 +1,6 @@ name: Static Analysis -on: workflow_dispatch # TODO[L11] [ push, pull_request ] +on: [ push, pull_request ] jobs: phpstan: diff --git a/composer.json b/composer.json index 542e12f..3cdfe3c 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ "staudenmeir/eloquent-has-many-deep-contracts": "^1.2" }, "require-dev": { + "awobaz/compoships": "^2.3", "barryvdh/laravel-ide-helper": "^3.0", "illuminate/pagination": "^11.0", "korridor/laravel-has-many-merged": "^1.1", diff --git a/tests/Concatenation/ConcatenationTest.php b/tests/Concatenation/ConcatenationTest.php index 41037dd..9a16333 100644 --- a/tests/Concatenation/ConcatenationTest.php +++ b/tests/Concatenation/ConcatenationTest.php @@ -124,8 +124,6 @@ public function testWithTrashedIntermediateDeepModel() public function testLeadingCompositeKey() { - $this->markTestSkipped(); // TODO[L11] - $projects = Employee::find(131)->projectsFromRelations; $this->assertEquals([101, 102], $projects->pluck('id')->all()); @@ -133,8 +131,6 @@ public function testLeadingCompositeKey() public function testIntermediateCompositeKey() { - $this->markTestSkipped(); // TODO[L11] - $employees = Project::find(101)->employeesFromRelations; $this->assertEquals([131, 132], $employees->pluck('id')->all()); diff --git a/tests/Models/Employee.php b/tests/Models/Employee.php index cb85c30..669a014 100644 --- a/tests/Models/Employee.php +++ b/tests/Models/Employee.php @@ -10,7 +10,7 @@ class Employee extends Model { - // TODO[L11] use Compoships; + use Compoships; use HasRelationships; public function projects(): HasManyDeep diff --git a/tests/Models/Task.php b/tests/Models/Task.php index 199d50d..6ea85a7 100644 --- a/tests/Models/Task.php +++ b/tests/Models/Task.php @@ -8,7 +8,7 @@ class Task extends Model { - // TODO[L11] use Compoships; + use Compoships; public function employee(): ComposhipsBelongsTo {