From a7c0a663bbe7711e7a00b53d32039c29ae72fc2d Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Wed, 18 Oct 2023 17:33:59 +0100 Subject: [PATCH 01/13] Adds L11 support --- composer.json | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 5e3d0120..be1aa318 100644 --- a/composer.json +++ b/composer.json @@ -21,18 +21,18 @@ "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "illuminate/support": "^10.0", + "illuminate/support": "^10.0|^11.0", "spatie/flare-client-php": "^1.3.5", "spatie/ignition": "^1.9", - "symfony/console": "^6.2.3", - "symfony/var-dumper": "^6.2.3" + "symfony/console": "^6.2.3|^7.0", + "symfony/var-dumper": "^6.2.3|^7.0" }, "require-dev": { - "livewire/livewire": "^2.11", + "livewire/livewire": "^2.11|dev-feat/l11", "mockery/mockery": "^1.5.1", - "openai-php/client": "^0.3.4", - "orchestra/testbench": "^8.0", - "pestphp/pest": "^1.22.3", + "openai-php/client": "^0.7.3", + "orchestra/testbench": "^8.0|^9.0", + "pestphp/pest": "^1.22.3|^2.0", "phpstan/extension-installer": "^1.2", "phpstan/phpstan-deprecation-rules": "^1.1.1", "phpstan/phpstan-phpunit": "^1.3.3", @@ -46,7 +46,8 @@ "sort-packages": true, "allow-plugins": { "phpstan/extension-installer": true, - "pestphp/pest-plugin": true + "pestphp/pest-plugin": true, + "php-http/discovery": false } }, "extra": { From f1ebd60fb33e196600efb2dcc1fbe8b702594e58 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Mon, 4 Dec 2023 17:44:29 +0000 Subject: [PATCH 02/13] Continues to add L11 support --- .github/workflows/run-tests.yml | 8 ++++---- composer.json | 4 ++-- .../LaravelLivewireRequestContextProviderTest.php | 2 +- tests/TestCase.php | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 703f367b..5300dd61 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,11 +10,12 @@ jobs: fail-fast: false matrix: php: [8.1, 8.2, 8.3] - laravel: [10.*] + laravel: [10.*, 11.*] + livewire: [2, 3] stability: [prefer-lowest, prefer-stable] os: [ubuntu-latest, windows-latest] - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} + name: P${{ matrix.php }} - L${{ matrix.laravel }} - LW${{ matrix.livewire }} -${{ matrix.stability }} - ${{ matrix.os }} steps: - name: Checkout code @@ -42,8 +43,7 @@ jobs: - name: Install dependencies run: | composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.62.1" --no-interaction --no-update - composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest + composer update --with="livewire/livewire:^${{ matrix.livewire }}" --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest - name: Execute tests run: vendor/bin/pest - diff --git a/composer.json b/composer.json index be1aa318..0fdfe1c0 100644 --- a/composer.json +++ b/composer.json @@ -28,9 +28,9 @@ "symfony/var-dumper": "^6.2.3|^7.0" }, "require-dev": { - "livewire/livewire": "^2.11|dev-feat/l11", + "livewire/livewire": "^2.11|^3.0|dev-feat/l11", "mockery/mockery": "^1.5.1", - "openai-php/client": "^0.7.3", + "openai-php/client": "^0.8.0", "orchestra/testbench": "^8.0|^9.0", "pestphp/pest": "^1.22.3|^2.0", "phpstan/extension-installer": "^1.2", diff --git a/tests/ContextProviders/LaravelLivewireRequestContextProviderTest.php b/tests/ContextProviders/LaravelLivewireRequestContextProviderTest.php index dfb91048..5c7189f4 100644 --- a/tests/ContextProviders/LaravelLivewireRequestContextProviderTest.php +++ b/tests/ContextProviders/LaravelLivewireRequestContextProviderTest.php @@ -166,7 +166,7 @@ function createRequestContext(array $fingerprint, array $updates = [], array $se 'fingerprint' => $fingerprint, 'serverMemo' => $serverMemo, 'updates' => $updates, - ]); + ], ['X-Livewire' => 1]); return new LaravelLivewireRequestContextProvider($providedRequest, test()->livewireManager); } diff --git a/tests/TestCase.php b/tests/TestCase.php index 40487cbf..4a6ba87d 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -19,7 +19,7 @@ class TestCase extends \Orchestra\Testbench\TestCase protected function setUp(): void { - ray()->newScreen($this->getName()); + // ray()->newScreen($this->getName()); parent::setUp(); } From 9b7f2107889712246e1423885495e65e93eed0aa Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 4 Jan 2024 12:29:36 +0000 Subject: [PATCH 03/13] Don't run Livewire on Livewire 3 --- composer.json | 4 +-- phpunit.xml.dist | 32 +++++++++++++++---- ...avelLivewireRequestContextProviderTest.php | 2 +- tests/Pest.php | 3 ++ ...inedLivewireMethodSolutionProviderTest.php | 2 +- 5 files changed, 33 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index 0fdfe1c0..936b7d09 100644 --- a/composer.json +++ b/composer.json @@ -28,11 +28,11 @@ "symfony/var-dumper": "^6.2.3|^7.0" }, "require-dev": { - "livewire/livewire": "^2.11|^3.0|dev-feat/l11", + "livewire/livewire": "^2.11|^3.0", "mockery/mockery": "^1.5.1", "openai-php/client": "^0.8.0", "orchestra/testbench": "^8.0|^9.0", - "pestphp/pest": "^1.22.3|^2.0", + "pestphp/pest": "^2.0", "phpstan/extension-installer": "^1.2", "phpstan/phpstan-deprecation-rules": "^1.1.1", "phpstan/phpstan-phpunit": "^1.3.3", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e0c08130..5ea53503 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,8 +1,28 @@ - - - - tests - - + + + + tests + + + + + ./src + + diff --git a/tests/ContextProviders/LaravelLivewireRequestContextProviderTest.php b/tests/ContextProviders/LaravelLivewireRequestContextProviderTest.php index 5c7189f4..2cf7fc1d 100644 --- a/tests/ContextProviders/LaravelLivewireRequestContextProviderTest.php +++ b/tests/ContextProviders/LaravelLivewireRequestContextProviderTest.php @@ -7,7 +7,7 @@ beforeEach(function () { $this->livewireManager = FakeLivewireManager::setUp(); -}); +})->skip(LIVEWIRE_VERSION_3, 'Missing Livewire 3 support.'); it('returns the referer url and method', function () { $context = createRequestContext([ diff --git a/tests/Pest.php b/tests/Pest.php index 33b0c1f8..2166e3e2 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -1,8 +1,11 @@ in(__DIR__); if (file_exists(__DIR__ . '/../.env')) { diff --git a/tests/Solutions/SolutionProviders/UndefinedLivewireMethodSolutionProviderTest.php b/tests/Solutions/SolutionProviders/UndefinedLivewireMethodSolutionProviderTest.php index 27e5711d..70b3e0da 100644 --- a/tests/Solutions/SolutionProviders/UndefinedLivewireMethodSolutionProviderTest.php +++ b/tests/Solutions/SolutionProviders/UndefinedLivewireMethodSolutionProviderTest.php @@ -17,4 +17,4 @@ expect($solution->getSolutionTitle())->toBe('Possible typo `Spatie\LaravelIgnition\Tests\stubs\Components\TestLivewireComponent::chnge`'); expect($solution->getSolutionDescription())->toBe('Did you mean `Spatie\LaravelIgnition\Tests\stubs\Components\TestLivewireComponent::change`?'); -}); +})->skip(LIVEWIRE_VERSION_3, 'Missing Livewire 3 support.'); From 17a46b382aaca5064f8a93ac53bd7e8a7cfbd668 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 4 Jan 2024 13:14:48 +0000 Subject: [PATCH 04/13] Excludes PHP 8.1 on L11 --- .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 5300dd61..d220a1ad 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -14,6 +14,9 @@ jobs: livewire: [2, 3] stability: [prefer-lowest, prefer-stable] os: [ubuntu-latest, windows-latest] + exclude: + - php: 8.1 + laravel: 11.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - LW${{ matrix.livewire }} -${{ matrix.stability }} - ${{ matrix.os }} From 5dc94332f27937a509af8832cadaa2aa75fce781 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 4 Jan 2024 13:33:26 +0000 Subject: [PATCH 05/13] Use latest version of Pest --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 936b7d09..e0f08497 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "mockery/mockery": "^1.5.1", "openai-php/client": "^0.8.0", "orchestra/testbench": "^8.0|^9.0", - "pestphp/pest": "^2.0", + "pestphp/pest": "^2.30", "phpstan/extension-installer": "^1.2", "phpstan/phpstan-deprecation-rules": "^1.1.1", "phpstan/phpstan-phpunit": "^1.3.3", From 421ea06f9aee0020391140454a049484558c8e81 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 4 Jan 2024 13:34:06 +0000 Subject: [PATCH 06/13] Fix CI --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index d220a1ad..b419346a 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -11,7 +11,7 @@ jobs: matrix: php: [8.1, 8.2, 8.3] laravel: [10.*, 11.*] - livewire: [2, 3] + livewire: [2.*, 3.*] stability: [prefer-lowest, prefer-stable] os: [ubuntu-latest, windows-latest] exclude: From fe7ecabd464d9b5fe3f38f286ba3b558189f2f19 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 4 Jan 2024 13:45:50 +0000 Subject: [PATCH 07/13] Fixes CI --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b419346a..6d68a543 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -11,7 +11,7 @@ jobs: matrix: php: [8.1, 8.2, 8.3] laravel: [10.*, 11.*] - livewire: [2.*, 3.*] + livewire: [2.11, 3.0] stability: [prefer-lowest, prefer-stable] os: [ubuntu-latest, windows-latest] exclude: From 41064c8c272007695b2443b660a0cc4962869f42 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 4 Jan 2024 13:49:12 +0000 Subject: [PATCH 08/13] Also excludes L11 with Livewire 2 --- .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 6d68a543..f575e881 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -17,6 +17,9 @@ jobs: exclude: - php: 8.1 laravel: 11.* + exclude: + - laravel: 11.* + - livewire: 2.11 name: P${{ matrix.php }} - L${{ matrix.laravel }} - LW${{ matrix.livewire }} -${{ matrix.stability }} - ${{ matrix.os }} From 7dc5f8a093201ed46d7d42c8183301dea948f719 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 4 Jan 2024 13:51:12 +0000 Subject: [PATCH 09/13] Fixes workflow --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index f575e881..4e40318f 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -19,7 +19,7 @@ jobs: laravel: 11.* exclude: - laravel: 11.* - - livewire: 2.11 + livewire: 2.11 name: P${{ matrix.php }} - L${{ matrix.laravel }} - LW${{ matrix.livewire }} -${{ matrix.stability }} - ${{ matrix.os }} From ee5af17bf82bf72523641fc3265fe1afc975cae7 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 4 Jan 2024 13:53:03 +0000 Subject: [PATCH 10/13] Fixes workflow --- .github/workflows/run-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 4e40318f..dc241017 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -17,7 +17,6 @@ jobs: exclude: - php: 8.1 laravel: 11.* - exclude: - laravel: 11.* livewire: 2.11 From 3f956d6553a45eb9731b4aeab592a4c881290d07 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 4 Jan 2024 13:55:07 +0000 Subject: [PATCH 11/13] Fixes carbon --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index dc241017..cb6d3ee0 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -47,7 +47,7 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.62.1" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.72.1" --no-interaction --no-update composer update --with="livewire/livewire:^${{ matrix.livewire }}" --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest - name: Execute tests From 0f25005a2f00ea49b64d15395c48c6890ac4164e Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 4 Jan 2024 14:02:54 +0000 Subject: [PATCH 12/13] Fixes --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index e0f08497..96bb18b2 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "require-dev": { "livewire/livewire": "^2.11|^3.0", "mockery/mockery": "^1.5.1", - "openai-php/client": "^0.8.0", + "openai-php/client": "^0.8.1", "orchestra/testbench": "^8.0|^9.0", "pestphp/pest": "^2.30", "phpstan/extension-installer": "^1.2", From e5076229fe968a9479658be4f0a3b718e9702eb9 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 4 Jan 2024 14:05:48 +0000 Subject: [PATCH 13/13] Fixes LW --- .github/workflows/run-tests.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index cb6d3ee0..e4048310 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -11,7 +11,7 @@ jobs: matrix: php: [8.1, 8.2, 8.3] laravel: [10.*, 11.*] - livewire: [2.11, 3.0] + livewire: [2.11, 3.3.5] stability: [prefer-lowest, prefer-stable] os: [ubuntu-latest, windows-latest] exclude: diff --git a/composer.json b/composer.json index 96bb18b2..e4f0a9db 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "symfony/var-dumper": "^6.2.3|^7.0" }, "require-dev": { - "livewire/livewire": "^2.11|^3.0", + "livewire/livewire": "^2.11|^3.3.5", "mockery/mockery": "^1.5.1", "openai-php/client": "^0.8.1", "orchestra/testbench": "^8.0|^9.0",