Skip to content

Commit

Permalink
Force EloquentModelSynth and EloquentCollectionSynth sync (#1155)
Browse files Browse the repository at this point in the history
* force EloquentModelSynth and EloquentCollectionSynth sync

* fix phpstan

* wip

* Remove support php 8.3 gc

* wip
  • Loading branch information
luanfreitasdev authored Sep 16, 2023
1 parent 30c38f3 commit 192484f
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

strategy:
matrix:
php: [ 8.3, 8.2, 8.1 ]
php: [ 8.2, 8.1 ]
laravel: [ 10.* ]
dependency-version: [ prefer-stable ]

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"require": {
"php": "^8.1",
"doctrine/dbal": "2.12.1 | ^3.6.6",
"livewire/livewire": "^3.0.2"
"livewire/livewire": "^3.0.5"
},
"require-dev": {
"pestphp/pest": "^2.17.0",
"orchestra/testbench": "^8.10.1",
"composer/composer": "^2.6.2",
"pestphp/pest": "^2.18.2",
"orchestra/testbench": "^8.10.2",
"composer/composer": "^2.6.3",
"laravel/pint": "^1.13.1",
"nunomaduro/larastan": "^2.6.4",
"laradumps/laradumps-core": "^0.3.0",
Expand Down
91 changes: 46 additions & 45 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/PowerGridComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public function mount(): void

$this->throwFeatureDetail();
$this->throwColumnAction();
$this->throwInjectMorphMarkers();

$this->columns = $this->columns();

Expand Down Expand Up @@ -118,7 +119,10 @@ private function throwFeatureDetail(): void
) {
throw new Exception('The Feature Responsive cannot be used with Detail');
}
}

private function throwInjectMorphMarkers(): void
{
if (
array_key_exists('detail', $this->setUp)
&& config('livewire.inject_morph_markers') === true
Expand Down
5 changes: 5 additions & 0 deletions src/Providers/PowerGridServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
use Livewire\Features\SupportLegacyModels\{EloquentCollectionSynth, EloquentModelSynth};
use Livewire\Livewire;
use PowerComponents\LivewirePowerGrid\Commands\{CreateCommand, PublishCommand, UpdateCommand};
use PowerComponents\LivewirePowerGrid\Components\Actions\Macros;
use PowerComponents\LivewirePowerGrid\Components\Filters\FilterManager;
Expand All @@ -27,6 +29,9 @@ public function boot(): void
$this->publishViews();
$this->publishConfigs();
$this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', $this->packageName);

Livewire::propertySynthesizer(EloquentModelSynth::class);
Livewire::propertySynthesizer(EloquentCollectionSynth::class);
}

public function register(): void
Expand Down

0 comments on commit 192484f

Please sign in to comment.