Skip to content

Commit ac89f5e

Browse files
add laravel 12 support (#37)
1 parent 14bf889 commit ac89f5e

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

.github/workflows/run-tests.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,19 @@ jobs:
1313
fail-fast: true
1414
matrix:
1515
os: [ubuntu-latest, windows-latest]
16-
php: [8.3, 8.2, 8.1]
17-
laravel: [11.*, 10.*]
16+
php: [8.4, 8.3, 8.2, 8.1]
17+
laravel: [12.*, 11.*, 10.*]
1818
stability: [prefer-lowest, prefer-stable]
1919
include:
20+
- laravel: 12.*
21+
testbench: 10.*
2022
- laravel: 11.*
2123
testbench: 9.*
2224
- laravel: 10.*
2325
testbench: 8.*
2426
exclude:
27+
- laravel: 12.*
28+
php: 8.1
2529
- laravel: 11.*
2630
php: 8.1
2731

composer.json

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,15 @@
1717
],
1818
"require": {
1919
"php": "^8.1",
20-
"illuminate/database": "^10.0|^11.0",
21-
"illuminate/support": "^10.0|^11.0",
20+
"illuminate/database": "^10.0|^11.0|^12.0",
21+
"illuminate/support": "^10.0|^11.0|^12.0",
2222
"spatie/laravel-package-tools": "^1.14.1"
2323
},
2424
"require-dev": {
25-
"larastan/larastan": "^2.9",
25+
"larastan/larastan": "^2.9|^3.3",
2626
"laravel/pint": "^1.14",
27-
"orchestra/testbench": "^8.0|^9.0",
28-
"pestphp/pest": "^2.34",
29-
"pestphp/pest-plugin-arch": "^2.7",
30-
"pestphp/pest-plugin-laravel": "^2.3",
31-
"phpstan/extension-installer": "^1.3",
32-
"phpstan/phpstan-deprecation-rules": "^1.1",
33-
"phpstan/phpstan-phpunit": "^1.3"
27+
"orchestra/testbench": "^8.0|^9.0|^10.0",
28+
"pestphp/pest": "^2.34|^3.7"
3429
},
3530
"autoload": {
3631
"psr-4": {

phpstan.neon.dist

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,3 @@ parameters:
88
- config
99
- database
1010
tmpDir: build/phpstan
11-
checkOctaneCompatibility: true
12-
checkModelProperties: true
13-
checkMissingIterableValueType: false

src/SearchBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ protected function initializeFromBuilder(Builder $builder): void
132132
return $builder->{$property};
133133
});
134134

135-
/* @phpstan-ignore-next-line */
135+
/* @phpstan-ignore-next-line */
136136
$this->scopes = $builder->getProtected('scopes');
137137
/* @phpstan-ignore-next-line */
138138
$this->localMacros = $builder->getProtected('localMacros');

tests/TestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ public function getEnvironmentSetUp($app)
3636
]);
3737

3838
include_once __DIR__.'/../database/migrations/create_teams_table.php.stub';
39-
(new \CreateTeamsTable())->up();
39+
(new \CreateTeamsTable)->up();
4040

4141
include_once __DIR__.'/../database/migrations/create_users_table.php.stub';
42-
(new \CreateUsersTable())->up();
42+
(new \CreateUsersTable)->up();
4343
}
4444

4545
public function createUser(array $attrs = [])

tests/Utils/AttributeUtilTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@
101101
$attributeName = 'description';
102102
$jsonKey = '*';
103103

104-
app('db.connection')->setQueryGrammar(new PostgresGrammar);
104+
$connection = app('db.connection');
105+
$postgresGrammar = new PostgresGrammar($connection);
106+
$connection->setQueryGrammar($postgresGrammar);
105107

106108
$result = AttributeUtil::formatJsonOperator($model, $attributeName, $jsonKey);
107109

@@ -113,7 +115,9 @@
113115
$attributeName = 'description';
114116
$jsonKey = 'en';
115117

116-
app('db.connection')->setQueryGrammar(new PostgresGrammar);
118+
$connection = app('db.connection');
119+
$postgresGrammar = new PostgresGrammar($connection);
120+
$connection->setQueryGrammar($postgresGrammar);
117121

118122
$result = AttributeUtil::formatJsonOperator($model, $attributeName, $jsonKey);
119123

0 commit comments

Comments
 (0)