Laravel 10.17, weekly updates, and 🔥 tip

Laravel 10.17

This week brings us to Laravel 10.17. Here are the highlights:

  • Fix BusFake::assertChained() for a single job in #47832
  • Update TrustProxies to rely on $headers if properly set in #47844
  • Accept protocols as argument for URL validation in #47843
  • Support human-friendly units for file size in #47846
  • Add Collection::ensure() in #47785
  • Add minutes option in some frequencies in #47789
  • Add config:show command in #47858
  • Introducing Prompts in #46772

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 went down a rabbit hole working on the new Shift CLI. One of the remaining, but critical, pieces to the CLI is its ability to reflect the classes within the local project. I had underestimated this piece thinking it would just work.

Long story short, a PHAR, even if loaded via Composer, doesn't have access to the local projects autoloaded classes. Basically you need to do require 'vendor/autoload.php';. However, doing so can lead to dependency collisions. So you need PHAR isolation. That requires namespace scoping, which requires custom configuration. Anyway, you see the rabbit hole.

I finally got it work. I also got the outstanding Human Shifts in a reviewable place. Of course, another one came in this week. So I'll start working on that, then continue working on the Shift CLI.

Also, the recording of my talk at Laracon is now available. So check it out if you want a deep-dive into testing with fakes or want to see me with a mustache.

🔥 Tip

During my PHAR rabbit hole, I did reach out to some people who have static analysis tools. None of them alluded to doing anything special when using reflection within their PHARs. While I agree there wasn't anything special, it didn't just work.

The takeaway here is that the "expert" might not be as close to the problem as you and therefore have a misleading answer, just as much as your question might present the problem in a misleading way. So don't be afraid to try things, keep asking questions, and when all else fails, ask to see the code.