Show newer

Maybe there's a way to do this same thing with array_* functions, but nothing came to mind.

Show thread

I just came up with the most brutal hack to use array_reduce with short functions ... heh.

Since "add to the array" and "return the array" are two operations, I turned them into a single one by using a ternary:

fn ($carry, $item) =>
($carry[$item['category']][] = $item)
? $carry
: $carry,

It eventually came back online; after several further issues with exhausted memory, I finally figured out that `make -j4` was just too taxing for the system (Pi 3 Model B)

Show thread

Me: "I have an idea: I'll compile PHP 8.0.3 on my Raspberry Pi"

Also me: "Now I can't SSH into my Raspberry Pi because, I assume, the CPU melted."

Is it possible to use Twilio functions as the target for an sms number, and make it queue up a list of incoming texts that I can then retrieve in bulk using a computer on my local network, so that I don't have to spin up a server instance?

This fine friday afternoon, I am writing code cheques my monday morning ass won't be able to cash.

There's still an hour left. That's enough time to write some tests for this. Monday Me will appreciate that.

kboyd boosted

We can fly a helicopter on Mars, but can't turn on the lights in Texas because scientists are in charge of Mars, but Republicans are in charge of Texas.

Spent some time yesterday playing with Github Actions. The marketplace seems to make it easy to make headway for newbies such as myself, but handing over control like that is still a bit unnerving.

I found a way to set my ZSH_THEME differently in PHPStorm than in the terminal (because I run the IDE in light mode, like a monster, but the terminal in dark mode as intended)

In .zshrc:
if [[ -z "$ZSH_THEME" ]]; then

Then in PHPStorm, I can specify a ZSH_THEME environment key to set the theme I want.

... doctrine/dbal. illuminate/database. something else? Raw PDO? I dunno.

Current status: Getting php8.0 & extensions installed via macports. I wonder why php80-imagick doesn't exist ...

Well, Travis still doesn't like PHP 8, even though it has been added to PHP-build. I guess it takes time for all that stuff to percolate through the ecosystem :) Guess that means I'll be intentionally merging with "failing" tests, though.

Success! I finally got php8 + gd to compile on macOS. I had to `sudo port uninstall gd2`, otherwise I guess the libraries were getting entangled and it was confusing the build system.

Oof, the method for Strike 2 is itself a multi-strike. It has another Strike 1. But at least it's not tied to a specific implementation.

Show thread

I want to unit test a method that is 18 lines long, and there's so much going on that I don't think I can ... at least not in the same repo it lives in.

Strike 1: Internal static array cache
Strike 2: Invocation of a static method to do some work
Strike 3: Hard-coded constant referencing *one* project that it is included from

Diagnosis: Rewrite

kboyd boosted

For Cyber Monday, we’re offering PHP 8.0 for free! Go download it today!

kboyd boosted

I don't normally repost my twitter content here, due to my belief that repost-bots are actually a detriment to platform growth, but I thought I'd manually repost this one:

"Agreement doesn't lead to clicks. No clicks, no profit. Therefore, unless they find a way to break the feedback loop powering their profits, it is the function of a profit-based social network to wilfully - gleefully - tear itself apart."

Does anyone know of a php8 Docker image with imagemagick enabled that i can use for some CLI tasks? Preferably one of the tags on the official PHP images

Hmm, I've failed to unlock the secret of compiling php8 with gd support on macOS. Using --enable-gd causes complaints of duplicated/differing symbols. 🤷

Maybe "^7.2|^8.0" ... or will someone yell at me for that?

Show thread
Show older
PHP Community on Mastodon

Open source. Open community. We are dedicated to building and enriching the PHP community.