Show more

Heh, glitch is fun. I made this little tool pretty quickly.

(Testing out a new Beehive RSS feed ...)

kboyd boosted

Anyone on using League\Container? I find it odd that `->add(MyInterface::class, MyService::class)` doesn't pull the concretion from the container; to get the behaviour I want, I need to use something like `$container->add(MyInterface::class, function () use ($container) { return $container->get(MyService::class); })`.

Anyone else find that odd?

Sometimes "Quality Assurance" means shovelling around inside a puddle to try and unclog a drain.

Someone on IRC helped me yesterday. Apparently when JSON-encoding arrays in PHP, if you need an empty array to be encoded as an empty associative array/hash/dictionary, you can use `(object)[]`.

Ah, I remembered one of the places where XML hurt me.

RSS and Atom feeds.

You've practically gotta fuzz the outputs to make sure things don't get absolutely buggered by unexpected characters. Maybe there's an efficient and reliable way to do it, but I got really sick and tired of random breakages.

Oh, wait, technically the Hives are the integrations and the Bees are the individual configurations you set up. And then Chains are what knits the Bees into workflows. Or something. :)

Show thread

So far it has some good aspects, like a large number of "Bees" (aka Integrations). But I'm not a fan of the configuration file storing passwords in plaintext. And it would be nice if the "chains" (connecting bees together) could be editable via the web. Of course, it's open source, so I could dabble in a bit of Go to contribute improvements.

Show thread

Learning how to configure "Beehive", a self-hosted Zapier/IFTTT style tool. Sorry for the tootflood, I was setting up an RSS-to-Mastodon chain as the first test.

Okay, I'll grant that - technically speaking - the value '0000-00-00 00:00:00' isn't a valid date. I would counter-argue that perhaps when your system attempts to *autodetect* field types from the first inserted record, maybe it should accept that as a date? Otherwise, it should at least accept '0000-01-01 00:00:00' as a valid date, right?

Noting it here so I don't forget about it. The trick to a recursive macro in Twig 2:

{% macro myMacro(...) %}
{% import _self as macros %}
{{ macros.myMacro(...) }}
{% endmacro %}

As defined, it's infinite, so you'll want to add your own depth check/termination condition.

Signs I need to go to bed: I just pushed to a branch named "yeet-me-to-the-moonmoon".

Current status: doing fun things with ReactHttpServer in Sculpin ...

Show more
PHP Community on Mastodon

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