From 87ddb33fe201ed361eab6dd10d8da061a27bc7e9 Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 16 Jun 2024 00:09:15 -0300 Subject: [PATCH 01/30] TDD expected behavior --- .../Pages/CreatePostUsingWizard.php | 29 +++++++++++++++++++ .../Pages/CreateRecordUsingWizardTest.php | 22 ++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 tests/src/Panels/Fixtures/Resources/PostResource/Pages/CreatePostUsingWizard.php create mode 100644 tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php diff --git a/tests/src/Panels/Fixtures/Resources/PostResource/Pages/CreatePostUsingWizard.php b/tests/src/Panels/Fixtures/Resources/PostResource/Pages/CreatePostUsingWizard.php new file mode 100644 index 0000000000..2e821d6f41 --- /dev/null +++ b/tests/src/Panels/Fixtures/Resources/PostResource/Pages/CreatePostUsingWizard.php @@ -0,0 +1,29 @@ +schema([ + TextInput::make('title')->required(), + ]), + Step::make('Step 2') + ->schema([ + TextInput::make('content')->required(), + ]), + ]; + } +} diff --git a/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php b/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php new file mode 100644 index 0000000000..cbadb5c254 --- /dev/null +++ b/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php @@ -0,0 +1,22 @@ +fillForm(['title' => null]) + ->nextFormWizardStep() + ->assertHasErrors(['data.title']) + ->assertHasNoErrors(['data.content']) + ->nextFormWizardStep(currentStep: 1) + ->assertHasErrors(['data.content']) + ->assertHasNoErrors(['data.title']); +}); + + + From d360fc817e8fa0b299dacd0515891eb903e9bf80 Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 16 Jun 2024 00:09:21 -0300 Subject: [PATCH 02/30] add helper --- packages/forms/src/Testing/TestsForms.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/forms/src/Testing/TestsForms.php b/packages/forms/src/Testing/TestsForms.php index 09b55004bc..762ba2d05f 100644 --- a/packages/forms/src/Testing/TestsForms.php +++ b/packages/forms/src/Testing/TestsForms.php @@ -361,4 +361,22 @@ class TestsForms return $this; }; } + + public function nextFormWizardStep(): Closure + { + return function (int $currentStep = 0, string $formName = 'form'): static { + /** @phpstan-ignore-next-line */ + $this->assertFormExists($formName); + + /** @var ComponentContainer $form */ + $form = $this->instance()->{$formName}; + + $this->call('dispatchFormEvent', 'wizard::nextStep', $form->getStatePath(), $currentStep); + $this->refresh(); + + return $this; + }; + } + + } From 8312ed17288dec4fd31a127cc038535911622e87 Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 16 Jun 2024 00:09:27 -0300 Subject: [PATCH 03/30] add stub --- packages/forms/.stubs.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/forms/.stubs.php b/packages/forms/.stubs.php index decfcdfaa8..8b1b4bb788 100644 --- a/packages/forms/.stubs.php +++ b/packages/forms/.stubs.php @@ -85,6 +85,8 @@ namespace Livewire\Features\SupportTesting { public function getNestedFormComponentActionComponentAndName(string | array $component, string | array $name, string $formName = 'form'): static {} public function parseNestedFormComponentActionComponentAndName(string | array $component, string | array $name, string $formName = 'form'): static {} + + public function nextFormWizardStep(int $currentStep = 0, string $formName = 'form'): static {} } } From eba77c7692c141be654142b6c6c0666cb72ef431 Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 16 Jun 2024 00:16:59 -0300 Subject: [PATCH 04/30] cleanup --- packages/forms/src/Testing/TestsForms.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/forms/src/Testing/TestsForms.php b/packages/forms/src/Testing/TestsForms.php index 762ba2d05f..0268649f89 100644 --- a/packages/forms/src/Testing/TestsForms.php +++ b/packages/forms/src/Testing/TestsForms.php @@ -377,6 +377,4 @@ class TestsForms return $this; }; } - - } From 3ca9c501cf3c4d297990f7b4bae088eb709da89f Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 16 Jun 2024 00:44:38 -0300 Subject: [PATCH 05/30] cleanup --- tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php b/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php index cbadb5c254..9553472341 100644 --- a/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php +++ b/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php @@ -9,7 +9,6 @@ uses(TestCase::class); it('moves to next wizard step', function () { livewire(CreatePostUsingWizard::class) - ->fillForm(['title' => null]) ->nextFormWizardStep() ->assertHasErrors(['data.title']) ->assertHasNoErrors(['data.content']) From c65002a0ebe8ae0199849c592059e2877906b86a Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 16 Jun 2024 01:32:18 -0300 Subject: [PATCH 06/30] test with multiple forms --- tests/src/Forms/FormsTest.php | 67 +++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/tests/src/Forms/FormsTest.php b/tests/src/Forms/FormsTest.php index b25b353de6..b80ee45678 100644 --- a/tests/src/Forms/FormsTest.php +++ b/tests/src/Forms/FormsTest.php @@ -112,6 +112,19 @@ it('does not have layout components', function () { ->assertFormComponentDoesNotExist('no-such-section'); }); +it('can go to next wizard step on multiple forms', function () { + livewire(TestComponentWithMultipleWizardForms::class) + ->assertHasNoErrors() + ->nextFormWizardStep(formName: 'fooForm') + ->assertHasErrors(['fooData.title']) + ->assertHasNoErrors(['barData.title']) + ->nextFormWizardStep(currentStep: 1, formName: 'barForm') + ->assertHasNoErrors(['barData.title']) + ->assertHasErrors(['barData.content']) + ->assertHasNoErrors(['fooData.content']); +}); + + class TestComponentWithForm extends Livewire { public function form(Form $form): Form @@ -203,3 +216,57 @@ class TestComponentWithMultipleForms extends Livewire return view('forms.fixtures.form'); } } + + +class TestComponentWithMultipleWizardForms extends Livewire +{ + public $fooData; + public $barData; + + public function mount(): void + { + $this->fooForm->fill(); + $this->barForm->fill(); + } + + protected function getForms(): array + { + return [ + 'fooForm', + 'barForm', + ]; + } + + public function fooForm(Form $form): Form + { + return $form + ->schema($this->getSchemaForForms()) + ->statePath('fooData'); + } + + public function barForm(Form $form): Form + { + return $form + ->schema($this->getSchemaForForms()) + ->statePath('barData'); + } + + protected function getSchemaForForms(): array + { + return [ + \Filament\Forms\Components\Wizard::make([ + \Filament\Forms\Components\Wizard\Step::make('step 1')->schema([ + TextInput::make('title')->required(), + ]), + \Filament\Forms\Components\Wizard\Step::make('step 2')->schema([ + TextInput::make('content')->required(), + ]) + ]) + ]; + } + + public function render(): View + { + return view('forms.fixtures.form'); + } +} From 5020ca3837827b3bc16926d4900b4b9e2fb3c515 Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 16 Jun 2024 02:43:36 -0300 Subject: [PATCH 07/30] use the correct helper --- tests/src/Forms/FormsTest.php | 26 ++++++++++--------- .../Pages/CreateRecordUsingWizardTest.php | 11 +++----- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/tests/src/Forms/FormsTest.php b/tests/src/Forms/FormsTest.php index b80ee45678..962cc82dad 100644 --- a/tests/src/Forms/FormsTest.php +++ b/tests/src/Forms/FormsTest.php @@ -114,16 +114,18 @@ it('does not have layout components', function () { it('can go to next wizard step on multiple forms', function () { livewire(TestComponentWithMultipleWizardForms::class) - ->assertHasNoErrors() - ->nextFormWizardStep(formName: 'fooForm') - ->assertHasErrors(['fooData.title']) - ->assertHasNoErrors(['barData.title']) - ->nextFormWizardStep(currentStep: 1, formName: 'barForm') - ->assertHasNoErrors(['barData.title']) - ->assertHasErrors(['barData.content']) - ->assertHasNoErrors(['fooData.content']); -}); + ->assertHasNoFormErrors(formName: 'fooForm') + ->assertHasNoFormErrors(formName: 'barForm') + ->nextFormWizardStep(formName: 'fooForm') + ->assertHasFormErrors(['title'], 'fooForm') + ->assertHasNoFormErrors(['title'], 'barForm') + + ->nextFormWizardStep(currentStep: 1, formName: 'barForm') + ->assertHasNoFormErrors(['title'], 'barForm') + ->assertHasFormErrors(['content'], 'barForm') + ->assertHasNoFormErrors(['content'], 'fooForm'); +}); class TestComponentWithForm extends Livewire { @@ -217,10 +219,10 @@ class TestComponentWithMultipleForms extends Livewire } } - class TestComponentWithMultipleWizardForms extends Livewire { public $fooData; + public $barData; public function mount(): void @@ -260,8 +262,8 @@ class TestComponentWithMultipleWizardForms extends Livewire ]), \Filament\Forms\Components\Wizard\Step::make('step 2')->schema([ TextInput::make('content')->required(), - ]) - ]) + ]), + ]), ]; } diff --git a/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php b/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php index 9553472341..cc51a8f6ee 100644 --- a/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php +++ b/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php @@ -10,12 +10,9 @@ uses(TestCase::class); it('moves to next wizard step', function () { livewire(CreatePostUsingWizard::class) ->nextFormWizardStep() - ->assertHasErrors(['data.title']) - ->assertHasNoErrors(['data.content']) + ->assertHasFormErrors(['title']) + ->assertHasNoFormErrors(['content']) ->nextFormWizardStep(currentStep: 1) - ->assertHasErrors(['data.content']) - ->assertHasNoErrors(['data.title']); + ->assertHasFormErrors(['content']) + ->assertHasNoFormErrors(['title']); }); - - - From a33769b7a9e8628a0ad2cd318ac3408e5b4e082a Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 16 Jun 2024 02:52:24 -0300 Subject: [PATCH 08/30] docs --- packages/forms/docs/09-testing.md | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/packages/forms/docs/09-testing.md b/packages/forms/docs/09-testing.md index 1e15766285..f072391dee 100644 --- a/packages/forms/docs/09-testing.md +++ b/packages/forms/docs/09-testing.md @@ -546,3 +546,42 @@ it('links to the correct Filament sites', function () { ->assertFormComponentActionShouldNotOpenUrlInNewTab('customer_id', 'github'); }); ``` + +### Wizard + +You call a wizard's step, use `nextFormWizardStep()` + +```php +use function Pest\Livewire\livewire; + +it('moves to next wizard step', function () { + livewire(CreatePostUsingWizard::class) + ->nextFormWizardStep() + ->assertHasFormErrors(['title']); +}); +``` + +For the subsequent steps you can pass a specific step's index (starts from 0 as the first step) + +```php +use function Pest\Livewire\livewire; + +it('moves to the wizards second step', function () { + livewire(CreatePostUsingWizard::class) + ->nextFormWizardStep(currentStep: 1) + ->assertHasFormErrors(['content']); +}); +``` + +If you have multiple forms on in a page, you may inform the form name as a parameter + +```php +use function Pest\Livewire\livewire; + +it('moves to the wizards second step but just for fooForm', function () { + livewire(CreatePostUsingWizard::class) + ->nextFormWizardStep(currentStep: 1, formName: 'fooForm') + ->assertHasFormErrors(['content'], 'fooForm') + ->assertHasNoFormErrors(['content'], 'barForm'); +}); +``` From 26ddb1e123277627f53c8e0bb01889a3db083aa0 Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 16 Jun 2024 03:05:42 -0300 Subject: [PATCH 09/30] fix typo --- packages/forms/docs/09-testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/forms/docs/09-testing.md b/packages/forms/docs/09-testing.md index f072391dee..7f8f18d167 100644 --- a/packages/forms/docs/09-testing.md +++ b/packages/forms/docs/09-testing.md @@ -549,7 +549,7 @@ it('links to the correct Filament sites', function () { ### Wizard -You call a wizard's step, use `nextFormWizardStep()` +To call a wizard's step, use `nextFormWizardStep()` ```php use function Pest\Livewire\livewire; From 551675b2d3439332c4db3f55230dfb2cb4d16107 Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 16 Jun 2024 03:06:17 -0300 Subject: [PATCH 10/30] improve headline --- packages/forms/docs/09-testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/forms/docs/09-testing.md b/packages/forms/docs/09-testing.md index 7f8f18d167..7cd43fb2d2 100644 --- a/packages/forms/docs/09-testing.md +++ b/packages/forms/docs/09-testing.md @@ -549,7 +549,7 @@ it('links to the correct Filament sites', function () { ### Wizard -To call a wizard's step, use `nextFormWizardStep()` +To call a wizard's next step, use `nextFormWizardStep()` ```php use function Pest\Livewire\livewire; From 47b0755f51e061ac98aef3f7476907e9629a401a Mon Sep 17 00:00:00 2001 From: Edu Date: Mon, 17 Jun 2024 10:02:38 -0300 Subject: [PATCH 11/30] make test more clear --- .../Panels/Resources/Pages/CreateRecordUsingWizardTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php b/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php index cc51a8f6ee..9e359aebac 100644 --- a/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php +++ b/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php @@ -7,11 +7,14 @@ use function Filament\Tests\livewire; uses(TestCase::class); -it('moves to next wizard step', function () { +it('it validates the current wizard step when moving to the next wizard step', function () { livewire(CreatePostUsingWizard::class) ->nextFormWizardStep() ->assertHasFormErrors(['title']) ->assertHasNoFormErrors(['content']) + ->fillForm(['title' => 'Test title']) + ->nextFormWizardStep() + ->assertHasNoFormErrors() ->nextFormWizardStep(currentStep: 1) ->assertHasFormErrors(['content']) ->assertHasNoFormErrors(['title']); From 825b5cd77e2b194969c9b6033893a82234349f28 Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Tue, 18 Jun 2024 07:25:04 +0100 Subject: [PATCH 12/30] Update 09-testing.md --- packages/forms/docs/09-testing.md | 78 +++++++++++++++---------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/packages/forms/docs/09-testing.md b/packages/forms/docs/09-testing.md index 7cd43fb2d2..bc87ba9f72 100644 --- a/packages/forms/docs/09-testing.md +++ b/packages/forms/docs/09-testing.md @@ -286,6 +286,45 @@ test('comments section is enabled' function () { }); ``` +### Wizard + +To call a wizard's next step, use the `nextFormWizardStep()` method: + +```php +use function Pest\Livewire\livewire; + +it('moves to next wizard step', function () { + livewire(CreatePostUsingWizard::class) + ->nextFormWizardStep() + ->assertHasFormErrors(['title']); +}); +``` + +For the subsequent steps you can pass a specific step's index to `currentStep`, which starts from 0 as the first step: + +```php +use function Pest\Livewire\livewire; + +it('moves to the wizards second step', function () { + livewire(CreatePostUsingWizard::class) + ->nextFormWizardStep(currentStep: 1) + ->assertHasFormErrors(['content']); +}); +``` + +If you have multiple forms on the Livewire component, you may pass the form name as an argument: + +```php +use function Pest\Livewire\livewire; + +it('moves to the wizards second step but just for fooForm', function () { + livewire(CreatePostUsingWizard::class) + ->nextFormWizardStep(currentStep: 1, formName: 'fooForm') + ->assertHasFormErrors(['content'], 'fooForm') + ->assertHasNoFormErrors(['content'], 'barForm'); +}); +``` + ## Actions You can call an action by passing its form component name, and then the name of the action to `callFormComponentAction()`: @@ -546,42 +585,3 @@ it('links to the correct Filament sites', function () { ->assertFormComponentActionShouldNotOpenUrlInNewTab('customer_id', 'github'); }); ``` - -### Wizard - -To call a wizard's next step, use `nextFormWizardStep()` - -```php -use function Pest\Livewire\livewire; - -it('moves to next wizard step', function () { - livewire(CreatePostUsingWizard::class) - ->nextFormWizardStep() - ->assertHasFormErrors(['title']); -}); -``` - -For the subsequent steps you can pass a specific step's index (starts from 0 as the first step) - -```php -use function Pest\Livewire\livewire; - -it('moves to the wizards second step', function () { - livewire(CreatePostUsingWizard::class) - ->nextFormWizardStep(currentStep: 1) - ->assertHasFormErrors(['content']); -}); -``` - -If you have multiple forms on in a page, you may inform the form name as a parameter - -```php -use function Pest\Livewire\livewire; - -it('moves to the wizards second step but just for fooForm', function () { - livewire(CreatePostUsingWizard::class) - ->nextFormWizardStep(currentStep: 1, formName: 'fooForm') - ->assertHasFormErrors(['content'], 'fooForm') - ->assertHasNoFormErrors(['content'], 'barForm'); -}); -``` From 923c1364847363e500435d096550fd0736436964 Mon Sep 17 00:00:00 2001 From: Edu Date: Tue, 18 Jun 2024 10:59:19 -0300 Subject: [PATCH 13/30] remove unneeded line --- packages/forms/src/Testing/TestsForms.php | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/forms/src/Testing/TestsForms.php b/packages/forms/src/Testing/TestsForms.php index 5ae02e37d3..96dc90beb0 100644 --- a/packages/forms/src/Testing/TestsForms.php +++ b/packages/forms/src/Testing/TestsForms.php @@ -412,7 +412,6 @@ class TestsForms $form = $this->instance()->{$formName}; $this->call('dispatchFormEvent', 'wizard::nextStep', $form->getStatePath(), $currentStep); - $this->refresh(); return $this; }; From 6b1c54b3f31314fdf1f33a9e1c328400a577dd90 Mon Sep 17 00:00:00 2001 From: Edu Date: Tue, 18 Jun 2024 22:46:42 -0300 Subject: [PATCH 14/30] Additional wizard testing methods --- packages/forms/.stubs.php | 11 ++- packages/forms/src/Components/Wizard.php | 29 ++++++ packages/forms/src/Testing/TestsForms.php | 98 ++++++++++++++++++- tests/src/Forms/FormsTest.php | 5 +- .../Pages/CreateRecordUsingWizardTest.php | 38 ++++++- 5 files changed, 171 insertions(+), 10 deletions(-) diff --git a/packages/forms/.stubs.php b/packages/forms/.stubs.php index b8295fe235..529527cb7f 100644 --- a/packages/forms/.stubs.php +++ b/packages/forms/.stubs.php @@ -2,7 +2,6 @@ namespace Livewire\Features\SupportTesting { - use Illuminate\Support\Collection; use Closure; class Testable { @@ -90,7 +89,15 @@ namespace Livewire\Features\SupportTesting { public function parseNestedFormComponentActionComponentAndName(string | array $component, string | array $name, string $formName = 'form'): static {} - public function nextFormWizardStep(int $currentStep = 0, string $formName = 'form'): static {} + public function goToWizardStep(int $desiredStep, string $formName = 'form'): static {} + + public function goToNextWizardStep(string $formName = 'form'): static {} + + public function goToPreviousWizardStep(string $formName = 'form'): static {} + + public function assertWizardStepExists(int $step, string $formName = 'form'): static {} + + public function assertWizardCurrentStepIs(int $step, string $formName = 'form'): static {} } } diff --git a/packages/forms/src/Components/Wizard.php b/packages/forms/src/Components/Wizard.php index d04537f4fe..b8b46f2898 100644 --- a/packages/forms/src/Components/Wizard.php +++ b/packages/forms/src/Components/Wizard.php @@ -30,6 +30,8 @@ class Wizard extends Component protected int | Closure $startStep = 1; + protected int $currentStepIndex = 0; + /** * @var view-string */ @@ -64,6 +66,19 @@ class Wizard extends Component ]); $this->registerListeners([ + 'wizard::previousStep' => [ + function (Wizard $component, string $statePath, int $currentStepIndex): void { + if ($statePath !== $component->getStatePath()) { + return; + } + + if ($currentStepIndex < 1) { + $currentStepIndex = 1; + } + + $this->setCurrentStepIndex($currentStepIndex - 1); + }, + ], 'wizard::nextStep' => [ function (Wizard $component, string $statePath, int $currentStepIndex): void { if ($statePath !== $component->getStatePath()) { @@ -79,6 +94,7 @@ class Wizard extends Component /** @var Step $currentStep */ $currentStep = $steps[$currentStepIndex]; + $this->setCurrentStepIndex($currentStepIndex); /** @var ?Step $nextStep */ $nextStep = $steps[$currentStepIndex + 1] ?? null; @@ -96,6 +112,7 @@ class Wizard extends Component /** @var LivewireComponent $livewire */ $livewire = $component->getLivewire(); $livewire->dispatch('next-wizard-step', statePath: $statePath); + $this->setCurrentStepIndex($currentStepIndex + 1); }, ], ]); @@ -246,4 +263,16 @@ class Wizard extends Component { return filled($this->getStepQueryStringKey()); } + + private function setCurrentStepIndex(int $currentStepIndex): static + { + $this->currentStepIndex = $currentStepIndex; + + return $this; + } + + public function getCurrentStepIndex(): int + { + return $this->currentStepIndex; + } } diff --git a/packages/forms/src/Testing/TestsForms.php b/packages/forms/src/Testing/TestsForms.php index 96dc90beb0..66058020c5 100644 --- a/packages/forms/src/Testing/TestsForms.php +++ b/packages/forms/src/Testing/TestsForms.php @@ -7,6 +7,7 @@ use Filament\Forms\ComponentContainer; use Filament\Forms\Components\Component; use Filament\Forms\Components\Field; use Filament\Forms\Components\TextInput; +use Filament\Forms\Components\Wizard; use Filament\Forms\Contracts\HasForms; use Illuminate\Http\UploadedFile; use Illuminate\Support\Arr; @@ -402,16 +403,107 @@ class TestsForms }; } - public function nextFormWizardStep(): Closure + public function assertWizardStepExists(): Closure { - return function (int $currentStep = 0, string $formName = 'form'): static { + return function (int $step, string $formName = 'form'): static { /** @phpstan-ignore-next-line */ $this->assertFormExists($formName); /** @var ComponentContainer $form */ $form = $this->instance()->{$formName}; - $this->call('dispatchFormEvent', 'wizard::nextStep', $form->getStatePath(), $currentStep); + /** + * @var $wizard Wizard + */ + $wizard = $form->getComponent(fn ($component) => $component instanceof Wizard); + Assert::assertTrue(count($wizard->getChildComponents()) >= $step, "Wizard does not have a step $step"); + + return $this; + }; + } + + public function assertWizardCurrentStepIs(): Closure + { + return function (int $step, string $formName = 'form'): static { + /** @phpstan-ignore-next-line */ + $this->assertFormExists($formName); + + /** @var ComponentContainer $form */ + $form = $this->instance()->{$formName}; + + /** + * @var $wizard Wizard + */ + $wizard = $form->getComponent(fn ($component) => $component instanceof Wizard); + Assert::assertEquals( + $step, + $current = $wizard->getCurrentStepIndex() + 1, + "Failed asserting that wizard is on step $step, current step is {$current}" + ); + + return $this; + }; + } + + public function goToWizardStep(): Closure + { + return function (int $desiredStep = 1, string $formName = 'form'): static { + /** @phpstan-ignore-next-line */ + $this->assertWizardStepExists($desiredStep, $formName); + + /** @var ComponentContainer $form */ + $form = $this->instance()->{$formName}; + + /** + * @var $wizardComponent Wizard + */ + $wizardComponent = $form->getComponent(fn ($component) => $component instanceof Wizard); + if ($desiredStep === -1) { + $desiredStep = count($wizardComponent->getChildComponents()) + 1; + } + + $stepIndex = $desiredStep <= 1 ? 0 : $desiredStep - 2; + $this->call('dispatchFormEvent', 'wizard::nextStep', $form->getStatePath(), $stepIndex); + + return $this; + }; + } + + public function goToNextWizardStep(): Closure + { + return function (string $formName = 'form'): static { + /** @phpstan-ignore-next-line */ + $this->assertFormExists($formName); + + /** @var ComponentContainer $form */ + $form = $this->instance()->{$formName}; + + /** + * @var $wizardComponent Wizard + */ + $wizardComponent = $form->getComponent(fn ($component) => $component instanceof Wizard); + $nextStep = $wizardComponent->getCurrentStepIndex() + 2; + + return $this->goToWizardStep($nextStep, $formName); + }; + } + + public function goToPreviousWizardStep(): Closure + { + return function (string $formName = 'form'): static { + /** @phpstan-ignore-next-line */ + $this->assertFormExists($formName); + + /** @var ComponentContainer $form */ + $form = $this->instance()->{$formName}; + + /** + * @var $wizardComponent Wizard + */ + $wizardComponent = $form->getComponent(fn ($component) => $component instanceof Wizard); + $previousStepIndex = $wizardComponent->getCurrentStepIndex() - 1; + + $this->call('dispatchFormEvent', 'wizard::previousStep', $form->getStatePath(), $previousStepIndex); return $this; }; diff --git a/tests/src/Forms/FormsTest.php b/tests/src/Forms/FormsTest.php index 962cc82dad..b256cd9f69 100644 --- a/tests/src/Forms/FormsTest.php +++ b/tests/src/Forms/FormsTest.php @@ -117,11 +117,12 @@ it('can go to next wizard step on multiple forms', function () { ->assertHasNoFormErrors(formName: 'fooForm') ->assertHasNoFormErrors(formName: 'barForm') - ->nextFormWizardStep(formName: 'fooForm') + ->assertWizardStepExists(2, 'fooForm') + ->goToWizardStep(2, formName: 'fooForm') ->assertHasFormErrors(['title'], 'fooForm') ->assertHasNoFormErrors(['title'], 'barForm') - ->nextFormWizardStep(currentStep: 1, formName: 'barForm') + ->goToWizardStep(-1, formName: 'barForm') ->assertHasNoFormErrors(['title'], 'barForm') ->assertHasFormErrors(['content'], 'barForm') ->assertHasNoFormErrors(['content'], 'fooForm'); diff --git a/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php b/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php index 9e359aebac..6666473a90 100644 --- a/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php +++ b/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php @@ -9,13 +9,45 @@ uses(TestCase::class); it('it validates the current wizard step when moving to the next wizard step', function () { livewire(CreatePostUsingWizard::class) - ->nextFormWizardStep() + ->goToWizardStep(2) ->assertHasFormErrors(['title']) ->assertHasNoFormErrors(['content']) ->fillForm(['title' => 'Test title']) - ->nextFormWizardStep() + ->goToWizardStep(2) ->assertHasNoFormErrors() - ->nextFormWizardStep(currentStep: 1) + ->goToWizardStep(-1) // last step ->assertHasFormErrors(['content']) ->assertHasNoFormErrors(['title']); }); + +it('it verifies what wizard step we are currently in', function () { + livewire(CreatePostUsingWizard::class) + ->assertWizardCurrentStepIs(1) + ->fillForm(['title' => 'Test title']) + ->goToWizardStep(2) + ->assertWizardCurrentStepIs(2); +}); + +it('it goes to the last wizard step', function () { + livewire(CreatePostUsingWizard::class) + ->fillForm(['content' => 'Test content']) + ->assertWizardCurrentStepIs(1) + ->goToWizardStep(-1) + ->assertWizardCurrentStepIs(3); +}); + +it('it goes to the next wizard step', function () { + livewire(CreatePostUsingWizard::class) + ->fillForm(['title' => 'Test title']) + ->goToNextWizardStep() + ->assertWizardCurrentStepIs(2); +}); + +it('it goes to the previous wizard step', function () { + livewire(CreatePostUsingWizard::class) + ->fillForm(['title' => 'Test title']) + ->goToNextWizardStep() + ->assertWizardCurrentStepIs(2) + ->goToPreviousWizardStep() + ->assertWizardCurrentStepIs(1); +}); From e0ae2b86d0487b81b042ba1c705af86a9ea9dae7 Mon Sep 17 00:00:00 2001 From: Edu Date: Tue, 18 Jun 2024 22:55:59 -0300 Subject: [PATCH 15/30] improve docs --- packages/forms/docs/09-testing.md | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/packages/forms/docs/09-testing.md b/packages/forms/docs/09-testing.md index bc87ba9f72..cd1725b189 100644 --- a/packages/forms/docs/09-testing.md +++ b/packages/forms/docs/09-testing.md @@ -300,28 +300,39 @@ it('moves to next wizard step', function () { }); ``` -For the subsequent steps you can pass a specific step's index to `currentStep`, which starts from 0 as the first step: +If you want to go to a specific step, use `goToWizardStep`, the `assertWizardCurrentStepIs` method can ensure you are on the desired step: ```php use function Pest\Livewire\livewire; it('moves to the wizards second step', function () { livewire(CreatePostUsingWizard::class) - ->nextFormWizardStep(currentStep: 1) - ->assertHasFormErrors(['content']); + ->goToWizardStep(2) + ->assertWizardCurrentStepIs(2); }); ``` -If you have multiple forms on the Livewire component, you may pass the form name as an argument: +If you want to go to a specific step, use `goToWizardStep`, the `assertWizardCurrentStepIs` method can ensure you are on the desired step: ```php use function Pest\Livewire\livewire; -it('moves to the wizards second step but just for fooForm', function () { +it('moves to the wizards second step', function () { livewire(CreatePostUsingWizard::class) - ->nextFormWizardStep(currentStep: 1, formName: 'fooForm') - ->assertHasFormErrors(['content'], 'fooForm') - ->assertHasNoFormErrors(['content'], 'barForm'); + ->goToWizardStep(2) + ->assertWizardCurrentStepIs(2); +}); +``` + +If you have multiple forms on a single component, any of the wizard test helpers can accept a formName parameter: + +```php +use function Pest\Livewire\livewire; + +it('moves to next wizard step only for fooForm', function () { + livewire(CreatePostUsingWizard::class) + ->nextFormWizardStep(formName: 'fooForm') + ->assertHasFormErrors(['title'], formName: 'fooForm'); }); ``` From 18803c2ab18cada4b7abe64ae910a68e8a1ce7cb Mon Sep 17 00:00:00 2001 From: Edu Date: Tue, 18 Jun 2024 23:00:00 -0300 Subject: [PATCH 16/30] remove duplication --- packages/forms/docs/09-testing.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/packages/forms/docs/09-testing.md b/packages/forms/docs/09-testing.md index cd1725b189..9a80eb325c 100644 --- a/packages/forms/docs/09-testing.md +++ b/packages/forms/docs/09-testing.md @@ -312,18 +312,6 @@ it('moves to the wizards second step', function () { }); ``` -If you want to go to a specific step, use `goToWizardStep`, the `assertWizardCurrentStepIs` method can ensure you are on the desired step: - -```php -use function Pest\Livewire\livewire; - -it('moves to the wizards second step', function () { - livewire(CreatePostUsingWizard::class) - ->goToWizardStep(2) - ->assertWizardCurrentStepIs(2); -}); -``` - If you have multiple forms on a single component, any of the wizard test helpers can accept a formName parameter: ```php From babd49406b323e34bae4dc670fa9e25d022b6ed0 Mon Sep 17 00:00:00 2001 From: Edu Date: Tue, 18 Jun 2024 23:03:26 -0300 Subject: [PATCH 17/30] fix docs --- packages/forms/docs/09-testing.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/forms/docs/09-testing.md b/packages/forms/docs/09-testing.md index 9a80eb325c..ee424c4296 100644 --- a/packages/forms/docs/09-testing.md +++ b/packages/forms/docs/09-testing.md @@ -288,14 +288,26 @@ test('comments section is enabled' function () { ### Wizard -To call a wizard's next step, use the `nextFormWizardStep()` method: +To call a wizard's next step, use the `goToNextWizardStep()` method: ```php use function Pest\Livewire\livewire; it('moves to next wizard step', function () { livewire(CreatePostUsingWizard::class) - ->nextFormWizardStep() + ->goToNextWizardStep() + ->assertHasFormErrors(['title']); +}); +``` + +You can also go to the previous step by calling `goToPreviousWizardStep()` method: + +```php +use function Pest\Livewire\livewire; + +it('moves to next wizard step', function () { + livewire(CreatePostUsingWizard::class) + ->goToPreviousWizardStep() ->assertHasFormErrors(['title']); }); ``` @@ -319,7 +331,7 @@ use function Pest\Livewire\livewire; it('moves to next wizard step only for fooForm', function () { livewire(CreatePostUsingWizard::class) - ->nextFormWizardStep(formName: 'fooForm') + ->goToNextWizardStep(formName: 'fooForm') ->assertHasFormErrors(['title'], formName: 'fooForm'); }); ``` From 65cd7b428a46e56b9d52a29c023bd21bcd98749e Mon Sep 17 00:00:00 2001 From: Edu Date: Tue, 18 Jun 2024 23:10:19 -0300 Subject: [PATCH 18/30] set step index from getStartStep --- packages/forms/src/Components/Wizard.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/forms/src/Components/Wizard.php b/packages/forms/src/Components/Wizard.php index b8b46f2898..e878d8207b 100644 --- a/packages/forms/src/Components/Wizard.php +++ b/packages/forms/src/Components/Wizard.php @@ -60,6 +60,8 @@ class Wizard extends Component { parent::setUp(); + $this->currentStepIndex = $this->getStartStep() - 1; + $this->registerActions([ fn (Wizard $component): Action => $component->getNextAction(), fn (Wizard $component): Action => $component->getPreviousAction(), From 1cbcdf6ebce6a19a5d7d6575492c375224e07f5b Mon Sep 17 00:00:00 2001 From: Edu Date: Wed, 19 Jun 2024 01:15:59 -0300 Subject: [PATCH 19/30] emit step from frontend --- packages/forms/resources/views/components/wizard.blade.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/forms/resources/views/components/wizard.blade.php b/packages/forms/resources/views/components/wizard.blade.php index 31baa81ae4..c9c5d2968d 100644 --- a/packages/forms/resources/views/components/wizard.blade.php +++ b/packages/forms/resources/views/components/wizard.blade.php @@ -29,6 +29,12 @@ return } + $wire.dispatchFormEvent( + 'wizard::previousStep', + '{{ $statePath }}', + this.getStepIndex(this.step), + ) + this.step = this.getSteps()[previousStepIndex] this.autofocusFields() From 2f80f201d8b82355ee8379d0b6d95c856b9988f4 Mon Sep 17 00:00:00 2001 From: Edu Date: Thu, 20 Jun 2024 15:53:23 -0300 Subject: [PATCH 20/30] phpstan fixes --- packages/forms/src/Testing/TestsForms.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/forms/src/Testing/TestsForms.php b/packages/forms/src/Testing/TestsForms.php index 66058020c5..7a5a67c359 100644 --- a/packages/forms/src/Testing/TestsForms.php +++ b/packages/forms/src/Testing/TestsForms.php @@ -413,7 +413,7 @@ class TestsForms $form = $this->instance()->{$formName}; /** - * @var $wizard Wizard + * @var Wizard $wizard */ $wizard = $form->getComponent(fn ($component) => $component instanceof Wizard); Assert::assertTrue(count($wizard->getChildComponents()) >= $step, "Wizard does not have a step $step"); @@ -432,7 +432,7 @@ class TestsForms $form = $this->instance()->{$formName}; /** - * @var $wizard Wizard + * @var Wizard $wizard */ $wizard = $form->getComponent(fn ($component) => $component instanceof Wizard); Assert::assertEquals( @@ -455,7 +455,7 @@ class TestsForms $form = $this->instance()->{$formName}; /** - * @var $wizardComponent Wizard + * @var Wizard $wizardComponent */ $wizardComponent = $form->getComponent(fn ($component) => $component instanceof Wizard); if ($desiredStep === -1) { @@ -479,11 +479,12 @@ class TestsForms $form = $this->instance()->{$formName}; /** - * @var $wizardComponent Wizard + * @var Wizard $wizardComponent */ $wizardComponent = $form->getComponent(fn ($component) => $component instanceof Wizard); $nextStep = $wizardComponent->getCurrentStepIndex() + 2; + /** @phpstan-ignore-next-line */ return $this->goToWizardStep($nextStep, $formName); }; } @@ -498,7 +499,7 @@ class TestsForms $form = $this->instance()->{$formName}; /** - * @var $wizardComponent Wizard + * @var Wizard $wizardComponent */ $wizardComponent = $form->getComponent(fn ($component) => $component instanceof Wizard); $previousStepIndex = $wizardComponent->getCurrentStepIndex() - 1; From 3456f30b1cd42d6f24ebe9a487a824df0f0216e5 Mon Sep 17 00:00:00 2001 From: Luis Parrado Date: Fri, 26 Jul 2024 13:26:45 -0500 Subject: [PATCH 21/30] Update Spanish translations (import, actions modals) --- packages/actions/resources/lang/es/import.php | 6 +++ .../forms/resources/lang/es/components.php | 54 ++++++++++++++++++- 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/packages/actions/resources/lang/es/import.php b/packages/actions/resources/lang/es/import.php index 0069ccbd16..dc1fea6d4b 100644 --- a/packages/actions/resources/lang/es/import.php +++ b/packages/actions/resources/lang/es/import.php @@ -11,8 +11,14 @@ return [ 'form' => [ 'file' => [ + 'label' => 'Archivo', + 'placeholder' => 'Cargar un archivo CSV', + + 'rules' => [ + 'duplicate_columns' => '{0} El archivo no debe contener más de un encabezado de columna vacío.|{1,*} El archivo no debe contener encabezados de columna duplicados: :columns.', + ], ], 'columns' => [ diff --git a/packages/forms/resources/lang/es/components.php b/packages/forms/resources/lang/es/components.php index ff9a7eafc5..38ccee10bf 100644 --- a/packages/forms/resources/lang/es/components.php +++ b/packages/forms/resources/lang/es/components.php @@ -11,17 +11,69 @@ return [ ], 'add' => [ + 'label' => 'Añadir a :label', + + 'modal' => [ + + 'heading' => 'Añadir a :label', + + 'actions' => [ + + 'add' => [ + 'label' => 'Añadir', + ], + + ], + + ], + ], 'add_between' => [ - 'label' => 'Insertar', + + 'label' => 'Insertar entre bloques', + + 'modal' => [ + + 'heading' => 'Añadir a :label', + + 'actions' => [ + + 'add' => [ + 'label' => 'Añadir', + ], + + ], + + ], + ], 'delete' => [ 'label' => 'Borrar', ], + 'edit' => [ + + 'label' => 'Editar', + + 'modal' => [ + + 'heading' => 'Editar bloque', + + 'actions' => [ + + 'save' => [ + 'label' => 'Guardar cambios', + ], + + ], + + ], + + ], + 'reorder' => [ 'label' => 'Mover', ], From c274ae5a506d077be9e3d0504df72ed06ab807b0 Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 28 Jul 2024 16:00:43 -0300 Subject: [PATCH 22/30] Remove event --- packages/forms/resources/views/components/wizard.blade.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/forms/resources/views/components/wizard.blade.php b/packages/forms/resources/views/components/wizard.blade.php index c9c5d2968d..31baa81ae4 100644 --- a/packages/forms/resources/views/components/wizard.blade.php +++ b/packages/forms/resources/views/components/wizard.blade.php @@ -29,12 +29,6 @@ return } - $wire.dispatchFormEvent( - 'wizard::previousStep', - '{{ $statePath }}', - this.getStepIndex(this.step), - ) - this.step = this.getSteps()[previousStepIndex] this.autofocusFields() From 98275a653b28cbb6c3510124057e9759a6904285 Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 28 Jul 2024 16:01:18 -0300 Subject: [PATCH 23/30] Update method and use it on setUp --- packages/forms/src/Components/Wizard.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/forms/src/Components/Wizard.php b/packages/forms/src/Components/Wizard.php index e878d8207b..216449dc0a 100644 --- a/packages/forms/src/Components/Wizard.php +++ b/packages/forms/src/Components/Wizard.php @@ -60,7 +60,7 @@ class Wizard extends Component { parent::setUp(); - $this->currentStepIndex = $this->getStartStep() - 1; + $this->setCurrentStepIndex($this->getStartStep() - 1); $this->registerActions([ fn (Wizard $component): Action => $component->getNextAction(), @@ -266,15 +266,15 @@ class Wizard extends Component return filled($this->getStepQueryStringKey()); } - private function setCurrentStepIndex(int $currentStepIndex): static + public function getCurrentStepIndex(): int + { + return $this->currentStepIndex; + } + + protected function setCurrentStepIndex(int $currentStepIndex): static { $this->currentStepIndex = $currentStepIndex; return $this; } - - public function getCurrentStepIndex(): int - { - return $this->currentStepIndex; - } } From dc157ac54923389098f96aec407ff66067d6d5e8 Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 28 Jul 2024 16:25:18 -0300 Subject: [PATCH 24/30] Rename parameter --- packages/forms/src/Components/Wizard.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/forms/src/Components/Wizard.php b/packages/forms/src/Components/Wizard.php index 216449dc0a..6b13de47ed 100644 --- a/packages/forms/src/Components/Wizard.php +++ b/packages/forms/src/Components/Wizard.php @@ -271,9 +271,9 @@ class Wizard extends Component return $this->currentStepIndex; } - protected function setCurrentStepIndex(int $currentStepIndex): static + protected function setCurrentStepIndex(int $index): static { - $this->currentStepIndex = $currentStepIndex; + $this->currentStepIndex = $index; return $this; } From 05a8a8b80e387b5d3dd205e3213cb78b0174f50c Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 28 Jul 2024 16:28:17 -0300 Subject: [PATCH 25/30] Update test helpers --- packages/forms/.stubs.php | 2 +- packages/forms/src/Testing/TestsForms.php | 46 +++++++------------ tests/src/Forms/FormsTest.php | 7 +-- .../Pages/CreateRecordUsingWizardTest.php | 23 +++------- 4 files changed, 25 insertions(+), 53 deletions(-) diff --git a/packages/forms/.stubs.php b/packages/forms/.stubs.php index 529527cb7f..889e4ee66b 100644 --- a/packages/forms/.stubs.php +++ b/packages/forms/.stubs.php @@ -97,7 +97,7 @@ namespace Livewire\Features\SupportTesting { public function assertWizardStepExists(int $step, string $formName = 'form'): static {} - public function assertWizardCurrentStepIs(int $step, string $formName = 'form'): static {} + public function assertWizardCurrentStep(int $step, string $formName = 'form'): static {} } } diff --git a/packages/forms/src/Testing/TestsForms.php b/packages/forms/src/Testing/TestsForms.php index 7a5a67c359..7fad34ab55 100644 --- a/packages/forms/src/Testing/TestsForms.php +++ b/packages/forms/src/Testing/TestsForms.php @@ -412,17 +412,19 @@ class TestsForms /** @var ComponentContainer $form */ $form = $this->instance()->{$formName}; - /** - * @var Wizard $wizard - */ + /** @var Wizard $wizard */ $wizard = $form->getComponent(fn ($component) => $component instanceof Wizard); - Assert::assertTrue(count($wizard->getChildComponents()) >= $step, "Wizard does not have a step $step"); + Assert::assertArrayHasKey( + $step, + $wizard->getChildComponents(), + "Wizard does not have a step {$step}" + ); return $this; }; } - public function assertWizardCurrentStepIs(): Closure + public function assertWizardCurrentStep(): Closure { return function (int $step, string $formName = 'form'): static { /** @phpstan-ignore-next-line */ @@ -431,14 +433,12 @@ class TestsForms /** @var ComponentContainer $form */ $form = $this->instance()->{$formName}; - /** - * @var Wizard $wizard - */ - $wizard = $form->getComponent(fn ($component) => $component instanceof Wizard); + /** @var Wizard $wizard */ + $wizard = $form->getComponent(fn (Component $component): bool => $component instanceof Wizard); Assert::assertEquals( $step, $current = $wizard->getCurrentStepIndex() + 1, - "Failed asserting that wizard is on step $step, current step is {$current}" + "Failed asserting that wizard is on step {$step}, current step is {$current}" ); return $this; @@ -447,22 +447,14 @@ class TestsForms public function goToWizardStep(): Closure { - return function (int $desiredStep = 1, string $formName = 'form'): static { + return function (int $step = 1, string $formName = 'form'): static { /** @phpstan-ignore-next-line */ - $this->assertWizardStepExists($desiredStep, $formName); + $this->assertWizardStepExists($step, $formName); /** @var ComponentContainer $form */ $form = $this->instance()->{$formName}; - /** - * @var Wizard $wizardComponent - */ - $wizardComponent = $form->getComponent(fn ($component) => $component instanceof Wizard); - if ($desiredStep === -1) { - $desiredStep = count($wizardComponent->getChildComponents()) + 1; - } - - $stepIndex = $desiredStep <= 1 ? 0 : $desiredStep - 2; + $stepIndex = $step <= 1 ? 0 : $step - 2; $this->call('dispatchFormEvent', 'wizard::nextStep', $form->getStatePath(), $stepIndex); return $this; @@ -478,10 +470,8 @@ class TestsForms /** @var ComponentContainer $form */ $form = $this->instance()->{$formName}; - /** - * @var Wizard $wizardComponent - */ - $wizardComponent = $form->getComponent(fn ($component) => $component instanceof Wizard); + /** @var Wizard $wizardComponent */ + $wizardComponent = $form->getComponent(fn (Component $component): bool => $component instanceof Wizard); $nextStep = $wizardComponent->getCurrentStepIndex() + 2; /** @phpstan-ignore-next-line */ @@ -498,10 +488,8 @@ class TestsForms /** @var ComponentContainer $form */ $form = $this->instance()->{$formName}; - /** - * @var Wizard $wizardComponent - */ - $wizardComponent = $form->getComponent(fn ($component) => $component instanceof Wizard); + /** @var Wizard $wizardComponent */ + $wizardComponent = $form->getComponent(fn (Component $component): bool => $component instanceof Wizard); $previousStepIndex = $wizardComponent->getCurrentStepIndex() - 1; $this->call('dispatchFormEvent', 'wizard::previousStep', $form->getStatePath(), $previousStepIndex); diff --git a/tests/src/Forms/FormsTest.php b/tests/src/Forms/FormsTest.php index b256cd9f69..3368eb4155 100644 --- a/tests/src/Forms/FormsTest.php +++ b/tests/src/Forms/FormsTest.php @@ -120,12 +120,7 @@ it('can go to next wizard step on multiple forms', function () { ->assertWizardStepExists(2, 'fooForm') ->goToWizardStep(2, formName: 'fooForm') ->assertHasFormErrors(['title'], 'fooForm') - ->assertHasNoFormErrors(['title'], 'barForm') - - ->goToWizardStep(-1, formName: 'barForm') - ->assertHasNoFormErrors(['title'], 'barForm') - ->assertHasFormErrors(['content'], 'barForm') - ->assertHasNoFormErrors(['content'], 'fooForm'); + ->assertHasNoFormErrors(['title'], 'barForm'); }); class TestComponentWithForm extends Livewire diff --git a/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php b/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php index 6666473a90..f81191d810 100644 --- a/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php +++ b/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php @@ -14,40 +14,29 @@ it('it validates the current wizard step when moving to the next wizard step', f ->assertHasNoFormErrors(['content']) ->fillForm(['title' => 'Test title']) ->goToWizardStep(2) - ->assertHasNoFormErrors() - ->goToWizardStep(-1) // last step - ->assertHasFormErrors(['content']) - ->assertHasNoFormErrors(['title']); + ->assertHasNoFormErrors(); }); it('it verifies what wizard step we are currently in', function () { livewire(CreatePostUsingWizard::class) - ->assertWizardCurrentStepIs(1) + ->assertWizardCurrentStep(1) ->fillForm(['title' => 'Test title']) ->goToWizardStep(2) - ->assertWizardCurrentStepIs(2); -}); - -it('it goes to the last wizard step', function () { - livewire(CreatePostUsingWizard::class) - ->fillForm(['content' => 'Test content']) - ->assertWizardCurrentStepIs(1) - ->goToWizardStep(-1) - ->assertWizardCurrentStepIs(3); + ->assertWizardCurrentStep(2); }); it('it goes to the next wizard step', function () { livewire(CreatePostUsingWizard::class) ->fillForm(['title' => 'Test title']) ->goToNextWizardStep() - ->assertWizardCurrentStepIs(2); + ->assertWizardCurrentStep(2); }); it('it goes to the previous wizard step', function () { livewire(CreatePostUsingWizard::class) ->fillForm(['title' => 'Test title']) ->goToNextWizardStep() - ->assertWizardCurrentStepIs(2) + ->assertWizardCurrentStep(2) ->goToPreviousWizardStep() - ->assertWizardCurrentStepIs(1); + ->assertWizardCurrentStep(1); }); From 6f3c78d231e30eedb5f0e03eaecdd9b13b9c4371 Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 28 Jul 2024 16:32:07 -0300 Subject: [PATCH 26/30] Fix index assertion --- packages/forms/src/Testing/TestsForms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/forms/src/Testing/TestsForms.php b/packages/forms/src/Testing/TestsForms.php index 7fad34ab55..b551092689 100644 --- a/packages/forms/src/Testing/TestsForms.php +++ b/packages/forms/src/Testing/TestsForms.php @@ -415,7 +415,7 @@ class TestsForms /** @var Wizard $wizard */ $wizard = $form->getComponent(fn ($component) => $component instanceof Wizard); Assert::assertArrayHasKey( - $step, + $step - 1, $wizard->getChildComponents(), "Wizard does not have a step {$step}" ); From 3c325517ec21190b6403dbed883cca46effb0844 Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 28 Jul 2024 16:34:47 -0300 Subject: [PATCH 27/30] update docs --- packages/forms/docs/09-testing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/forms/docs/09-testing.md b/packages/forms/docs/09-testing.md index ee424c4296..415b626a38 100644 --- a/packages/forms/docs/09-testing.md +++ b/packages/forms/docs/09-testing.md @@ -312,7 +312,7 @@ it('moves to next wizard step', function () { }); ``` -If you want to go to a specific step, use `goToWizardStep`, the `assertWizardCurrentStepIs` method can ensure you are on the desired step: +If you want to go to a specific step, use `goToWizardStep`, the `assertWizardCurrentStep` method can ensure you are on the desired step: ```php use function Pest\Livewire\livewire; @@ -320,7 +320,7 @@ use function Pest\Livewire\livewire; it('moves to the wizards second step', function () { livewire(CreatePostUsingWizard::class) ->goToWizardStep(2) - ->assertWizardCurrentStepIs(2); + ->assertWizardCurrentStep(2); }); ``` From 5e1344d3c5c00d66406ea61fd86d6af89cc3622f Mon Sep 17 00:00:00 2001 From: Edu Date: Sun, 28 Jul 2024 16:48:38 -0300 Subject: [PATCH 28/30] Type callable --- packages/forms/src/Testing/TestsForms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/forms/src/Testing/TestsForms.php b/packages/forms/src/Testing/TestsForms.php index b551092689..d0910fd132 100644 --- a/packages/forms/src/Testing/TestsForms.php +++ b/packages/forms/src/Testing/TestsForms.php @@ -413,7 +413,7 @@ class TestsForms $form = $this->instance()->{$formName}; /** @var Wizard $wizard */ - $wizard = $form->getComponent(fn ($component) => $component instanceof Wizard); + $wizard = $form->getComponent(fn (Component $component): bool => $component instanceof Wizard); Assert::assertArrayHasKey( $step - 1, $wizard->getChildComponents(), From 768af7682f1d5904dfe31ffaeeb80602655bef07 Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Tue, 30 Jul 2024 12:20:32 +0100 Subject: [PATCH 29/30] clean up --- packages/forms/.stubs.php | 2 +- packages/forms/docs/09-testing.md | 16 ++++++++-------- packages/forms/src/Testing/TestsForms.php | 6 +++--- .../PostResource/Pages/CreatePostUsingWizard.php | 1 + 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/packages/forms/.stubs.php b/packages/forms/.stubs.php index 889e4ee66b..0a286cb12f 100644 --- a/packages/forms/.stubs.php +++ b/packages/forms/.stubs.php @@ -89,7 +89,7 @@ namespace Livewire\Features\SupportTesting { public function parseNestedFormComponentActionComponentAndName(string | array $component, string | array $name, string $formName = 'form'): static {} - public function goToWizardStep(int $desiredStep, string $formName = 'form'): static {} + public function goToWizardStep(int $step, string $formName = 'form'): static {} public function goToNextWizardStep(string $formName = 'form'): static {} diff --git a/packages/forms/docs/09-testing.md b/packages/forms/docs/09-testing.md index 415b626a38..93f87ce25c 100644 --- a/packages/forms/docs/09-testing.md +++ b/packages/forms/docs/09-testing.md @@ -288,49 +288,49 @@ test('comments section is enabled' function () { ### Wizard -To call a wizard's next step, use the `goToNextWizardStep()` method: +To go to a wizard's next step, use `goToNextWizardStep()`: ```php use function Pest\Livewire\livewire; it('moves to next wizard step', function () { - livewire(CreatePostUsingWizard::class) + livewire(CreatePost::class) ->goToNextWizardStep() ->assertHasFormErrors(['title']); }); ``` -You can also go to the previous step by calling `goToPreviousWizardStep()` method: +You can also go to the previous step by calling `goToPreviousWizardStep()`: ```php use function Pest\Livewire\livewire; it('moves to next wizard step', function () { - livewire(CreatePostUsingWizard::class) + livewire(CreatePost::class) ->goToPreviousWizardStep() ->assertHasFormErrors(['title']); }); ``` -If you want to go to a specific step, use `goToWizardStep`, the `assertWizardCurrentStep` method can ensure you are on the desired step: +If you want to go to a specific step, use `goToWizardStep()`, then the `assertWizardCurrentStep` method which can ensure you are on the desired step without validation errors from the previous: ```php use function Pest\Livewire\livewire; it('moves to the wizards second step', function () { - livewire(CreatePostUsingWizard::class) + livewire(CreatePost::class) ->goToWizardStep(2) ->assertWizardCurrentStep(2); }); ``` -If you have multiple forms on a single component, any of the wizard test helpers can accept a formName parameter: +If you have multiple forms on a single Livewire component, any of the wizard test helpers can accept a `formName` parameter: ```php use function Pest\Livewire\livewire; it('moves to next wizard step only for fooForm', function () { - livewire(CreatePostUsingWizard::class) + livewire(CreatePost::class) ->goToNextWizardStep(formName: 'fooForm') ->assertHasFormErrors(['title'], formName: 'fooForm'); }); diff --git a/packages/forms/src/Testing/TestsForms.php b/packages/forms/src/Testing/TestsForms.php index d0910fd132..ceebdeda32 100644 --- a/packages/forms/src/Testing/TestsForms.php +++ b/packages/forms/src/Testing/TestsForms.php @@ -417,7 +417,7 @@ class TestsForms Assert::assertArrayHasKey( $step - 1, $wizard->getChildComponents(), - "Wizard does not have a step {$step}" + "Wizard does not have a step {$step}." ); return $this; @@ -438,7 +438,7 @@ class TestsForms Assert::assertEquals( $step, $current = $wizard->getCurrentStepIndex() + 1, - "Failed asserting that wizard is on step {$step}, current step is {$current}" + "Failed asserting that wizard is on step {$step}, current step is {$current}." ); return $this; @@ -447,7 +447,7 @@ class TestsForms public function goToWizardStep(): Closure { - return function (int $step = 1, string $formName = 'form'): static { + return function (int $step, string $formName = 'form'): static { /** @phpstan-ignore-next-line */ $this->assertWizardStepExists($step, $formName); diff --git a/tests/src/Panels/Fixtures/Resources/PostResource/Pages/CreatePostUsingWizard.php b/tests/src/Panels/Fixtures/Resources/PostResource/Pages/CreatePostUsingWizard.php index 2e821d6f41..4e8b30b93e 100644 --- a/tests/src/Panels/Fixtures/Resources/PostResource/Pages/CreatePostUsingWizard.php +++ b/tests/src/Panels/Fixtures/Resources/PostResource/Pages/CreatePostUsingWizard.php @@ -13,6 +13,7 @@ class CreatePostUsingWizard extends CreateRecord use HasWizard; protected static string $resource = PostResource::class; + public function getSteps(): array { return [ From d1c70505e827cd491cd3fa57a8f10a38e3e42e0b Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Tue, 30 Jul 2024 12:22:18 +0100 Subject: [PATCH 30/30] Update composer.lock --- composer.lock | 552 +++++++++++++++++++++++++------------------------- 1 file changed, 276 insertions(+), 276 deletions(-) diff --git a/composer.lock b/composer.lock index fff91352a8..f54a3ac31d 100644 --- a/composer.lock +++ b/composer.lock @@ -9,16 +9,16 @@ "packages-dev": [ { "name": "anourvalar/eloquent-serialize", - "version": "1.2.22", + "version": "1.2.23", "source": { "type": "git", "url": "https://github.com/AnourValar/eloquent-serialize.git", - "reference": "6e91093c10940859c4b0549b6a90f18d8db45998" + "reference": "fd7bc1dc2c98fe705647ab4b81d13ea3d599ea1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/AnourValar/eloquent-serialize/zipball/6e91093c10940859c4b0549b6a90f18d8db45998", - "reference": "6e91093c10940859c4b0549b6a90f18d8db45998", + "url": "https://api.github.com/repos/AnourValar/eloquent-serialize/zipball/fd7bc1dc2c98fe705647ab4b81d13ea3d599ea1f", + "reference": "fd7bc1dc2c98fe705647ab4b81d13ea3d599ea1f", "shasum": "" }, "require": { @@ -69,9 +69,9 @@ ], "support": { "issues": "https://github.com/AnourValar/eloquent-serialize/issues", - "source": "https://github.com/AnourValar/eloquent-serialize/tree/1.2.22" + "source": "https://github.com/AnourValar/eloquent-serialize/tree/1.2.23" }, - "time": "2024-03-22T12:56:46+00:00" + "time": "2024-07-12T10:52:26+00:00" }, { "name": "aws/aws-crt-php", @@ -129,16 +129,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.316.2", + "version": "3.316.9", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "4d8caae512c3be4d59ee6d583b3f82872dde5071" + "reference": "33de264839fdaacf42460ada3b1b262190643b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/4d8caae512c3be4d59ee6d583b3f82872dde5071", - "reference": "4d8caae512c3be4d59ee6d583b3f82872dde5071", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/33de264839fdaacf42460ada3b1b262190643b6a", + "reference": "33de264839fdaacf42460ada3b1b262190643b6a", "shasum": "" }, "require": { @@ -146,9 +146,9 @@ "ext-json": "*", "ext-pcre": "*", "ext-simplexml": "*", - "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5", + "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5 <7.9.0", "guzzlehttp/promises": "^1.4.0 || ^2.0", - "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "guzzlehttp/psr7": "^1.9.1 || ^2.4.5 <2.7.0", "mtdowling/jmespath.php": "^2.6", "php": ">=7.2.5", "psr/http-message": "^1.0 || ^2.0" @@ -218,22 +218,22 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.316.2" + "source": "https://github.com/aws/aws-sdk-php/tree/3.316.9" }, - "time": "2024-07-10T19:16:28+00:00" + "time": "2024-07-29T19:23:04+00:00" }, { "name": "blade-ui-kit/blade-heroicons", - "version": "2.3.0", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/blade-ui-kit/blade-heroicons.git", - "reference": "a265dbcf2a098121aad05752d0bba9f59022e4ba" + "reference": "a7c377a4ef88cd54712e3e15cbed30446820da0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/blade-ui-kit/blade-heroicons/zipball/a265dbcf2a098121aad05752d0bba9f59022e4ba", - "reference": "a265dbcf2a098121aad05752d0bba9f59022e4ba", + "url": "https://api.github.com/repos/blade-ui-kit/blade-heroicons/zipball/a7c377a4ef88cd54712e3e15cbed30446820da0b", + "reference": "a7c377a4ef88cd54712e3e15cbed30446820da0b", "shasum": "" }, "require": { @@ -277,7 +277,7 @@ ], "support": { "issues": "https://github.com/blade-ui-kit/blade-heroicons/issues", - "source": "https://github.com/blade-ui-kit/blade-heroicons/tree/2.3.0" + "source": "https://github.com/blade-ui-kit/blade-heroicons/tree/2.4.0" }, "funding": [ { @@ -289,20 +289,20 @@ "type": "paypal" } ], - "time": "2024-02-07T16:33:46+00:00" + "time": "2024-07-16T07:00:01+00:00" }, { "name": "blade-ui-kit/blade-icons", - "version": "1.6.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/blade-ui-kit/blade-icons.git", - "reference": "89660d93f9897d231e9113ba203cd17f4c5efade" + "reference": "74275f44c71e815b85bf7cea66e3bf98c57fb7e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/blade-ui-kit/blade-icons/zipball/89660d93f9897d231e9113ba203cd17f4c5efade", - "reference": "89660d93f9897d231e9113ba203cd17f4c5efade", + "url": "https://api.github.com/repos/blade-ui-kit/blade-icons/zipball/74275f44c71e815b85bf7cea66e3bf98c57fb7e4", + "reference": "74275f44c71e815b85bf7cea66e3bf98c57fb7e4", "shasum": "" }, "require": { @@ -370,7 +370,7 @@ "type": "paypal" } ], - "time": "2024-02-07T16:09:20+00:00" + "time": "2024-07-29T21:49:30+00:00" }, { "name": "brianium/paratest", @@ -597,16 +597,16 @@ }, { "name": "composer/semver", - "version": "3.4.0", + "version": "3.4.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "url": "https://api.github.com/repos/composer/semver/zipball/c51258e759afdb17f1fd1fe83bc12baaef6309d6", + "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6", "shasum": "" }, "require": { @@ -658,7 +658,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.0" + "source": "https://github.com/composer/semver/tree/3.4.2" }, "funding": [ { @@ -674,7 +674,7 @@ "type": "tidelift" } ], - "time": "2023-08-31T09:50:34+00:00" + "time": "2024-07-12T11:35:52+00:00" }, { "name": "danharrin/livewire-rate-limiting", @@ -1766,24 +1766,24 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.1.2", + "version": "v1.1.3", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862" + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862", - "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.2" + "phpoption/phpoption": "^1.9.3" }, "require-dev": { - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "autoload": { @@ -1812,7 +1812,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" }, "funding": [ { @@ -1824,26 +1824,26 @@ "type": "tidelift" } ], - "time": "2023-11-12T22:16:48+00:00" + "time": "2024-07-20T21:45:45+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.8.1", + "version": "7.8.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" + "reference": "f4152d9eb85c445fe1f992001d1748e8bec070d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4152d9eb85c445fe1f992001d1748e8bec070d2", + "reference": "f4152d9eb85c445fe1f992001d1748e8bec070d2", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.1", - "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^1.9.1 || ^2.6.3", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -1854,9 +1854,9 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "guzzle/client-integration-tests": "3.0.2", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.36 || ^9.6.15", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -1934,7 +1934,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.8.1" + "source": "https://github.com/guzzle/guzzle/tree/7.8.2" }, "funding": [ { @@ -1950,20 +1950,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:35:24+00:00" + "time": "2024-07-18T11:12:18+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", + "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", "shasum": "" }, "require": { @@ -1971,7 +1971,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "type": "library", "extra": { @@ -2017,7 +2017,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.2" + "source": "https://github.com/guzzle/promises/tree/2.0.3" }, "funding": [ { @@ -2033,20 +2033,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:19:20+00:00" + "time": "2024-07-18T10:29:17+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.6.2", + "version": "2.6.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" + "reference": "6de29867b18790c0d2c846af4c13a24cc3ad56f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/6de29867b18790c0d2c846af4c13a24cc3ad56f3", + "reference": "6de29867b18790c0d2c846af4c13a24cc3ad56f3", "shasum": "" }, "require": { @@ -2061,8 +2061,8 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -2133,7 +2133,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.2" + "source": "https://github.com/guzzle/psr7/tree/2.6.3" }, "funding": [ { @@ -2149,7 +2149,7 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:05:35+00:00" + "time": "2024-07-18T09:59:12+00:00" }, { "name": "guzzlehttp/uri-template", @@ -2513,16 +2513,16 @@ }, { "name": "laravel/framework", - "version": "v11.15.0", + "version": "v11.18.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "ba85f1c019bed59b3c736c9c4502805efd0ba84b" + "reference": "b19ba518c56852567e99fbae9321bc436c2cc5a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/ba85f1c019bed59b3c736c9c4502805efd0ba84b", - "reference": "ba85f1c019bed59b3c736c9c4502805efd0ba84b", + "url": "https://api.github.com/repos/laravel/framework/zipball/b19ba518c56852567e99fbae9321bc436c2cc5a8", + "reference": "b19ba518c56852567e99fbae9321bc436c2cc5a8", "shasum": "" }, "require": { @@ -2715,20 +2715,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-07-09T15:38:12+00:00" + "time": "2024-07-26T10:39:29+00:00" }, { "name": "laravel/pint", - "version": "v1.16.2", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "51f1ba679a6afe0315621ad143d788bd7ded0eca" + "reference": "4dba80c1de4b81dc4c4fb10ea6f4781495eb29f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/51f1ba679a6afe0315621ad143d788bd7ded0eca", - "reference": "51f1ba679a6afe0315621ad143d788bd7ded0eca", + "url": "https://api.github.com/repos/laravel/pint/zipball/4dba80c1de4b81dc4c4fb10ea6f4781495eb29f5", + "reference": "4dba80c1de4b81dc4c4fb10ea6f4781495eb29f5", "shasum": "" }, "require": { @@ -2781,7 +2781,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-07-09T15:58:08+00:00" + "time": "2024-07-23T16:40:20+00:00" }, { "name": "laravel/prompts", @@ -2969,16 +2969,16 @@ }, { "name": "league/commonmark", - "version": "2.4.2", + "version": "2.5.1", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf" + "reference": "ac815920de0eff6de947eac0a6a94e5ed0fb147c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/91c24291965bd6d7c46c46a12ba7492f83b1cadf", - "reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/ac815920de0eff6de947eac0a6a94e5ed0fb147c", + "reference": "ac815920de0eff6de947eac0a6a94e5ed0fb147c", "shasum": "" }, "require": { @@ -2991,8 +2991,8 @@ }, "require-dev": { "cebe/markdown": "^1.0", - "commonmark/cmark": "0.30.3", - "commonmark/commonmark.js": "0.30.0", + "commonmark/cmark": "0.31.0", + "commonmark/commonmark.js": "0.31.0", "composer/package-versions-deprecated": "^1.8", "embed/embed": "^4.4", "erusev/parsedown": "^1.0", @@ -3014,7 +3014,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "2.6-dev" } }, "autoload": { @@ -3071,7 +3071,7 @@ "type": "tidelift" } ], - "time": "2024-02-02T11:59:32+00:00" + "time": "2024-07-24T12:52:09+00:00" }, { "name": "league/config", @@ -3662,16 +3662,16 @@ }, { "name": "livewire/livewire", - "version": "v3.5.2", + "version": "v3.5.4", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "636725c1f87bc7844dd80277488268db27eec1aa" + "reference": "b158c6386a892efc6c5e4682e682829baac1f933" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/636725c1f87bc7844dd80277488268db27eec1aa", - "reference": "636725c1f87bc7844dd80277488268db27eec1aa", + "url": "https://api.github.com/repos/livewire/livewire/zipball/b158c6386a892efc6c5e4682e682829baac1f933", + "reference": "b158c6386a892efc6c5e4682e682829baac1f933", "shasum": "" }, "require": { @@ -3726,7 +3726,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v3.5.2" + "source": "https://github.com/livewire/livewire/tree/v3.5.4" }, "funding": [ { @@ -3734,7 +3734,7 @@ "type": "github" } ], - "time": "2024-07-03T17:22:45+00:00" + "time": "2024-07-15T18:27:32+00:00" }, { "name": "maennchen/zipstream-php", @@ -4196,16 +4196,16 @@ }, { "name": "nesbot/carbon", - "version": "3.6.0", + "version": "3.7.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "39c8ef752db6865717cc3fba63970c16f057982c" + "reference": "cb4374784c87d0a0294e8513a52eb63c0aff3139" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/39c8ef752db6865717cc3fba63970c16f057982c", - "reference": "39c8ef752db6865717cc3fba63970c16f057982c", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/cb4374784c87d0a0294e8513a52eb63c0aff3139", + "reference": "cb4374784c87d0a0294e8513a52eb63c0aff3139", "shasum": "" }, "require": { @@ -4298,7 +4298,7 @@ "type": "tidelift" } ], - "time": "2024-06-20T15:52:59+00:00" + "time": "2024-07-16T22:29:20+00:00" }, { "name": "nette/schema", @@ -4508,38 +4508,38 @@ }, { "name": "nunomaduro/collision", - "version": "v8.1.1", + "version": "v8.3.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "13e5d538b95a744d85f447a321ce10adb28e9af9" + "reference": "b49f5b2891ce52726adfd162841c69d4e4c84229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/13e5d538b95a744d85f447a321ce10adb28e9af9", - "reference": "13e5d538b95a744d85f447a321ce10adb28e9af9", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/b49f5b2891ce52726adfd162841c69d4e4c84229", + "reference": "b49f5b2891ce52726adfd162841c69d4e4c84229", "shasum": "" }, "require": { "filp/whoops": "^2.15.4", "nunomaduro/termwind": "^2.0.1", "php": "^8.2.0", - "symfony/console": "^7.0.4" + "symfony/console": "^7.1.2" }, "conflict": { "laravel/framework": "<11.0.0 || >=12.0.0", "phpunit/phpunit": "<10.5.1 || >=12.0.0" }, "require-dev": { - "larastan/larastan": "^2.9.2", - "laravel/framework": "^11.0.0", - "laravel/pint": "^1.14.0", - "laravel/sail": "^1.28.2", - "laravel/sanctum": "^4.0.0", + "larastan/larastan": "^2.9.8", + "laravel/framework": "^11.16.0", + "laravel/pint": "^1.16.2", + "laravel/sail": "^1.30.2", + "laravel/sanctum": "^4.0.2", "laravel/tinker": "^2.9.0", - "orchestra/testbench-core": "^9.0.0", - "pestphp/pest": "^2.34.1 || ^3.0.0", - "sebastian/environment": "^6.0.1 || ^7.0.0" + "orchestra/testbench-core": "^9.2.1", + "pestphp/pest": "^2.34.9 || ^3.0.0", + "sebastian/environment": "^6.1.0 || ^7.0.0" }, "type": "library", "extra": { @@ -4601,7 +4601,7 @@ "type": "patreon" } ], - "time": "2024-03-06T16:20:09+00:00" + "time": "2024-07-16T22:41:01+00:00" }, { "name": "nunomaduro/termwind", @@ -4693,16 +4693,16 @@ }, { "name": "openspout/openspout", - "version": "v4.24.2", + "version": "v4.24.5", "source": { "type": "git", "url": "https://github.com/openspout/openspout.git", - "reference": "24272c1f7d073cc64fa3ecc2a863dc5d13be33a8" + "reference": "393299ae21153f042f48b185f2adeb4b157d1d93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/openspout/openspout/zipball/24272c1f7d073cc64fa3ecc2a863dc5d13be33a8", - "reference": "24272c1f7d073cc64fa3ecc2a863dc5d13be33a8", + "url": "https://api.github.com/repos/openspout/openspout/zipball/393299ae21153f042f48b185f2adeb4b157d1d93", + "reference": "393299ae21153f042f48b185f2adeb4b157d1d93", "shasum": "" }, "require": { @@ -4716,13 +4716,13 @@ }, "require-dev": { "ext-zlib": "*", - "friendsofphp/php-cs-fixer": "^3.59.3", - "infection/infection": "^0.29.5", - "phpbench/phpbench": "^1.2.15", - "phpstan/phpstan": "^1.11.4", + "friendsofphp/php-cs-fixer": "^3.60.0", + "infection/infection": "^0.29.6", + "phpbench/phpbench": "^1.3.1", + "phpstan/phpstan": "^1.11.8", "phpstan/phpstan-phpunit": "^1.4.0", "phpstan/phpstan-strict-rules": "^1.6.0", - "phpunit/phpunit": "^10.5.20 || ^11.2.2" + "phpunit/phpunit": "^10.5.20 || ^11.2.8" }, "suggest": { "ext-iconv": "To handle non UTF-8 CSV files (if \"php-mbstring\" is not already installed or is too limited)", @@ -4770,7 +4770,7 @@ ], "support": { "issues": "https://github.com/openspout/openspout/issues", - "source": "https://github.com/openspout/openspout/tree/v4.24.2" + "source": "https://github.com/openspout/openspout/tree/v4.24.5" }, "funding": [ { @@ -4782,37 +4782,37 @@ "type": "github" } ], - "time": "2024-06-17T08:53:37+00:00" + "time": "2024-07-26T05:48:04+00:00" }, { "name": "orchestra/canvas", - "version": "v9.0.3", + "version": "v9.1.0", "source": { "type": "git", "url": "https://github.com/orchestral/canvas.git", - "reference": "bed541346ffae1b9246afae4d196e8fc10ac9067" + "reference": "fba331ea9dd3bbf96f72aadcb48a77f43c2f4145" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/canvas/zipball/bed541346ffae1b9246afae4d196e8fc10ac9067", - "reference": "bed541346ffae1b9246afae4d196e8fc10ac9067", + "url": "https://api.github.com/repos/orchestral/canvas/zipball/fba331ea9dd3bbf96f72aadcb48a77f43c2f4145", + "reference": "fba331ea9dd3bbf96f72aadcb48a77f43c2f4145", "shasum": "" }, "require": { "composer-runtime-api": "^2.2", "composer/semver": "^3.0", - "illuminate/console": "^11.10", - "illuminate/database": "^11.10", - "illuminate/filesystem": "^11.10", - "illuminate/support": "^11.10", + "illuminate/console": "^11.16", + "illuminate/database": "^11.16", + "illuminate/filesystem": "^11.16", + "illuminate/support": "^11.16", "orchestra/canvas-core": "^9.0", - "orchestra/testbench-core": "^9.0", + "orchestra/testbench-core": "^9.2", "php": "^8.2", "symfony/polyfill-php83": "^1.28", "symfony/yaml": "^7.0" }, "require-dev": { - "laravel/framework": "^11.10", + "laravel/framework": "^11.16", "laravel/pint": "^1.6", "mockery/mockery": "^1.6", "phpstan/phpstan": "^1.11", @@ -4855,9 +4855,9 @@ "description": "Code Generators for Laravel Applications and Packages", "support": { "issues": "https://github.com/orchestral/canvas/issues", - "source": "https://github.com/orchestral/canvas/tree/v9.0.3" + "source": "https://github.com/orchestral/canvas/tree/v9.1.0" }, - "time": "2024-06-18T10:10:33+00:00" + "time": "2024-07-16T23:01:15+00:00" }, { "name": "orchestra/canvas-core", @@ -4929,24 +4929,24 @@ }, { "name": "orchestra/testbench", - "version": "v9.1.2", + "version": "v9.2.0", "source": { "type": "git", "url": "https://github.com/orchestral/testbench.git", - "reference": "e3aa89ddfc76c22c65bf653f220bb906c26726a1" + "reference": "ccf7c9bdb6b15201a9c91a8cd0d60db721147987" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench/zipball/e3aa89ddfc76c22c65bf653f220bb906c26726a1", - "reference": "e3aa89ddfc76c22c65bf653f220bb906c26726a1", + "url": "https://api.github.com/repos/orchestral/testbench/zipball/ccf7c9bdb6b15201a9c91a8cd0d60db721147987", + "reference": "ccf7c9bdb6b15201a9c91a8cd0d60db721147987", "shasum": "" }, "require": { "composer-runtime-api": "^2.2", "fakerphp/faker": "^1.23", - "laravel/framework": "^11.7", + "laravel/framework": "^11.11", "mockery/mockery": "^1.6", - "orchestra/testbench-core": "^9.1.3", + "orchestra/testbench-core": "^9.2", "orchestra/workbench": "^9.1", "php": "^8.2", "phpunit/phpunit": "^10.5 || ^11.0.1", @@ -4978,22 +4978,22 @@ ], "support": { "issues": "https://github.com/orchestral/testbench/issues", - "source": "https://github.com/orchestral/testbench/tree/v9.1.2" + "source": "https://github.com/orchestral/testbench/tree/v9.2.0" }, - "time": "2024-06-04T12:30:43+00:00" + "time": "2024-07-13T07:23:13+00:00" }, { "name": "orchestra/testbench-core", - "version": "v9.1.9", + "version": "v9.2.2", "source": { "type": "git", "url": "https://github.com/orchestral/testbench-core.git", - "reference": "872742adfc2a05c4ae6b0b4f1eb8961575ec2580" + "reference": "e0283b4fadbfa0104ea9ad772a390a5bfec602f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/872742adfc2a05c4ae6b0b4f1eb8961575ec2580", - "reference": "872742adfc2a05c4ae6b0b4f1eb8961575ec2580", + "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/e0283b4fadbfa0104ea9ad772a390a5bfec602f0", + "reference": "e0283b4fadbfa0104ea9ad772a390a5bfec602f0", "shasum": "" }, "require": { @@ -5003,13 +5003,13 @@ }, "conflict": { "brianium/paratest": "<7.3.0 || >=8.0.0", - "laravel/framework": "<11.1.0 || >=12.0.0", + "laravel/framework": "<11.11.0 || >=12.0.0", "nunomaduro/collision": "<8.0.0 || >=9.0.0", "phpunit/phpunit": "<10.5.0 || 11.0.0 || >=11.3.0" }, "require-dev": { "fakerphp/faker": "^1.23", - "laravel/framework": "^11.1", + "laravel/framework": "^11.11", "laravel/pint": "^1.6", "mockery/mockery": "^1.6", "phpstan/phpstan": "^1.11", @@ -5069,7 +5069,7 @@ "issues": "https://github.com/orchestral/testbench/issues", "source": "https://github.com/orchestral/testbench-core" }, - "time": "2024-07-10T01:22:27+00:00" + "time": "2024-07-19T10:35:39+00:00" }, { "name": "orchestra/workbench", @@ -5635,16 +5635,16 @@ }, { "name": "php-di/php-di", - "version": "7.0.6", + "version": "7.0.7", "source": { "type": "git", "url": "https://github.com/PHP-DI/PHP-DI.git", - "reference": "8097948a89f6ec782839b3e958432f427cac37fd" + "reference": "e87435e3c0e8f22977adc5af0d5cdcc467e15cf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/PHP-DI/zipball/8097948a89f6ec782839b3e958432f427cac37fd", - "reference": "8097948a89f6ec782839b3e958432f427cac37fd", + "url": "https://api.github.com/repos/PHP-DI/PHP-DI/zipball/e87435e3c0e8f22977adc5af0d5cdcc467e15cf1", + "reference": "e87435e3c0e8f22977adc5af0d5cdcc467e15cf1", "shasum": "" }, "require": { @@ -5692,7 +5692,7 @@ ], "support": { "issues": "https://github.com/PHP-DI/PHP-DI/issues", - "source": "https://github.com/PHP-DI/PHP-DI/tree/7.0.6" + "source": "https://github.com/PHP-DI/PHP-DI/tree/7.0.7" }, "funding": [ { @@ -5704,7 +5704,7 @@ "type": "tidelift" } ], - "time": "2023-11-02T10:04:50+00:00" + "time": "2024-07-21T15:55:45+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -5971,16 +5971,16 @@ }, { "name": "phpoption/phpoption", - "version": "1.9.2", + "version": "1.9.3", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", - "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", "shasum": "" }, "require": { @@ -5988,13 +5988,13 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { "dev-master": "1.9-dev" @@ -6030,7 +6030,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" }, "funding": [ { @@ -6042,7 +6042,7 @@ "type": "tidelift" } ], - "time": "2023-11-12T21:59:55+00:00" + "time": "2024-07-20T21:41:07+00:00" }, { "name": "phpstan/extension-installer", @@ -7382,16 +7382,16 @@ }, { "name": "rector/rector", - "version": "1.2.0", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "2fa387553db22b6f9bcccf5ff16f2c2c18a52a65" + "reference": "044e6364017882d1e346da8690eeabc154da5495" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/2fa387553db22b6f9bcccf5ff16f2c2c18a52a65", - "reference": "2fa387553db22b6f9bcccf5ff16f2c2c18a52a65", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/044e6364017882d1e346da8690eeabc154da5495", + "reference": "044e6364017882d1e346da8690eeabc154da5495", "shasum": "" }, "require": { @@ -7429,7 +7429,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/1.2.0" + "source": "https://github.com/rectorphp/rector/tree/1.2.2" }, "funding": [ { @@ -7437,7 +7437,7 @@ "type": "github" } ], - "time": "2024-07-01T14:24:45+00:00" + "time": "2024-07-25T07:44:34+00:00" }, { "name": "ryangjchandler/blade-capture-directive", @@ -8435,16 +8435,16 @@ }, { "name": "spatie/backtrace", - "version": "1.6.1", + "version": "1.6.2", "source": { "type": "git", "url": "https://github.com/spatie/backtrace.git", - "reference": "8373b9d51638292e3bfd736a9c19a654111b4a23" + "reference": "1a9a145b044677ae3424693f7b06479fc8c137a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/backtrace/zipball/8373b9d51638292e3bfd736a9c19a654111b4a23", - "reference": "8373b9d51638292e3bfd736a9c19a654111b4a23", + "url": "https://api.github.com/repos/spatie/backtrace/zipball/1a9a145b044677ae3424693f7b06479fc8c137a9", + "reference": "1a9a145b044677ae3424693f7b06479fc8c137a9", "shasum": "" }, "require": { @@ -8482,7 +8482,7 @@ "spatie" ], "support": { - "source": "https://github.com/spatie/backtrace/tree/1.6.1" + "source": "https://github.com/spatie/backtrace/tree/1.6.2" }, "funding": [ { @@ -8494,7 +8494,7 @@ "type": "other" } ], - "time": "2024-04-24T13:22:11+00:00" + "time": "2024-07-22T08:21:24+00:00" }, { "name": "spatie/color", @@ -8631,16 +8631,16 @@ }, { "name": "spatie/image", - "version": "3.6.4", + "version": "3.7.2", "source": { "type": "git", "url": "https://github.com/spatie/image.git", - "reference": "324a7bfc7924f8dc7d90777e33097a63f0199b1c" + "reference": "9c3ec3109b66f38a6427b56f18b9e921a2111be1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/image/zipball/324a7bfc7924f8dc7d90777e33097a63f0199b1c", - "reference": "324a7bfc7924f8dc7d90777e33097a63f0199b1c", + "url": "https://api.github.com/repos/spatie/image/zipball/9c3ec3109b66f38a6427b56f18b9e921a2111be1", + "reference": "9c3ec3109b66f38a6427b56f18b9e921a2111be1", "shasum": "" }, "require": { @@ -8687,7 +8687,7 @@ "spatie" ], "support": { - "source": "https://github.com/spatie/image/tree/3.6.4" + "source": "https://github.com/spatie/image/tree/3.7.2" }, "funding": [ { @@ -8699,7 +8699,7 @@ "type": "github" } ], - "time": "2024-06-03T08:10:31+00:00" + "time": "2024-07-26T13:44:46+00:00" }, { "name": "spatie/image-optimizer", @@ -8817,16 +8817,16 @@ }, { "name": "spatie/laravel-medialibrary", - "version": "11.7.3", + "version": "11.8.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-medialibrary.git", - "reference": "c3828e7558473d9df0803212c68d61d91173a3ab" + "reference": "91a0aaea20f31462bc748c94370eb5fdc0d7e29f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/c3828e7558473d9df0803212c68d61d91173a3ab", - "reference": "c3828e7558473d9df0803212c68d61d91173a3ab", + "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/91a0aaea20f31462bc748c94370eb5fdc0d7e29f", + "reference": "91a0aaea20f31462bc748c94370eb5fdc0d7e29f", "shasum": "" }, "require": { @@ -8910,7 +8910,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-medialibrary/issues", - "source": "https://github.com/spatie/laravel-medialibrary/tree/11.7.3" + "source": "https://github.com/spatie/laravel-medialibrary/tree/11.8.1" }, "funding": [ { @@ -8922,7 +8922,7 @@ "type": "github" } ], - "time": "2024-07-02T13:37:35+00:00" + "time": "2024-07-26T07:43:05+00:00" }, { "name": "spatie/laravel-package-tools", @@ -8986,16 +8986,16 @@ }, { "name": "spatie/laravel-ray", - "version": "1.37.0", + "version": "1.37.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ray.git", - "reference": "f57b294a3815be37effa9d13f54f2fbe5a2fff37" + "reference": "c2bedfd1172648df2c80aaceb2541d70f1d9a5b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/f57b294a3815be37effa9d13f54f2fbe5a2fff37", - "reference": "f57b294a3815be37effa9d13f54f2fbe5a2fff37", + "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/c2bedfd1172648df2c80aaceb2541d70f1d9a5b9", + "reference": "c2bedfd1172648df2c80aaceb2541d70f1d9a5b9", "shasum": "" }, "require": { @@ -9057,7 +9057,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-ray/issues", - "source": "https://github.com/spatie/laravel-ray/tree/1.37.0" + "source": "https://github.com/spatie/laravel-ray/tree/1.37.1" }, "funding": [ { @@ -9069,7 +9069,7 @@ "type": "other" } ], - "time": "2024-07-03T08:48:44+00:00" + "time": "2024-07-12T12:35:17+00:00" }, { "name": "spatie/laravel-tags", @@ -9143,16 +9143,16 @@ }, { "name": "spatie/laravel-translatable", - "version": "6.7.1", + "version": "6.8.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-translatable.git", - "reference": "d55384cbcf867b3cf21ff4d062403596d94acf81" + "reference": "0ef7e8e9d65bb834b7c68f22ec362a6179f50381" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-translatable/zipball/d55384cbcf867b3cf21ff4d062403596d94acf81", - "reference": "d55384cbcf867b3cf21ff4d062403596d94acf81", + "url": "https://api.github.com/repos/spatie/laravel-translatable/zipball/0ef7e8e9d65bb834b7c68f22ec362a6179f50381", + "reference": "0ef7e8e9d65bb834b7c68f22ec362a6179f50381", "shasum": "" }, "require": { @@ -9213,7 +9213,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-translatable/issues", - "source": "https://github.com/spatie/laravel-translatable/tree/6.7.1" + "source": "https://github.com/spatie/laravel-translatable/tree/6.8.0" }, "funding": [ { @@ -9221,7 +9221,7 @@ "type": "github" } ], - "time": "2024-05-14T11:35:51+00:00" + "time": "2024-07-24T14:26:27+00:00" }, { "name": "spatie/macroable", @@ -9486,16 +9486,16 @@ }, { "name": "staudenmeir/eloquent-has-many-deep", - "version": "v1.20.1", + "version": "v1.20.2", "source": { "type": "git", "url": "https://github.com/staudenmeir/eloquent-has-many-deep.git", - "reference": "979108e70a0db274bbf0c3ee58f1b8e96f891d4d" + "reference": "edcce8d8559d9559c997c177de06eb4bc173956d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/staudenmeir/eloquent-has-many-deep/zipball/979108e70a0db274bbf0c3ee58f1b8e96f891d4d", - "reference": "979108e70a0db274bbf0c3ee58f1b8e96f891d4d", + "url": "https://api.github.com/repos/staudenmeir/eloquent-has-many-deep/zipball/edcce8d8559d9559c997c177de06eb4bc173956d", + "reference": "edcce8d8559d9559c997c177de06eb4bc173956d", "shasum": "" }, "require": { @@ -9541,7 +9541,7 @@ "description": "Laravel Eloquent HasManyThrough relationships with unlimited levels", "support": { "issues": "https://github.com/staudenmeir/eloquent-has-many-deep/issues", - "source": "https://github.com/staudenmeir/eloquent-has-many-deep/tree/v1.20.1" + "source": "https://github.com/staudenmeir/eloquent-has-many-deep/tree/v1.20.2" }, "funding": [ { @@ -9549,7 +9549,7 @@ "type": "custom" } ], - "time": "2024-05-25T10:02:04+00:00" + "time": "2024-07-12T22:08:11+00:00" }, { "name": "staudenmeir/eloquent-has-many-deep-contracts", @@ -9668,16 +9668,16 @@ }, { "name": "symfony/console", - "version": "v7.1.2", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0aa29ca177f432ab68533432db0de059f39c92ae" + "reference": "cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0aa29ca177f432ab68533432db0de059f39c92ae", - "reference": "0aa29ca177f432ab68533432db0de059f39c92ae", + "url": "https://api.github.com/repos/symfony/console/zipball/cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9", + "reference": "cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9", "shasum": "" }, "require": { @@ -9741,7 +9741,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.1.2" + "source": "https://github.com/symfony/console/tree/v7.1.3" }, "funding": [ { @@ -9757,7 +9757,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T10:03:55+00:00" + "time": "2024-07-26T12:41:01+00:00" }, { "name": "symfony/css-selector", @@ -9893,16 +9893,16 @@ }, { "name": "symfony/error-handler", - "version": "v7.1.2", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "2412d3dddb5c9ea51a39cfbff1c565fc9844ca32" + "reference": "432bb369952795c61ca1def65e078c4a80dad13c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/2412d3dddb5c9ea51a39cfbff1c565fc9844ca32", - "reference": "2412d3dddb5c9ea51a39cfbff1c565fc9844ca32", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/432bb369952795c61ca1def65e078c4a80dad13c", + "reference": "432bb369952795c61ca1def65e078c4a80dad13c", "shasum": "" }, "require": { @@ -9948,7 +9948,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.1.2" + "source": "https://github.com/symfony/error-handler/tree/v7.1.3" }, "funding": [ { @@ -9964,7 +9964,7 @@ "type": "tidelift" } ], - "time": "2024-06-25T19:55:06+00:00" + "time": "2024-07-26T13:02:51+00:00" }, { "name": "symfony/event-dispatcher", @@ -10124,16 +10124,16 @@ }, { "name": "symfony/finder", - "version": "v7.1.1", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "fbb0ba67688b780efbc886c1a0a0948dcf7205d6" + "reference": "717c6329886f32dc65e27461f80f2a465412fdca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/fbb0ba67688b780efbc886c1a0a0948dcf7205d6", - "reference": "fbb0ba67688b780efbc886c1a0a0948dcf7205d6", + "url": "https://api.github.com/repos/symfony/finder/zipball/717c6329886f32dc65e27461f80f2a465412fdca", + "reference": "717c6329886f32dc65e27461f80f2a465412fdca", "shasum": "" }, "require": { @@ -10168,7 +10168,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.1.1" + "source": "https://github.com/symfony/finder/tree/v7.1.3" }, "funding": [ { @@ -10184,7 +10184,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-24T07:08:44+00:00" }, { "name": "symfony/html-sanitizer", @@ -10257,16 +10257,16 @@ }, { "name": "symfony/http-foundation", - "version": "v7.1.1", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "74d171d5b6a1d9e4bfee09a41937c17a7536acfa" + "reference": "f602d5c17d1fa02f8019ace2687d9d136b7f4a1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/74d171d5b6a1d9e4bfee09a41937c17a7536acfa", - "reference": "74d171d5b6a1d9e4bfee09a41937c17a7536acfa", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f602d5c17d1fa02f8019ace2687d9d136b7f4a1a", + "reference": "f602d5c17d1fa02f8019ace2687d9d136b7f4a1a", "shasum": "" }, "require": { @@ -10314,7 +10314,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.1.1" + "source": "https://github.com/symfony/http-foundation/tree/v7.1.3" }, "funding": [ { @@ -10330,20 +10330,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-26T12:41:01+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.1.2", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "ae3fa717db4d41a55d14c2bd92399e37cf5bc0f6" + "reference": "db9702f3a04cc471ec8c70e881825db26ac5f186" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ae3fa717db4d41a55d14c2bd92399e37cf5bc0f6", - "reference": "ae3fa717db4d41a55d14c2bd92399e37cf5bc0f6", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/db9702f3a04cc471ec8c70e881825db26ac5f186", + "reference": "db9702f3a04cc471ec8c70e881825db26ac5f186", "shasum": "" }, "require": { @@ -10428,7 +10428,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.1.2" + "source": "https://github.com/symfony/http-kernel/tree/v7.1.3" }, "funding": [ { @@ -10444,7 +10444,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T13:13:31+00:00" + "time": "2024-07-26T14:58:15+00:00" }, { "name": "symfony/mailer", @@ -11402,16 +11402,16 @@ }, { "name": "symfony/process", - "version": "v7.1.1", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "febf90124323a093c7ee06fdb30e765ca3c20028" + "reference": "7f2f542c668ad6c313dc4a5e9c3321f733197eca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/febf90124323a093c7ee06fdb30e765ca3c20028", - "reference": "febf90124323a093c7ee06fdb30e765ca3c20028", + "url": "https://api.github.com/repos/symfony/process/zipball/7f2f542c668ad6c313dc4a5e9c3321f733197eca", + "reference": "7f2f542c668ad6c313dc4a5e9c3321f733197eca", "shasum": "" }, "require": { @@ -11443,7 +11443,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.1.1" + "source": "https://github.com/symfony/process/tree/v7.1.3" }, "funding": [ { @@ -11459,20 +11459,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-26T12:44:47+00:00" }, { "name": "symfony/routing", - "version": "v7.1.1", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "60c31bab5c45af7f13091b87deb708830f3c96c0" + "reference": "8a908a3f22d5a1b5d297578c2ceb41b02fa916d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/60c31bab5c45af7f13091b87deb708830f3c96c0", - "reference": "60c31bab5c45af7f13091b87deb708830f3c96c0", + "url": "https://api.github.com/repos/symfony/routing/zipball/8a908a3f22d5a1b5d297578c2ceb41b02fa916d0", + "reference": "8a908a3f22d5a1b5d297578c2ceb41b02fa916d0", "shasum": "" }, "require": { @@ -11524,7 +11524,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v7.1.1" + "source": "https://github.com/symfony/routing/tree/v7.1.3" }, "funding": [ { @@ -11540,7 +11540,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-17T06:10:24+00:00" }, { "name": "symfony/service-contracts", @@ -11689,16 +11689,16 @@ }, { "name": "symfony/string", - "version": "v7.1.2", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8" + "reference": "ea272a882be7f20cad58d5d78c215001617b7f07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/14221089ac66cf82e3cf3d1c1da65de305587ff8", - "reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8", + "url": "https://api.github.com/repos/symfony/string/zipball/ea272a882be7f20cad58d5d78c215001617b7f07", + "reference": "ea272a882be7f20cad58d5d78c215001617b7f07", "shasum": "" }, "require": { @@ -11756,7 +11756,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.1.2" + "source": "https://github.com/symfony/string/tree/v7.1.3" }, "funding": [ { @@ -11772,20 +11772,20 @@ "type": "tidelift" } ], - "time": "2024-06-28T09:27:18+00:00" + "time": "2024-07-22T10:25:37+00:00" }, { "name": "symfony/translation", - "version": "v7.1.1", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "cf5ae136e124fc7681b34ce9fac9d5b9ae8ceee3" + "reference": "8d5e50c813ba2859a6dfc99a0765c550507934a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/cf5ae136e124fc7681b34ce9fac9d5b9ae8ceee3", - "reference": "cf5ae136e124fc7681b34ce9fac9d5b9ae8ceee3", + "url": "https://api.github.com/repos/symfony/translation/zipball/8d5e50c813ba2859a6dfc99a0765c550507934a1", + "reference": "8d5e50c813ba2859a6dfc99a0765c550507934a1", "shasum": "" }, "require": { @@ -11850,7 +11850,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v7.1.1" + "source": "https://github.com/symfony/translation/tree/v7.1.3" }, "funding": [ { @@ -11866,7 +11866,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-26T12:41:01+00:00" }, { "name": "symfony/translation-contracts", @@ -12022,16 +12022,16 @@ }, { "name": "symfony/var-dumper", - "version": "v7.1.2", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "5857c57c6b4b86524c08cf4f4bc95327270a816d" + "reference": "86af4617cca75a6e28598f49ae0690f3b9d4591f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/5857c57c6b4b86524c08cf4f4bc95327270a816d", - "reference": "5857c57c6b4b86524c08cf4f4bc95327270a816d", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/86af4617cca75a6e28598f49ae0690f3b9d4591f", + "reference": "86af4617cca75a6e28598f49ae0690f3b9d4591f", "shasum": "" }, "require": { @@ -12085,7 +12085,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.1.2" + "source": "https://github.com/symfony/var-dumper/tree/v7.1.3" }, "funding": [ { @@ -12101,7 +12101,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T08:00:31+00:00" + "time": "2024-07-26T12:41:01+00:00" }, { "name": "symfony/yaml", @@ -12384,23 +12384,23 @@ }, { "name": "vlucas/phpdotenv", - "version": "v5.6.0", + "version": "v5.6.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4" + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", - "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.1.2", + "graham-campbell/result-type": "^1.1.3", "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.2", + "phpoption/phpoption": "^1.9.3", "symfony/polyfill-ctype": "^1.24", "symfony/polyfill-mbstring": "^1.24", "symfony/polyfill-php80": "^1.24" @@ -12417,7 +12417,7 @@ "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { "dev-master": "5.6-dev" @@ -12452,7 +12452,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" }, "funding": [ { @@ -12464,7 +12464,7 @@ "type": "tidelift" } ], - "time": "2023-11-12T22:43:29+00:00" + "time": "2024-07-20T21:52:34+00:00" }, { "name": "voku/portable-ascii", @@ -12600,16 +12600,16 @@ }, { "name": "zbateson/mail-mime-parser", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/zbateson/mail-mime-parser.git", - "reference": "6ade63b0a43047935791d7977e22717a68cc388b" + "reference": "9a240522ae5e4eaeb7bf72c9bc88fe89dfb014a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zbateson/mail-mime-parser/zipball/6ade63b0a43047935791d7977e22717a68cc388b", - "reference": "6ade63b0a43047935791d7977e22717a68cc388b", + "url": "https://api.github.com/repos/zbateson/mail-mime-parser/zipball/9a240522ae5e4eaeb7bf72c9bc88fe89dfb014a3", + "reference": "9a240522ae5e4eaeb7bf72c9bc88fe89dfb014a3", "shasum": "" }, "require": { @@ -12672,7 +12672,7 @@ "type": "github" } ], - "time": "2024-04-29T21:53:01+00:00" + "time": "2024-05-01T16:49:29+00:00" }, { "name": "zbateson/mb-wrapper", @@ -12818,5 +12818,5 @@ "composer-runtime-api": "^2.1" }, "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" }