diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index f925af31..33153d71 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -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 ] diff --git a/composer.json b/composer.json index 4fb037b9..19a37156 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/composer.lock b/composer.lock index 7b7ef188..ef729994 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "eedf23b180aa16aa295240fa29af336c", + "content-hash": "92539e6a13aa1c853b014261008c60e6", "packages": [ { "name": "brick/math", @@ -1693,16 +1693,16 @@ }, { "name": "livewire/livewire", - "version": "v3.0.3", + "version": "v3.0.5", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "7fbe81ce113a17bd92687174cd79a4791bd40764" + "reference": "37f11583c61a75d51b2146c2fe38f506ad36014b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/7fbe81ce113a17bd92687174cd79a4791bd40764", - "reference": "7fbe81ce113a17bd92687174cd79a4791bd40764", + "url": "https://api.github.com/repos/livewire/livewire/zipball/37f11583c61a75d51b2146c2fe38f506ad36014b", + "reference": "37f11583c61a75d51b2146c2fe38f506ad36014b", "shasum": "" }, "require": { @@ -1716,6 +1716,7 @@ "require-dev": { "calebporzio/sushi": "^2.1", "laravel/framework": "^10.0", + "laravel/prompts": "^0.1.6", "mockery/mockery": "^1.3.1", "orchestra/testbench": "^7.0|^8.0", "orchestra/testbench-dusk": "^7.0|^8.0", @@ -1754,7 +1755,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v3.0.3" + "source": "https://github.com/livewire/livewire/tree/v3.0.5" }, "funding": [ { @@ -1762,7 +1763,7 @@ "type": "github" } ], - "time": "2023-09-12T15:08:50+00:00" + "time": "2023-09-16T11:51:32+00:00" }, { "name": "monolog/monolog", @@ -5287,16 +5288,16 @@ "packages-dev": [ { "name": "brianium/paratest", - "version": "v7.2.6", + "version": "v7.2.7", "source": { "type": "git", "url": "https://github.com/paratestphp/paratest.git", - "reference": "7f372b5bb59b4271adedc67d3129df29b84c4173" + "reference": "1526eb4fd195f65075456dee394d14742ae0a66c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paratestphp/paratest/zipball/7f372b5bb59b4271adedc67d3129df29b84c4173", - "reference": "7f372b5bb59b4271adedc67d3129df29b84c4173", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/1526eb4fd195f65075456dee394d14742ae0a66c", + "reference": "1526eb4fd195f65075456dee394d14742ae0a66c", "shasum": "" }, "require": { @@ -5366,7 +5367,7 @@ ], "support": { "issues": "https://github.com/paratestphp/paratest/issues", - "source": "https://github.com/paratestphp/paratest/tree/v7.2.6" + "source": "https://github.com/paratestphp/paratest/tree/v7.2.7" }, "funding": [ { @@ -5378,7 +5379,7 @@ "type": "paypal" } ], - "time": "2023-08-29T07:47:39+00:00" + "time": "2023-09-14T14:10:09+00:00" }, { "name": "composer/ca-bundle", @@ -5531,16 +5532,16 @@ }, { "name": "composer/composer", - "version": "2.6.2", + "version": "2.6.3", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "623e5e1de055e65bc6c3c61b8348dc4662d75e2b" + "reference": "ff477832e6d838a736556d4a39a3b80f4412abfd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/623e5e1de055e65bc6c3c61b8348dc4662d75e2b", - "reference": "623e5e1de055e65bc6c3c61b8348dc4662d75e2b", + "url": "https://api.github.com/repos/composer/composer/zipball/ff477832e6d838a736556d4a39a3b80f4412abfd", + "reference": "ff477832e6d838a736556d4a39a3b80f4412abfd", "shasum": "" }, "require": { @@ -5625,7 +5626,7 @@ "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", "security": "https://github.com/composer/composer/security/policy", - "source": "https://github.com/composer/composer/tree/2.6.2" + "source": "https://github.com/composer/composer/tree/2.6.3" }, "funding": [ { @@ -5641,7 +5642,7 @@ "type": "tidelift" } ], - "time": "2023-09-03T12:09:15+00:00" + "time": "2023-09-15T07:38:22+00:00" }, { "name": "composer/metadata-minifier", @@ -7296,16 +7297,16 @@ }, { "name": "orchestra/testbench-core", - "version": "v8.10.1", + "version": "v8.10.2", "source": { "type": "git", "url": "https://github.com/orchestral/testbench-core.git", - "reference": "e8f1a4d3121887e9f5c5607f117701ea7dfa066a" + "reference": "54071af200899a22e849aa4abe8019e8a1d8e826" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/e8f1a4d3121887e9f5c5607f117701ea7dfa066a", - "reference": "e8f1a4d3121887e9f5c5607f117701ea7dfa066a", + "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/54071af200899a22e849aa4abe8019e8a1d8e826", + "reference": "54071af200899a22e849aa4abe8019e8a1d8e826", "shasum": "" }, "require": { @@ -7373,7 +7374,7 @@ "issues": "https://github.com/orchestral/testbench/issues", "source": "https://github.com/orchestral/testbench-core" }, - "time": "2023-09-09T02:26:33+00:00" + "time": "2023-09-14T02:44:47+00:00" }, { "name": "orchestra/workbench", @@ -7440,16 +7441,16 @@ }, { "name": "pestphp/pest", - "version": "v2.18.1", + "version": "v2.18.2", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "74df53c72b0d77a1f66d365ccfe0df704b73aa66" + "reference": "b53e396aac18ceae8cd5f4bb05dcb10f4a63b87d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/74df53c72b0d77a1f66d365ccfe0df704b73aa66", - "reference": "74df53c72b0d77a1f66d365ccfe0df704b73aa66", + "url": "https://api.github.com/repos/pestphp/pest/zipball/b53e396aac18ceae8cd5f4bb05dcb10f4a63b87d", + "reference": "b53e396aac18ceae8cd5f4bb05dcb10f4a63b87d", "shasum": "" }, "require": { @@ -7459,10 +7460,10 @@ "pestphp/pest-plugin": "^2.1.1", "pestphp/pest-plugin-arch": "^2.3.3", "php": "^8.1.0", - "phpunit/phpunit": "^10.3.3" + "phpunit/phpunit": "^10.3.4" }, "conflict": { - "phpunit/phpunit": ">10.3.3", + "phpunit/phpunit": ">10.3.4", "webmozart/assert": "<1.11.0" }, "require-dev": { @@ -7526,7 +7527,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v2.18.1" + "source": "https://github.com/pestphp/pest/tree/v2.18.2" }, "funding": [ { @@ -7538,7 +7539,7 @@ "type": "github" } ], - "time": "2023-09-11T10:38:47+00:00" + "time": "2023-09-13T22:14:31+00:00" }, { "name": "pestphp/pest-plugin", @@ -7955,16 +7956,16 @@ }, { "name": "phpmyadmin/sql-parser", - "version": "5.8.0", + "version": "5.8.1", "source": { "type": "git", "url": "https://github.com/phpmyadmin/sql-parser.git", - "reference": "db1b3069b5dbc220d393d67ff911e0ae76732755" + "reference": "b877ee6262a00f0f498da5e01335e8a5dc01d203" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/db1b3069b5dbc220d393d67ff911e0ae76732755", - "reference": "db1b3069b5dbc220d393d67ff911e0ae76732755", + "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/b877ee6262a00f0f498da5e01335e8a5dc01d203", + "reference": "b877ee6262a00f0f498da5e01335e8a5dc01d203", "shasum": "" }, "require": { @@ -7986,7 +7987,7 @@ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", "psalm/plugin-phpunit": "^0.16.1", "vimeo/psalm": "^4.11", - "zumba/json-serializer": "^3.0" + "zumba/json-serializer": "~3.0.2" }, "suggest": { "ext-mbstring": "For best performance", @@ -8038,7 +8039,7 @@ "type": "other" } ], - "time": "2023-06-05T18:19:38+00:00" + "time": "2023-09-15T18:21:22+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -8472,16 +8473,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.3.3", + "version": "10.3.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "241ed4dd0db1c096984e62d414c4e1ac8d5dbff4" + "reference": "b8d59476f19115c9774b3b447f78131781c6c32b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/241ed4dd0db1c096984e62d414c4e1ac8d5dbff4", - "reference": "241ed4dd0db1c096984e62d414c4e1ac8d5dbff4", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b8d59476f19115c9774b3b447f78131781c6c32b", + "reference": "b8d59476f19115c9774b3b447f78131781c6c32b", "shasum": "" }, "require": { @@ -8495,7 +8496,7 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=8.1", - "phpunit/php-code-coverage": "^10.1.1", + "phpunit/php-code-coverage": "^10.1.5", "phpunit/php-file-iterator": "^4.0", "phpunit/php-invoker": "^4.0", "phpunit/php-text-template": "^3.0", @@ -8553,7 +8554,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.3.3" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.3.4" }, "funding": [ { @@ -8569,7 +8570,7 @@ "type": "tidelift" } ], - "time": "2023-09-05T04:34:51+00:00" + "time": "2023-09-12T14:42:28+00:00" }, { "name": "pimple/pimple", diff --git a/src/PowerGridComponent.php b/src/PowerGridComponent.php index 0e9b4ff9..76abf884 100644 --- a/src/PowerGridComponent.php +++ b/src/PowerGridComponent.php @@ -91,6 +91,7 @@ public function mount(): void $this->throwFeatureDetail(); $this->throwColumnAction(); + $this->throwInjectMorphMarkers(); $this->columns = $this->columns(); @@ -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 diff --git a/src/Providers/PowerGridServiceProvider.php b/src/Providers/PowerGridServiceProvider.php index e09ee35c..6969d0dd 100644 --- a/src/Providers/PowerGridServiceProvider.php +++ b/src/Providers/PowerGridServiceProvider.php @@ -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; @@ -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