huge stuff: laravel got strict forms, pest flaky tests + more

nunomaduro| 00:05:01|Apr 21, 2026
Chapters13
Introduction of the new flaky test support in Past PHP, including automatic retries for flaky API or browser based tests when failures occur.

Past PHP 4.5 adds a flaky test retry, PSR-4 casing checks, and coverage-focused reruns, while Laravel 13.4 tightens form requests and new queue inspection tools boost debugging.

Summary

Nuno Maduro covers a stack of notable updates in two big releases. He introduces Past PHP 4.5’s flaky method, which automatically retries flaky tests (configurable up to 10 tries) and can filter to show only flaky tests with a dash-flaky flag. He demonstrates PSR-4 enforcement that alerts when a namespace and folder casing don’t match, helping keep codebases consistent. A new coverage-focused rerun lets you drop zeros and concentrate on files with solid coverage. Laravel 13.4 brings strict form requests via the fail-on-unknown-fields option, so extra input is rejected unless explicitly allowed. Nuno also shows how to inspect queue state (pending, delayed, reserved) with an artisan inspect command, and mentions Laravel Cloud CLI live environment tinkering and native Past PHP support in the VS Code extension for better autocompletion. It’s a quick roundup aimed at keeping Laravel projects robust, test-friendly, and easier to debug.

Key Takeaways

  • Past PHP 4.5 adds a flaky test mechanism that automatically retries a failing test up to 3 times by default, configurable via a tries argument (up to 10).
  • You can list only flaky tests using the --flaky flag, so you can focus debugging on unstable API or browser-driven tests.
  • Past PHP now validates PSR-4 casing and will warn if a namespace casing doesn’t match the folder structure, helping enforce consistent code organization.
  • Rerunning tests with coverage filtering removes zero-coverage files, letting you focus on files with 100% or partial coverage.
  • Laravel 13.4 introduces strict form requests by default with fail-on-unknown-fields, causing tests to fail if extra non-rule fields are sent.
  • The queue inspection feature lets you see pending, delayed, and reserved jobs via an artisan inspect command, aiding queue debugging.
  • The video also notes Laravel Cloud CLI for environment tinkering and native Past PHP support in the VS Code extension for better autocompletion.

Who Is This For?

Laravel developers who want more reliable tests, better queue insight, and stricter request validation. Perfect for teams adopting Past PHP in CI, or upgrading to Laravel 13.4 and looking for practical, time-saving workflows.

Notable Quotes

"The new flaky method which is really cool."
Introduction to the flaky test feature in Past PHP 4.5.
"Now if I clear my terminal, this test will be automatically retried three times."
Demonstrating automatic retries for flaky tests.
"Laravel 13.4 was also released this week and I'm very excited about this release because literally allows you to set up form requests as strict."
Announcement of strict form requests in Laravel 13.4.
"If I try to send stuff that is not on the form request just like the name, this will actually cause my test to fail."
Example of fail-on-unknown-fields behavior.
"And just for your big information, you may also use this attribute fail on unknown fields if used to either disable this feature for one form request or simply enable it for one form request only."
Flexible enabling/disabling of strict fields per form request.

Questions This Video Answers

  • How does Past PHP 4.5 retry flaky tests and what are sensible defaults for tries?
  • What is fail-on-unknown-fields in Laravel 13.4 and how does it affect form requests?
  • How can I inspect queue state in Laravel and what does the new inspect command show?
  • How do I enable Past PHP support in Visual Studio Code for Laravel projects?
  • How do I enforce PSR-4 casing to match folders and namespaces in Past PHP?
