php

  • fastcgi_read_timeout is not proxy_read_timeout

    A long-running request returning 504 after exactly sixty seconds is nginx timing out, and which directive applies depends on how the request reaches PHP. Four numbers have to…

  • A meta box that still works, with the flag that says so

    Most meta boxes still render in the new editor through a compatibility layer, and the ones that break do so because they rely on the DOM around them…

  • rest_prepare_post is where you add a field without breaking one

    Adding data to an existing REST response by filtering the prepared object is tempting and is the wrong hook — there is a registration function that also documents…

  • spl_object_id, and the hash that was never a hash

    spl_object_hash returns a 32-character string that looks like a digest and is really an encoded pointer, and pointers get reused — so the identifier of a garbage-collected object…

  • Window functions replace a habit

    8.0 went GA in April and the correlated subquery can retire. The plans before and after, the recursive CTE that replaces a loop, and the upgrade nobody expects.

  • PSR-15 middleware, and the interface it standardised

    Every framework had middleware and none of them agreed on the signature, so a piece of middleware was written once per framework despite doing the same thing. The…

  • What the regulation actually asks of a schema

    The deadline is in May and the work is not a cookie banner. An inventory first, because everything else depends on knowing which tables hold what.

  • Single-server scheduling and the cron that ran three times

    Three application servers each running the same crontab means every scheduled task runs three times, and the invoice job discovers this before you do. The lock is a…

  • Model events do not fire on a mass update

    An observer that keeps a search index in step works perfectly until somebody writes a query builder update, at which point the rows change and nothing notices. This…

  • Laravel 5.6 and logging you can configure

    Logging moved into a config file, and stacks are why it matters — a different format per destination, decided without touching a service provider.