php

  • Laravel 5.5 and the packages that install themselves

    The first release where installing a package is one command. Auto-discovery removes two config edits per package, and hides the fact that they happened.

  • register_rest_field for a property the API does not expose

    Adding a field to a core REST response means either filtering the prepared object, which is fragile, or registering the field properly so it appears in the schema…

  • Custom collection classes on a model

    Behaviour that belongs to a set rather than to a single record — the total of a group of order lines, whether any of them is backordered —…

  • 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.