Skip to content

Commit

Permalink
Make laravel stable
Browse files Browse the repository at this point in the history
  • Loading branch information
luanfreitasdev committed Mar 13, 2024
1 parent f576f83 commit 650c034
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ jobs:
exclude:
- php: 8.1
laravel: 11.*
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*
dependency-version: [ prefer-stable ]

name: PHP:${{ matrix.php }} / L:${{ matrix.laravel }}
Expand Down Expand Up @@ -54,7 +59,7 @@ jobs:

- name: Install Composer dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer install
- name: Install openspout/openspout
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "PowerGrid generates Advanced Datatables using Laravel Livewire.",
"homepage": "https://github.com/power-components/livewire-powergrid",
"license": "MIT",
"minimum-stability": "dev",
"minimum-stability": "stable",
"prefer-stable": true,
"authors": [
{
Expand Down
7 changes: 2 additions & 5 deletions src/DataSource/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,8 @@ public function filterContains(): Builder
$search = strtolower($search);

$this->query = $this->query->where(function (EloquentBuilder|QueryBuilder $query) use ($search) {
if ($query instanceof QueryBuilder) {
$modelTable = $query->from;
} else {
$modelTable = $query->getModel()->getTable();
}
/** @var string $modelTable */
$modelTable = $query instanceof QueryBuilder ? $query->from : $query->getModel()->getTable();

$columnList = $this->getColumnList($modelTable);

Expand Down
4 changes: 3 additions & 1 deletion src/ProcessDataSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ private static function processBatch(BaseCollection $collection, PowerGridCompon
protected function setCurrentTable(EloquentBuilder|array|BaseCollection|MorphToMany|Collection|QueryBuilder|null $datasource): void
{
if ($datasource instanceof QueryBuilder) {
$this->component->currentTable = $datasource->from;
/** @var string $from */
$from = $datasource->from;
$this->component->currentTable = $from;

return;
}
Expand Down

0 comments on commit 650c034

Please sign in to comment.