Uncategorized

  • wp_insert_post fires every hook the editor fires

    An import loop calling wp_insert_post() is doing everything a human clicking Publish does: revisions, term counting, ping status, and every plugin listening on save_post. For ten posts that…

  • HEALTHCHECK belongs in the Dockerfile, not the orchestrator

    Docker 1.12 added HEALTHCHECK, which means the image itself can say what “working” means. Before this, every orchestrator had to be told separately, and each one had its…

  • fetch sends no cookies unless you ask

    XMLHttpRequest sends cookies to the same origin by default. fetch does not, so a session-authenticated endpoint that worked with jQuery returns 401 after the migration and looks like…

  • Fixtures that build objects, not rows

    A fixture written as SQL or as an array of columns encodes the schema into every test, so a column rename breaks two hundred tests that have nothing…

  • jQuery 3 changed what ready() returns

    jQuery 3 made $.ready resolve asynchronously and always, which is more correct and changes the timing of code that had been relying on the synchronous path. The breakage…

  • The OPcache file cache, for when shared memory resets

    OPcache keeps compiled bytecode in shared memory, which is empty after every restart — so the first requests following a deploy or an FPM reload each pay full…

  • session_start() takes its options inline

    Session settings had to be applied with ini_set() before session_start(), in the right order, from somewhere that ran early enough — which is why so many applications have…

  • Two images instead of the multi-stage build you cannot have yet

    Building assets inside the runtime image drags Node, the whole node_modules tree and a compiler toolchain into production — several hundred megabytes to produce one bundle. There is…

  • composer outdated separates safe from breaking

    composer show –latest lists everything with a newer version, which on a mature project is forty lines that all look equally urgent and are not. The –minor-only list…

  • gzip_static serves a file you compressed once

    gzip on compresses every response as it is sent, which for a static bundle means doing the same CPU work for every visitor to produce an identical result.…