Skip to content

Commit 27b25cb

Browse files
committed
Support Laravel 10
1 parent bc91766 commit 27b25cb

File tree

4 files changed

+14
-25
lines changed

4 files changed

+14
-25
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
strategy:
1010
matrix:
11-
php: [8.2, 8.1, 8.0]
11+
php: [8.2, 8.1]
1212
database: [mysql, pgsql, sqlite, sqlsrv]
1313
release: [stable, lowest]
1414
include:

.scrutinizer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
build:
22
environment:
3-
php: 8.1
3+
php: 8.2
44
tools:
55
external_code_coverage:
66
runs: 4

composer.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@
99
}
1010
],
1111
"require": {
12-
"php": "^8.0.2",
13-
"illuminate/database": "^9.0",
14-
"staudenmeir/eloquent-has-many-deep-contracts": "^1.0"
12+
"php": "^8.1",
13+
"illuminate/database": "^10.0",
14+
"staudenmeir/eloquent-has-many-deep-contracts": "^1.1"
1515
},
1616
"require-dev": {
17-
"phpunit/phpunit": "^9.5",
18-
"nesbot/carbon": "^2.62.1",
19-
"staudenmeir/eloquent-has-many-deep": "^1.17"
17+
"phpunit/phpunit": "^9.5.27",
18+
"staudenmeir/eloquent-has-many-deep": "^1.18"
2019
},
2120
"autoload": {
2221
"psr-4": {
@@ -28,6 +27,11 @@
2827
"Tests\\": "tests/"
2928
}
3029
},
30+
"extra": {
31+
"branch-alias": {
32+
"dev-master": "1.8.x-dev"
33+
}
34+
},
3135
"minimum-stability": "dev",
3236
"prefer-stable": true
3337
}

tests/BelongsToJsonTest.php

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

33
namespace Tests;
44

5-
use Composer\InstalledVersions;
65
use Illuminate\Database\Capsule\Manager as DB;
76
use Illuminate\Database\Eloquent\Builder;
87
use Illuminate\Database\Eloquent\Collection;
@@ -151,11 +150,6 @@ public function testExistenceQueryForSelfRelationWithObjects()
151150
*/
152151
public function testAttach(string $userModel)
153152
{
154-
// TODO[L10]
155-
if (version_compare(InstalledVersions::getVersion('illuminate/database'), '9.18') === -1) {
156-
$this->markTestSkipped();
157-
}
158-
159153
$user = (new $userModel())->roles()->attach([1, 2]);
160154

161155
$this->assertEquals([1, 2], $user->roles()->pluck('id')->all());
@@ -170,11 +164,6 @@ public function testAttach(string $userModel)
170164
*/
171165
public function testAttachWithObjects(string $userModel)
172166
{
173-
// TODO[L10]
174-
if (version_compare(InstalledVersions::getVersion('illuminate/database'), '9.18') === -1) {
175-
$this->markTestSkipped();
176-
}
177-
178167
$user = new $userModel();
179168
$user->options = [
180169
'roles' => [
@@ -290,14 +279,10 @@ public function userModelProvider(): array
290279
$users = [
291280
[User::class],
292281
[UserAsArrayable::class],
282+
[UserAsArrayObject::class],
283+
[UserAsCollection::class],
293284
];
294285

295-
// TODO[L10]
296-
if (class_exists('Illuminate\Database\Eloquent\Casts\AsArrayObject')) {
297-
$users[] = [UserAsArrayObject::class];
298-
$users[] = [UserAsCollection::class];
299-
}
300-
301286
return $users;
302287
}
303288
}

0 commit comments

Comments
 (0)