Past PHPFlaky testsPSR-4Code qualityLaravel 13.4Strict form requestsFail on unknown fieldsQueue inspectionLaravel Cloud CLIVS Code extension
Full Transcript
What's up everyone? A new Laravel version just came out, but also past 4.5 is out. Let's see everything on these two new releases. What's up everyone? It's Nuno here. It would mean the world to me if you could subscribe to this channel. I love PHP. I love you all and enjoy the video. The first addition to past 4.5 is actually the new flaky method. Sometimes you have a real world test that literally goes to an API like GitHub or goes to a browser and actually does assertions. And all those tests sometimes are a little bit flaky. So we are introducing this new flaky method which is really cool. So I'm going to run this test right here. And as you can see, most of the times it passes, but sometimes it actually fails because the GitHub API is a little bit flaky. [music] So what we can do is call this flaky method just like that, easy peasy lemon squeezy. And now if I clear my terminal, this test will be automatically retried three times. Now you can make configure this by simply providing this named argument tries and you can actually try up to 10 times if you want to. Once the test is actually passing, past will move forward. Now sometimes you might want to see a list of all the tests that have been marked as flaky in your application. So to do that, you may just provide this flag called a dash dash flaky and automatically past PHP will only run the test that have this flaky method on it. Next, we have something in PHP called a PSR-4, which means that the folder or the file name must match the name space or the class name. And on past PHP, we are now introducing something to be cased correctly which will verify that for you. Let me show you a real world example. I'm going to move here into this user team. And as you can see, this user team is within a support folder. Now I'm going to just go here and move this name space to a lower case S. And by doing something like this and run architectural testing, past PHP will literally tell me, "Wait a second. You are an uppercase folder, but your name space is lowercase." It will literally tell me this right here. Now I can just revert this, clear my terminal, just rerun it again, and of course now my test with passes. All right, the next one is actually interesting. It might be a little bit tunish, but sometimes you are working on the project and you kind of have this big project at all. And you want to kind of focus a little bit on the test that have some coverage already. In the past you would run the entire test suite and you would have all these zeros on your right, which is a little bit annoying sometimes. So what you can do is just [music] rerun the test suite but with only covered, okay? So by doing this, you are effectively removing all the zeros from the coverage. You are going to see the files that have either 100% or some level of coverage. But also a bunch of bug fixes were introduced. In case you are curious, go to github.com/ pastphp/past. Laravel 13.4 was also released this week and I'm very excited about this release because literally allows you to set up form requests as strict. Let me show you this in practice. I'm going to go here to a test called a team test. And what I will do inside this team test is actually, you know, create a team, easy peasy, kind of simple. But I'm going to also try to send hidden fields like hidden field one, two, and three. Now if I run this test, this will actually work. Let me show you. I'm going to go just type vendor been past and this will just work as expected. Even though these fields were never requested, we just ignored them silently on the backend. Now you can prevent this from happening if you think this is important. And all you have to do is go to the app service provider and then you just call this form request not strict unfortunately. It's called a fail on unknown fields. Now by doing this, Laravel automatically will not anymore accept any fields that do not belong to the rules or field form request. So in this example, if I try to send stuff that is not on the form request just like the name, this will actually cause my test to fail. But if I were to delete all of this, now my test just passes. Really cool stuff. And just for your big information, you may also use this attribute fail on unknown fields if used to either disable this feature for one form request or simply enable it for one form request only. This new version of Laravel also ships with nice methods that allow you to inspect your queue. For example, you may now know which jobs are pending, which jobs are delayed, but also which jobs are reserved. [music] And here for example, I have a PHP artisan command which dispatches a new job. But I don't have any queue, so this job will be dispatched but won't actually be consumed. So I'm going to just run this command and it's done. And now I'm going to just type PHP artisan inspect. And by doing that, you can see that I have literally now two jobs, one and then another job that are probably just pending jobs waiting for to be consumed. [music] Laravel Cloud CLI also allows you to just tinker with the environment itself. Check that out if you haven't already. And just by the way, in case you missed it and you are a VS Code fan, the Laravel VS Code extension now supports natively past PHP. This is absolutely awesome. Now you get some nice auto completion on past PHP in VS Code. So check this out if you haven't already. And that's it for this video. I hope you guys enjoyed this really cool quick format about the latest news. And if you do, please like this video, subscribe my channel, and go all the way down and tell me which one was your favorite feature. Catch you guys next time. Peace out. Boom.

Get daily recaps from
nunomaduro

AI-powered summaries delivered to your inbox. Save hours every week while staying fully informed.