تماشای این درس نیاز به اشتراک حرفه‌ای دارد.

Pest 2 Release Overview0:00

Hello and welcome back. It's been a while, but I'm here now with a few new videos we want to do because PES version 2 was just released. So let's take a look here on the website. You can see here the video where Nuno was introducing it while we were in India a month ago, which was pretty epic. And you can also here see a few of the new things like speed improvements for parallel testing. There's a profile option, compact printer retry option, dirty build, there are to-dos and a little bit more. So it's pretty cool. And of course, we want to check out what PES 2 has to offer us as well. And for this video, I want just to make sure that we can upgrade to the latest version. So that's what we're going to do in this video. So let's get back here before we start. Let's just check that everything is still working as expected. We have our 80 tests, I believe, here and they do work.

Review Upgrade Guide0:47

going to do in this video. So let's get back here before we start. Let's just check that everything is still working as expected. We have our 80 tests, I believe, here and they do work. All right. So there are a few things that we need to change. Let's go here to our composer.json file. Maybe let's go back first here and let's check the upgrading guide, which we should see here somewhere. Upgrading guide, here it is. All right. So there are a few things we need to make sure. Of course, we want to make sure that we use PEST version 2. So let's start with that. PEST, here it is. Let's get rid of version 1. We're interested in version 2. But what you also can see here, it's right here. Note that Laravel 10 is required. So this means for application, we also have to require Laravel 10. But before we do that, let's get rid of PHPUnit first. I think PEST will install it itself. It's this one here. All right. So now we have to take care

Update Composer Dependencies1:39

we also have to require level 10. But before we do that, let's get rid of PHPUnit first. I think PEST will install it itself. It's this one here. All right. So now we have to take care of the plugins. For all the plugins, there is now a version 2. So let's just use it here for the mock plugin, which we're going to use. Parallel plugin. I don't know. I'm not sure. Let's see. And Ignition, that's the error page. We also have to get version 2 because of level 10. All right. So let's take care of level itself. Let's go up here, framework. We want to make sure we use level 10. And what else do we have here? I think we also need to have version for PHP 8.1. And is that already it? Collision we have to change. That's also what we can see here. Collision. Then PEST plugin. Oh, we have to delete it. Also, if we're using paratest. So let's get rid of it. PEST plugin parallel.

Run Composer Update2:44

That's also what we can see here. Collision. Then PEST plugin. Oh, we have to delete it. Also, if we're using paratest. So let's get rid of it. PEST plugin parallel. I think paratest I don't see here for now. Or here it is. Yeah. All right. Anything else? Global assertions we're not using. I think that's it. Since we don't have too much code, the level upgrade shouldn't be that difficult. So let's just try to run composer update and let's see what we get. We're still missing something here. My missing Livewire Assertion plugin, which we use. And there is no new version for this one. And it's the first 1.0 release. All right. Let's try it again. And let's see. This already looks better. So we're already installing here all the dependencies. And just to make sure that everything is working, let's just run PEST. And this looks good for now. Let's wait till the end.

Verify Tests and Speed3:42

So we're already installing here all the dependencies. And just to make sure that everything is working, let's just run pest. And this looks good for now. Let's wait till the end. But I think all tests should be fine. And they are. All right. That's amazing. So we've now upgraded our application to pest version 2 and also to level 10. And maybe one last thing here. We also heard that we should see a speed improvement for parallel testing. So let's try this out as well. I know that for the older version, we had the parallel testing time of around 1.6 seconds. So it was already pretty fast. But let's see what we get now. 1.06 seconds. So that's quite an improvement. So I'm pretty sure if you have way more tests than our 80 tests, this will be even more helpful. So I'm pretty happy about this new time and performance improvement with pest version 2 while using the parallel plugin.

Wrap Up and Next Steps4:36

way more tests than our 80 tests, this will be even more helpful. So I'm pretty happy about this new time and performance improvement with PEST version 2 while using the parallel plugin. And besides that, if we check out the upgrade guide, there are a few things that have changed. But I don't believe there's anything that we need to take care of. So I think this all looks good. But for your application, please make sure to check if you've used anything that has changed here. But for us, as we're seeing, everything is working as expected. So we can move on. And in the next videos, we're going to check out some of the new features. So we're going to move on. And in the next videos, we're going to check out some of the new features.

دوست دارید گاهی خبرهای Laracasts را ایمیل کنیم؟