Laravel 8.26, weekly updates, and 🔥 tip

Laravel 8.26

Some cool features this week with a fast follow patch release. So we're bumping to version 8.26.1.

  • Fix the return type of spop for phpredis in #36106
  • Fix issues dumping PostgreSQL databases containing multiple schemata in #36046
  • Add markdown to Str and Stringable in #36071
  • Typecast page number as int in #36055
  • Support retrieving URL for Sftp adapter in #36120
  • Ensure both Carbon and CarbonImmutable get the same test now in #36117
  • Add Route::missing() fallback in #36035

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 scripted and recorded some of the additional videos for Shift. I hope to finish the remainder this week.

I also spent some time tweaking Shift based on recent user feedback. One of the major items was support for PHP CodeSniffer. Shift uses PHP CS Fixer (it's different).

While this might be the more popular formatting tool within the Laravel community, PHP CodeSniffer still has a foothold for PHP projects in general. In fact, Shift used to use it, but it went dormant for a bit and had some dependency issues.

Anyway, Shift now also supports PHP CodeSniffer. Shift will automatically detect any phpcs.xml or phpcs.xml.dist file and use it when applying code style. No additional configuration is needed. However, due to the third-party nature of PHP CodeSniffer, your Shift may fail while I continue to install more standards.

To that point, if you are using PHP CodeSniffer with third-party standards, let me know which ones so I can add support more quickly.

One more item is the switch to annual releases for Laravel. Although this will affect the seasonality of Shift, it doesn't really affect Shift's importance. If anything, it increases the importance. There are still tens of thousands of outdated Laravel applications. In addition, yearly releases will likely increase the need to upgrade for the latest features, while also increasing the pain. So, even though I had some initial worry, I think long term this will benefit everyone.

This week Jess and I will continue pairing on the Tailwind Shifts.

🔥 Tip

Taken straight from this week's release, the new Route::missing() method is 🔥.

I have an immediate use case for Shift. Previously I had a "catch all" route for the individual Shift detail pages based on the slug. When this didn't match, it yielded a 404 page. Now, with the missing callback, I can improve the experience by redirecting to the Shifts page:

1Route::get('/shifts/{slug}', [ShiftController::class, 'show'])
2 ->missing(function () {
3 return Redirect::route('shift.index');
4 });