From 302c5f77961135a498e264b4f183141a6f0835c8 Mon Sep 17 00:00:00 2001 From: Ryan Ginnow Date: Tue, 21 May 2024 17:01:41 -0400 Subject: [PATCH 1/4] Fix exception from missing import on select component --- resources/views/components/select.blade.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/views/components/select.blade.php b/resources/views/components/select.blade.php index edcda2a8..5a41f9b4 100644 --- a/resources/views/components/select.blade.php +++ b/resources/views/components/select.blade.php @@ -1,3 +1,6 @@ +@php + use Illuminate\Support\Str; +@endphp @props([ 'id' => 'select-'.Str::random(), 'label', From 53ffceeb573b318f7fd5a447c01307c1ba4c8b88 Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Wed, 22 May 2024 10:15:30 +1000 Subject: [PATCH 2/4] Import Pulse facade --- resources/views/components/pulse.blade.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/views/components/pulse.blade.php b/resources/views/components/pulse.blade.php index db90f748..9d751c74 100644 --- a/resources/views/components/pulse.blade.php +++ b/resources/views/components/pulse.blade.php @@ -1,3 +1,6 @@ +@php + use Laravel\Pulse\Facades\Pulse; +@endphp @props(['cols' => 12, 'fullWidth' => false]) @@ -12,10 +15,10 @@ - {!! Laravel\Pulse\Facades\Pulse::css() !!} + {!! Pulse::css() !!} @livewireStyles - {!! Laravel\Pulse\Facades\Pulse::js() !!} + {!! Pulse::js() !!} @livewireScriptConfig From 58c5fa5b0bc4bf864e185abf78bd360a1491239b Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Wed, 22 May 2024 10:28:07 +1000 Subject: [PATCH 3/4] Formatting --- resources/views/components/pulse.blade.php | 4 +--- resources/views/components/select.blade.php | 4 +--- resources/views/livewire/cache.blade.php | 4 +--- resources/views/livewire/queues.blade.php | 4 +--- resources/views/livewire/slow-outgoing-requests.blade.php | 4 +--- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/resources/views/components/pulse.blade.php b/resources/views/components/pulse.blade.php index 9d751c74..10110098 100644 --- a/resources/views/components/pulse.blade.php +++ b/resources/views/components/pulse.blade.php @@ -1,6 +1,4 @@ -@php - use Laravel\Pulse\Facades\Pulse; -@endphp +@use('Laravel\Pulse\Facades\Pulse') @props(['cols' => 12, 'fullWidth' => false]) diff --git a/resources/views/components/select.blade.php b/resources/views/components/select.blade.php index 5a41f9b4..e5bc2eb3 100644 --- a/resources/views/components/select.blade.php +++ b/resources/views/components/select.blade.php @@ -1,6 +1,4 @@ -@php - use Illuminate\Support\Str; -@endphp +@use('Illuminate\Support\Str') @props([ 'id' => 'select-'.Str::random(), 'label', diff --git a/resources/views/livewire/cache.blade.php b/resources/views/livewire/cache.blade.php index ce5641e5..adbd0d1d 100644 --- a/resources/views/livewire/cache.blade.php +++ b/resources/views/livewire/cache.blade.php @@ -1,6 +1,4 @@ -@php - use Illuminate\Support\Str; -@endphp +@use('Illuminate\Support\Str') Date: Wed, 22 May 2024 10:28:24 +1000 Subject: [PATCH 4/4] Ensure we do not depend on aliases --- tests/Feature/PulseTest.php | 1 + tests/Pest.php | 1 + tests/TestCase.php | 3 +++ 3 files changed, 5 insertions(+) diff --git a/tests/Feature/PulseTest.php b/tests/Feature/PulseTest.php index fa1e39a1..c9223a6a 100644 --- a/tests/Feature/PulseTest.php +++ b/tests/Feature/PulseTest.php @@ -13,6 +13,7 @@ use Laravel\Pulse\Entry; use Laravel\Pulse\Facades\Pulse; use Laravel\Pulse\Value; +use Livewire\Livewire; use Livewire\LivewireManager; use Tests\StorageFake; use Tests\User; diff --git a/tests/Pest.php b/tests/Pest.php index 3e6cd13b..a408878d 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -7,6 +7,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Gate; +use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Process; use Illuminate\Support\Sleep; use Illuminate\Support\Str; diff --git a/tests/TestCase.php b/tests/TestCase.php index fc9ebb57..d66e81fa 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -3,6 +3,7 @@ namespace Tests; use Illuminate\Contracts\Config\Repository; +use Illuminate\Foundation\AliasLoader; use Illuminate\Foundation\Testing\RefreshDatabase; use Orchestra\Testbench\Attributes\WithMigration; use Orchestra\Testbench\Concerns\WithWorkbench; @@ -19,6 +20,8 @@ protected function setUp(): void $this->usesTestingFeature(new WithMigration('laravel', 'queue')); parent::setUp(); + + AliasLoader::getInstance()->setAliases([]); } protected function defineEnvironment($app): void