Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x] Migrates to Livewire v3.x #1360

Merged
merged 28 commits into from
Aug 24, 2023
Merged

[4.x] Migrates to Livewire v3.x #1360

merged 28 commits into from
Aug 24, 2023

Conversation

nunomaduro
Copy link
Member

@nunomaduro nunomaduro commented Aug 17, 2023

This pull request migrates Jetstream to Livewire v3.x. Wish to help with this pull request? Simply follow this instructions, and report any bugs you find:

laravel new nuno_pr --pest --no-interaction
cd nuno_pr
composer config minimum-stability dev
composer require laravel/jetstream:dev-feat/livewire-3
php artisan jetstream:install livewire --dark --teams --api --verification --pest
sed -i.bak '/DB_/d' ./.env
echo "DB_CONNECTION=sqlite" >> .env
php artisan migrate --force
php artisan serve # Click on http://127.0.0.1:8000

@awebartisan
Copy link

awebartisan commented Aug 18, 2023

After running php artisan jetstream:install livewire --dark --teams --api --verification --pest faced following dependencies issue:

  Problem 1
    - pestphp/pest[v2.0.1, ..., v2.0.2] require nunomaduro/collision ^7.2.0 -> found nunomaduro/collision[v7.2.0, ..., v7.x-dev] but it conflicts with your root composer.json require (^6.4).
    - pestphp/pest v2.1.0 requires nunomaduro/collision ^7.3.1 -> found nunomaduro/collision[v7.3.1, ..., v7.x-dev] but it conflicts with your root composer.json require (^6.4).
    - pestphp/pest[v2.2.0, ..., v2.2.1] require nunomaduro/collision ^7.3.2 -> found nunomaduro/collision[v7.3.2, ..., v7.x-dev] but it conflicts with your root composer.json require (^6.4).
    - pestphp/pest[v2.2.2, ..., v2.3.0] require nunomaduro/collision ^7.3.3 -> found nunomaduro/collision[v7.3.3, ..., v7.x-dev] but it conflicts with your root composer.json require (^6.4).
    - pestphp/pest[v2.4.0, ..., v2.5.0] require nunomaduro/collision ^7.4.0 -> found nunomaduro/collision[v7.4.0, ..., v7.x-dev] but it conflicts with your root composer.json require (^6.4).
    - pestphp/pest[v2.5.1, ..., v2.5.2] require nunomaduro/collision ^7.5.0 -> found nunomaduro/collision[v7.5.0, ..., v7.x-dev] but it conflicts with your root composer.json require (^6.4).
    - pestphp/pest[v2.5.3, ..., v2.6.3] require nunomaduro/collision ^7.5.2 -> found nunomaduro/collision[v7.5.2, ..., v7.x-dev] but it conflicts with your root composer.json require (^6.4).
    - pestphp/pest[v2.7.0, ..., v2.8.1] require nunomaduro/collision ^7.6.0 -> found nunomaduro/collision[v7.6.0, ..., v7.x-dev] but it conflicts with your root composer.json require (^6.4).
    - pestphp/pest[v2.8.2, ..., v2.12.0] require nunomaduro/collision ^7.7.0 -> found nunomaduro/collision[v7.7.0, v7.8.0, v7.8.1, v7.x-dev] but it conflicts with your root composer.json require (^6.4).
    - pestphp/pest v2.12.1 requires nunomaduro/collision ^7.8.0 -> found nunomaduro/collision[v7.8.0, v7.8.1, v7.x-dev] but it conflicts with your root composer.json require (^6.4).
    - pestphp/pest[v2.12.2, ..., 2.x-dev] require nunomaduro/collision ^7.8.1 -> found nunomaduro/collision[v7.8.1, v7.x-dev] but it conflicts with your root composer.json require (^6.4).
    - Root composer.json requires pestphp/pest ^2.0 -> satisfiable by pestphp/pest[v2.0.1, ..., 2.x-dev].
    

Ran composer update pestphp/pest pestphp/pest-plugin-laravel again and it worked fine!

@awebartisan
Copy link

awebartisan commented Aug 18, 2023

On Team Settings page, when clicked on Save button on team name update, we see Saved message, but at the same time Added also appears in the Team Member section next to Add button.

<x-action-message class="mr-3" on="saved">
                {{ __('Saved.') }}
            </x-action-message>
<x-action-message class="mr-3" on="saved">
            {{ __('Added.') }}
</x-action-message>

Maybe because both listening to same event?

  • Same thing on User profile page.

@awebartisan
Copy link

On two-factor-challenge view, when clicking on 'Use a recovery code`, the JavaScript (Alpine) code is not kicking in.

Possible reason is Alpine is not loaded now on this page.

@nunomaduro
Copy link
Member Author

@awebartisan All fixed - and you can re-test if you want.

composer.json Outdated Show resolved Hide resolved
src/InteractsWithBanner.php Outdated Show resolved Hide resolved
src/InteractsWithBanner.php Outdated Show resolved Hide resolved
stubs/livewire/resources/views/components/banner.blade.php Outdated Show resolved Hide resolved
src/ConfirmsPasswords.php Outdated Show resolved Hide resolved
@mansoorkhan96
Copy link

I have tested the PR and everything works for me.

@andrewdwallo
Copy link
Contributor

Will this version be having legacy model binding?

@nunomaduro
Copy link
Member Author

@andrewdwallo Where do you see legacy model binding being used?

@andrewdwallo
Copy link
Contributor

@nunomaduro I never said I did, but I'm not too familiar with the way Livewire 3 works yet, so I was just curious. I will take that as a no though.

@magarrent
Copy link

Hey! Thanks for the branch!

I'm just migrating an existing project, but it seems that it does not detect the Jetstream components:

Unable to locate a class or view for component [jet-banner].

Any ideas?

@nunomaduro
Copy link
Member Author

What version of Jetstream were you using? 2.x? If yes, you need to follow the upgrade guide to 3.x first.

@magarrent
Copy link

What version of Jetstream were you using? 2.x? If yes, you need to follow the upgrade guide to 3.x first.

Ah, you're right, I was using 2.x! Thanks mate, it works now

@AbdullahObaid
Copy link
Contributor

AbdullahObaid commented Aug 22, 2023

On action-message.blade.php component file, @this.on should be replaced by x-on since @this.on() deprecated in livewire 3 https://livewire.laravel.com/docs/upgrading#thison-deprecated , suggested fix #1365

@joshhanley
Copy link

@AbdullahObaid we've just added @this.on() back into V3 🙂 livewire/livewire#6454

@nunomaduro nunomaduro marked this pull request as ready for review August 24, 2023 10:50
@taylorotwell taylorotwell merged commit 1ecddaa into 4.x Aug 24, 2023
7 checks passed
@taylorotwell taylorotwell deleted the feat/livewire-3 branch August 24, 2023 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants