Laravel 12.3, weekly updates, and weekly tip

Laravel 12.3

Several new features this week brings us to Laravel 12.3.0. Here are the highlights:

  • Add missing trashed model event in #55004
  • Add json:unicode Eloquent cast to support JSON_UNESCAPED_UNICODE encoding in #54992
  • Add "Storage Linked" section to artisan about in #54949
  • Add support for native JSON/JSONB column types in SQLite in #54991
  • Add SSL encryption support for MySQL connection in #55048

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

I got home late Thursday from a quick snowboarding trip. Emma was unfortunately sick, so I held Daddy Daycare on Friday.

Over the weekend and yesterday, I worked my way to inbox zero patching minor things in Shifts, as well as package compatibility. The biggest thing was Can I Upgrade Laravel tool was returning some false positives. There was bug in the failsafe check to ensure newer versions are not lower than older versions. For example, the constraint for Laravel 12 can not be lower than the constraint for Laravel 11.

This week I am sunsetting the Shift CLI and migrating any specific tasks back to the Shift Workbench. Much like the desktop app, managing two codebases is not working. In fairness, I haven't updated the CLI or the Workbench in some time. Over the next few weeks, I'll revive the Workbench and likely make its tasks free.

Weekly Tip

Something I noticed during pairing was inconsistent code for resolving instances from the container. I honestly don't resolve directly from the container often. Normally dependency injection or real-time facades is enough.

However, when I do resolve from the container, I prefer the resolve helper. I find it reads more naturally as it aligns with what I'm doing - resolving from the container. It also avoids chaining off another helper or limited access to the app property in service providers.

For example, here are the various ways to resolve from the container:

$this->app->make(Transistor::class);
$this->app->makeWith(Transistor::class, ['id' => 1]);
app()->make(Transistor::class);
app(Transistor::class, ['id' => 1]);

Or, simply and consistently, using the resolve helper:

resolve(Transistor::class);
resolve(Transistor::class, ['id' => 1]);
resolve(Transistor::class);
resolve(Transistor::class, ['id' => 1]);

In an effort towards reviving the Shift Workbench, I made a quick, free task to automate this conversion.