Engineering,
taught
&
leadership,
practised.
I'm Steven — CTO at Digitonic, a PHP engineer since 2010 and a keen golfer with a terrible handicap. This is where I write it all down.
Latest from the journal
PHP 8.6's clamp(): Delete Your min(max()) Sandwiches
Every Laravel codebase has a min(max($perPage, 1), 100) somewhere, and at least one of them has the bounds backwards. PHP 8.6 gives you a function that can't be written wrong.
Scale Laravel Queue Workers to Zero and Back with KEDA
A worker blocked on Redis uses no CPU, so the HPA never scales it. Here is the KEDA ScaledObject that scales on queue depth instead — including scale-to-zero and the shutdown config that stops Kubernetes killing jobs.
PHP 8.6 Readonly Property Defaults: Cleaner DTOs and Interface Properties in Laravel
PHP 8.6 lifts the four-year ban on default values for readonly properties. Here's what that changes for DTOs, interface properties and Laravel action classes.