From 3298320b188cb7472bb43f41307d26b011947115 Mon Sep 17 00:00:00 2001 From: bert-w Date: Sun, 12 Apr 2026 22:33:06 +0200 Subject: [PATCH 1/3] Add Livewire v4 support + testcases --- .github/workflows/run-tests.yml | 25 +++++++++++++++---------- composer.json | 8 ++++---- src/LivewireRecaptcha.php | 8 ++++---- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b1c1ac8..590c4df 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -12,18 +12,23 @@ on: jobs: test: - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest timeout-minutes: 5 strategy: fail-fast: false matrix: - os: [ubuntu-latest] - php: [8.3, 8.2] - laravel: [11.*] - stability: [prefer-stable] - testbench: [9.*] - - name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.os }} + php: ['8.2', '8.3', '8.4', '8.5'] + laravel: ['11.*', '12.*', '13.*'] + livewire: ['3.*', '4.*'] + include: + - laravel: '11.*' + testbench: '9.*' + - laravel: '12.*' + testbench: '10.*' + - laravel: '13.*' + testbench: '11.*' + + name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - Livewire ${{ matrix.livewire }} steps: - name: Checkout code @@ -43,8 +48,8 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --${{ matrix.stability }} --prefer-dist --no-interaction + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "livewire/livewire:${{ matrix.livewire }}" --no-interaction --no-update + composer update --prefer-stable --prefer-dist --no-interaction - name: List Installed Dependencies run: composer show -D diff --git a/composer.json b/composer.json index 9aa9f51..019279c 100755 --- a/composer.json +++ b/composer.json @@ -11,13 +11,13 @@ "license": "MIT", "require": { "php": "^8.2", - "livewire/livewire": "^3.0" + "livewire/livewire": "^3.0|^4.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.8", - "larastan/larastan": "^2.9", - "orchestra/testbench": "^9.0", - "phpunit/phpunit": "^11.1" + "larastan/larastan": "^2.9|^3.0", + "orchestra/testbench": "^9.0|^10.0", + "phpunit/phpunit": "^13.0" }, "autoload": { "psr-4": { diff --git a/src/LivewireRecaptcha.php b/src/LivewireRecaptcha.php index de203cc..55d0907 100644 --- a/src/LivewireRecaptcha.php +++ b/src/LivewireRecaptcha.php @@ -15,10 +15,10 @@ class LivewireRecaptcha * @return string */ public static function directive( - string $version = null, - string $siteKey = null, - string $theme = null, - string $size = null, + ?string $version = null, + ?string $siteKey = null, + ?string $theme = null, + ?string $size = null, ): string { $version ??= config('services.google.recaptcha.version') ?? 'v3'; From 0be7ebcbcc0ce14b562789f2c51db5a0264a012c Mon Sep 17 00:00:00 2001 From: bert-w Date: Sun, 12 Apr 2026 22:36:26 +0200 Subject: [PATCH 2/3] use phpunit 11 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 019279c..553fd6e 100755 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "friendsofphp/php-cs-fixer": "^3.8", "larastan/larastan": "^2.9|^3.0", "orchestra/testbench": "^9.0|^10.0", - "phpunit/phpunit": "^13.0" + "phpunit/phpunit": "^11.1" }, "autoload": { "psr-4": { From 4dd79477ea1c2ac5afb3f1870a5d9108f96f4fc6 Mon Sep 17 00:00:00 2001 From: bert-w Date: Sun, 12 Apr 2026 22:40:23 +0200 Subject: [PATCH 3/3] add php8.2 exclusion for laravel 13 --- .github/workflows/run-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 590c4df..02e8c3a 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -20,6 +20,9 @@ jobs: php: ['8.2', '8.3', '8.4', '8.5'] laravel: ['11.*', '12.*', '13.*'] livewire: ['3.*', '4.*'] + exclude: + - laravel: '13.*' + php: '8.2' include: - laravel: '11.*' testbench: '9.*'