Laravel 8.22, weekly updates, and 🔥 tip

Laravel 8.22

Mostly fixes this week, but a few new additions. So we get a minor version bump to 8.22.0.

  • Fix error from missing null check on PHP 8 in #35797
  • Fix "null" constraint prevents aliasing SQLite ROWID in #35792
  • Fix expectsTable call with mixed output in #35820
  • Fix morphTo attempting to map an empty string morph type to an instance in #35824
  • Allow strings to be passed to the report function in #35803
  • Add reduceWithKeys to collections and lazy collections in #35839
  • Add item to list of causedByLostConnection errors in #35744
  • Retry connection if DNS lookup fails in #35790

You may review the full branch diff on GitHub for a complete list of changes.

This minor version bump and update is automated for subscribers to a Shifty Plan. If you don't have one of those, be sure to bump your constraint and run composer update to get the latest features.

Weekly Journal

Last week I finished up most of the tests I wanted to add. Even came up with a few more now that I reintroduced myself to writing Dusk tests. As I said before, I don't use Dusk very often. However, now that it's all set up on CI, I'm inclined to add a few more.

I also took some time to go through about a dozen of the recent user feedback emails. These include everything from content tweaks to improving automation within Shift. I normally do this twice a month or when the requests reach a critical mass. But with the holidays, things were a bit slow.

This week I hope to finalize the design "facelift" by revisiting the filtering UX on the Shifts page from a first-time user perspective. I also have a few Human Shifts that came in. So I'll be starting those.

🔥 Tip

With all the testing I've done lately, I found myself repeatedly working through failures. Normally I just target the specific file I'm working on by passing it to phpunit. Sometimes, if I want to really narrow it, I'll use --filter and pass it the test class.

This put me on a hunt to find a way to rerun only failed tests. While I know this is possible from within some IDEs, I'm a command line user.

Turns out this is possible by through a series of options and enabling PHPUnit's result cache. Which is enabled by default starting with PHPUnit 8. You may also toggle the cache from the command line.

So, when hacking through a bunch of failed tests, here's the command I ran: phpunit --cache-result --order-by=defects --stop-on-failure

Your usage may vary. For me, I found PHPUnit would sometimes get stuck or not behave as expected. Often manually removing the cache file would eventually solve the issue. But not always. If this continues, I may do a live stream and go core diving.