Skip to content

Commit 839abdc

Browse files
Skip Livewire tests on Laravel 13 and add Livewire 4 support
Livewire does not yet support Laravel 13. Remove it from composer dependencies in CI for L13 runs and skip the livewire test group. Also add ^4.0 to the livewire version constraint for future support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent eddbeac commit 839abdc

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/workflows/run-tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,14 @@ jobs:
5757
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
5858
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
5959

60+
- name: Remove Livewire
61+
if: startsWith(matrix.laravel, '13.')
62+
run: composer remove livewire/livewire pestphp/pest-plugin-livewire --dev --no-interaction --no-update
63+
6064
- name: Install dependencies
6165
run: |
6266
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
6367
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
6468

6569
- name: Execute tests
66-
run: vendor/bin/pest --enforce-time-limit --fail-on-risky
70+
run: vendor/bin/pest --enforce-time-limit --fail-on-risky ${{ startsWith(matrix.laravel, '13.') && '--exclude-group=livewire' || '' }}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"fakerphp/faker" : "^1.14",
3333
"friendsofphp/php-cs-fixer" : "^3.0",
3434
"inertiajs/inertia-laravel" : "^2.0",
35-
"livewire/livewire" : "^3.0",
35+
"livewire/livewire" : "^3.0|^4.0",
3636
"mockery/mockery" : "^1.6",
3737
"nesbot/carbon" : "^2.63|^3.0",
3838
"orchestra/testbench" : "^8.37.0|^9.16|^10.9|^11.0",

tests/LivewireTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
use Spatie\LaravelData\Tests\Fakes\Livewire\SimpleDataComponent;
1818
use Spatie\LaravelData\Tests\Fakes\SimpleData;
1919

20+
uses()->group('livewire');
21+
2022
it('works with livewire', function () {
2123
$class = new class ('') extends Data {
2224
use WireableData;

0 commit comments

Comments
 (0)