Laravel 8.68, weekly updates, and 🔥 tip

Laravel 8.68

Two off-cycle releases last week for 8.66.0 and 8.67.0. We also have new features in today's release, bringing us all the way to Laravel 8.68.

Here are the highlights:

  • Add withoutDeprecationHandling to TestCase in #39261
  • Add method for on-demand log creation in #39273
  • Add dateTime to columns that don't need character options in #39269
  • Add AssertableJson::hasAny in #39265
  • Add Arr::isList() in #39277
  • Add new assertNothingDispatched method to BusFake in #39286
  • Add restrictOnUpdate() method to the schema builder in #39350
  • Add TestResponse::dd in #39359

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

This 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 we launched the CI Generator. The beta only supported GitHub, but received good usage (relatively speaking). I also received some initial feedback over the weekend and have made even more tweaks.

Thursday I finished a Human Shifts which came in to upgrade a Laravel 5.2 application. There's still one more I am working on and plan to finish that this week.

Friday I immersed myself into the CI pipelines for GitLab and Bitbucket. These are pretty different than GitHub Actions. At first it kind of threw me off, but actually ended up being a smoother process. I posted a Twitter thread if you'd like more detail. I may end up turning this into a blog post as well.

I finished this about an hour ago and successfully ran it against some beta projects. So I launched - the CI Generator now supports GitHub, Bitbucket, and GitLab.

The rest of this week Jess is working on the Tailwind 3.x Shift. I'm finalizing Human Shifts and taking the opportunity to tweak the Laravel Shift's I use.

🔥 Tip

Yet another array function native to PHP that I haven't used in a while is array_walk. It traverses over the elements within an array, and array_walk_recursive will traverse all elements in a nested array.

Since it works on the array by reference, you can actually manipulate it within the callback. This can be abused, so normally I recommend using one of the more precise functions.

But when working on the CI Generator it was invaluable. Particularly for Bitbucket which had a deeply nested set of jobs and steps.

To show some code, here's a snippet of using array_walk_recursive to quickly iterate over the entire pipeline and update the version tags for all images:

array_walk_recursive($this->config['pipelines']['pull-requests']['**'], function (&$item, $key) use ($version) {
if ($key === 'image') {
$item = str_replace('8.0', $version, $item);
}
});