php

  • The DEL that blocked the server, and UNLINK

    A 400ms pause on every request, once an hour, caused by a cache cleanup nobody thought of as expensive. Redis is single-threaded, and freeing memory is work.

  • Class constant visibility, at last

    Every class constant has been public since constants existed, so an internal lookup table intended as an implementation detail was part of the public API whether or not…

  • password_hash defaults changed, and rehashing is free

    PASSWORD_DEFAULT is explicitly allowed to change between releases, and it does. Anything storing the constant’s current value, or sizing a column for today’s output, is storing a decision…

  • Parameter type widening in 7.2

    A child class could never remove a parameter type from a method it overrides, even though accepting more than the parent is safe by the same rule that…

  • wc_get_order returns different classes for different types

    An order, a refund and a subscription are all shop_order-ish posts and are not the same class, so code type-hinting WC_Order breaks the first time a refund arrives.…

  • prestissimo, and why parallel downloads are not the default

    Composer downloads packages one at a time, which on a cold cache with sixty dependencies is mostly waiting on latency. A plugin parallelises it and the improvement is…

  • Read replicas, and the queries that must not use them

    Reads moved to a replica and checkout started showing empty carts. Read-after-write, sticky connections, and measuring the lag rather than assuming it.

  • Assert against the database, not against the response

    A feature test asserting a 302 and a flash message proves the controller ran. It does not prove the order was created, and it passes just as happily…

  • Blade components before they were components

    @include passes variables and shares the parent scope, which means a partial silently depends on whatever happened to be defined where it was included. @component takes a slot…

  • wp-cli commands are classes, and yours can be too

    A maintenance task run through wp eval-file has no arguments, no help, no progress and no exit code worth checking. Registering it as a command costs about ten…