Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.1, 8.2, 8.3, 8.4]
php: [8.1, 8.2, 8.3, 8.4, 8.5]
laravel: [10, 11, 12]
exclude:
- php: 8.1
Expand All @@ -28,6 +28,10 @@ jobs:
laravel: 12
- php: 8.4
laravel: 10
- php: 8.5
laravel: 10
- php: 8.5
laravel: 11

name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}

Expand All @@ -52,12 +56,12 @@ jobs:
run: vendor/bin/pest

windows_tests:
runs-on: windows-2019
runs-on: windows-2022

strategy:
fail-fast: true
matrix:
php: [8.1, 8.2, 8.3, 8.4]
php: [8.1, 8.2, 8.3, 8.4, 8.5]
laravel: [10, 11, 12]
exclude:
- php: 8.1
Expand All @@ -66,6 +70,10 @@ jobs:
laravel: 12
- php: 8.4
laravel: 10
- php: 8.5
laravel: 10
- php: 8.5
laravel: 11

name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} Windows

Expand Down
12 changes: 7 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
},
"require-dev": {
"laravel/folio": "^1.1",
"mockery/mockery": "^1.6",
"orchestra/testbench": "^8.15.0|^9.0|^10.0",
"pestphp/pest": "^2.9.5|^3.0",
"orchestra/testbench": "^8.36|^9.15|^10.8",
"pestphp/pest": "^2.9.5|^3.0|^4.0",
"phpstan/phpstan": "^1.10"
},
"autoload": {
Expand Down Expand Up @@ -56,10 +55,13 @@
}
},
"config": {
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true
}
},
"audit": {
"block-insecure": false
},
"sort-packages": true
},
"scripts": {
"post-autoload-dump": "@composer run prepare",
Expand Down
3 changes: 3 additions & 0 deletions src/VoltServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Illuminate\Support\ServiceProvider;
use Illuminate\Testing\TestResponse;
use Livewire\Livewire;
use Livewire\LivewireManager as BaseLivewireManager;
use Livewire\LivewireServiceProvider;
use Livewire\Volt\Precompilers\ExtractFragments;
use Livewire\Volt\Precompilers\ExtractTemplate;
Expand Down Expand Up @@ -61,8 +62,10 @@ protected function bindLivewireManager(): void
{
$this->app->singleton(LivewireManager::class);
$this->app->alias(LivewireManager::class, 'livewire');
$this->app->alias(LivewireManager::class, BaseLivewireManager::class);

Facade::clearResolvedInstance('livewire');
Facade::clearResolvedInstance(BaseLivewireManager::class);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed integration with Livewire 3.7 and 4.0: livewire/livewire#9220


$this->app->get(LivewireManager::class)->setProvider(
$this->app->getProvider(LivewireServiceProvider::class),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Livewire\Volt\Actions;
use Livewire\Volt\CompileContext;
use Livewire\Volt\Contracts\Compiled;
use Livewire\Volt\Component;

new class extends Component implements Livewire\Volt\Contracts\FunctionalComponent
{
public static CompileContext $__context;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;

#[\Livewire\Attributes\Session()]
public $tab;

public function mount()
{
(new Actions\InitializeState)->execute(static::$__context, $this, get_defined_vars());

(new Actions\CallHook('mount'))->execute(static::$__context, $this, get_defined_vars());
}

#[\Livewire\Attributes\Computed()]
public function tags()
{
$arguments = [static::$__context, $this, func_get_args()];

return (new Actions\CallMethod('tags'))->execute(...$arguments);
}

};