jason kühn

@jklmnop

i am alive and well.

Commit activity

16 commits in the last 30 days

longest streak 3 dayscurrent 3

274 / 400 XP126 XP to maintainer

Mon, Nov 23

am i crazy or are #php backed enums the factory pattern with a little extra spice? i think i would be displeased by prefixing my factories with the enum keyword though. anyone do this? tell me more.
We use backed enums with a handler(): PaymentDriver method using app()->make(...) for stateless strategy resolution, and it's super clean until a driver needs request-scoped constructor args.
I don't see the problem if it's for creating simple instances. For example, I've used it for deciding which event to fire. But for factories with a lot of decency injections I'd stick to a proper factory.
Well, it makes sense that you’d see it that way because of the superficial similarity, but be careful, there’s a trap here, and it’s to confuse syntactic convenience with architecture. Ultimately, a backed enum lets you do something like…
Show thread
working through a massive #php refactor and finally got to use static in a closure for a loop. i used to instantiate reused services outside if the closure and made them available with use. i always hated that they weren't able to be scoped properly due to performance…
Show thread

Thu, Nov 19

Patched 3 @php projects in 3 environments. Patched nginx in 3 environments. Upgraded Drupal. It’s not even lunch yet and I just want to get back to refactoring code.

Wed, Nov 18

Sometimes I wish I could talk to other people who find pleasure in refactoring legacy php code. Like an information exchange, wins and losses, techniques. Is there a discord for that? Perhaps an old BB forum?

Fri, Nov 13

I’m refactoring 2004-2009 legacy apps and loving every excruciating minute of it. Not only is this for (way) easier maintenance, but I’m getting intimately familiar with what is still used and what is dead code. So when that full-rewrite happens, I have the receipts.

Sat, Nov 7

Wed, Nov 4

Ever get a ZF1 project working on PHP 8.3? Ever migrate PSR-0-ish classes to PSR-4? Been working on untangling 20+ years of monorepo legacy code using @rectorphp, @phpstan, & ecs. This platform has seen 5.6, 7.1, and 7.4. It’s now on 8.3 thanks to #php2shell. It feels so good to…
We've spent the last 3+ years upgrading from PHP 5.6 on a massive application and we're 40% done. That includes adding automated browser testing where there was zero tests beforehand. The other 60% should hopefully be up to PHP 8.2 sometime next year since we did the hardest bits…
Show thread

That's @jklmnop's root commit.