Skip to content
Merged
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
8 changes: 6 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,19 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.3, 8.2, 8.1]
laravel: [11.*, 10.*]
php: [8.4, 8.3, 8.2, 8.1]
laravel: [12.*, 11.*, 10.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 12.*
testbench: 10.*
- laravel: 11.*
testbench: 9.*
- laravel: 10.*
testbench: 8.*
exclude:
- laravel: 12.*
php: 8.1
- laravel: 11.*
php: 8.1

Expand Down
15 changes: 5 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,15 @@
],
"require": {
"php": "^8.1",
"illuminate/database": "^10.0|^11.0",
"illuminate/support": "^10.0|^11.0",
"illuminate/database": "^10.0|^11.0|^12.0",
"illuminate/support": "^10.0|^11.0|^12.0",
"spatie/laravel-package-tools": "^1.14.1"
},
"require-dev": {
"larastan/larastan": "^2.9",
"larastan/larastan": "^2.9|^3.3",
"laravel/pint": "^1.14",
"orchestra/testbench": "^8.0|^9.0",
"pestphp/pest": "^2.34",
"pestphp/pest-plugin-arch": "^2.7",
"pestphp/pest-plugin-laravel": "^2.3",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-phpunit": "^1.3"
"orchestra/testbench": "^8.0|^9.0|^10.0",
"pestphp/pest": "^2.34|^3.7"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 0 additions & 3 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ parameters:
- config
- database
tmpDir: build/phpstan
checkOctaneCompatibility: true
checkModelProperties: true
checkMissingIterableValueType: false
2 changes: 1 addition & 1 deletion src/SearchBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ protected function initializeFromBuilder(Builder $builder): void
return $builder->{$property};
});

/* @phpstan-ignore-next-line */
/* @phpstan-ignore-next-line */
$this->scopes = $builder->getProtected('scopes');
/* @phpstan-ignore-next-line */
$this->localMacros = $builder->getProtected('localMacros');
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ public function getEnvironmentSetUp($app)
]);

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

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

public function createUser(array $attrs = [])
Expand Down
8 changes: 6 additions & 2 deletions tests/Utils/AttributeUtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@
$attributeName = 'description';
$jsonKey = '*';

app('db.connection')->setQueryGrammar(new PostgresGrammar);
$connection = app('db.connection');
$postgresGrammar = new PostgresGrammar($connection);
$connection->setQueryGrammar($postgresGrammar);

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

Expand All @@ -113,7 +115,9 @@
$attributeName = 'description';
$jsonKey = 'en';

app('db.connection')->setQueryGrammar(new PostgresGrammar);
$connection = app('db.connection');
$postgresGrammar = new PostgresGrammar($connection);
$connection->setQueryGrammar($postgresGrammar);

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

Expand Down
Loading