Laravel 11.41, weekly updates, and deals
Laravel 11.41
There was a minor release late last week and another today jumping us to Laravel 11.41. Here are the highlights:
- Add
IncrementOrCreate
to Eloquent in #54300 - Add
withAttributes
to Eloquent Builder in #53720 - Helper methods to dump HTTP responses in #54317
- Add customizable
date
validation rule constraints in #53465 - Add
addPath
method to theLang
facade in #54347 - Create missing Postgres database when running migrations in #54314
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 I continued my Wednesday livestream with a deep-dive on withoutTimestamps
. Learned a lot here. Which I summarized in this Twitter thread. The gist was, basically you want to wrap you code in a call to Model::withoutTimestamps()
.
With the rest of the week I completed the outstanding Human Shifts. One was upgrading from Laravel 8. Another was upgrading a very large project from Laravel 10. Another was getting the test suite passing (mainly Dusk). There are more Human Shifts that come in this time of year. I think everyone is preparing for new work in the new year, and maybe also Laravel 12.
I also did some internal work on laravelshift.com. Specifically merging work from Mary Perry. I also added some internal support commands to rerun sets of failed jobs and transfer subscriptions.
This week I'm continuing to demo the side-project with JT. We've found some rough edges as we convert more WordPress sites to static sites. Much like Shift, every project is different. So it's a constant game of tweaking to automate 100%. Things will never be 100%. But 80%-90% is good enough. Maybe 70% for a public beta.
Weekly Tip
Something I've noticed in Shift and now the side-project with JT is the results in Horizon can get a bit noisy. Particularly with events, or queued mail, or third-party jobs.
Horizon has a configuration option to silence jobs. Unfortunately, it requires each by job name. I try a PR that allows wildcards. For example, Spatie\Mailcoach\*
. But for now, silencing jobs helps keep the results focused.
/*|--------------------------------------------------------------------------| Silenced Jobs|--------------------------------------------------------------------------|| Silencing a job will instruct Horizon to not place the job in the list| of completed jobs within the Horizon dashboard. This setting may be| used to fully remove any noisy jobs from the completed jobs list.|*/ 'silenced' => [ Spatie\Mailcoach\Domain\Automation\Jobs\CalculateAutomationMailStatisticsJob::class, Spatie\Mailcoach\Domain\Automation\Jobs\RunAutomationActionsJob::class, Spatie\Mailcoach\Domain\Campaign\Jobs\CalculateCampaignStatisticsJob::class, // ...],