Uncategorized

  • phpunit.xml groups let CI split the suite

    A suite that takes twenty minutes gets run less often, which is the opposite of what it is for. Groups let the fast tests gate every push and…

  • HSTS is a commitment you cannot withdraw quickly

    The header tells browsers to refuse plain HTTP to this host for the given duration, and they honour it from cache — so shortening the max-age only affects…

  • Queues, workers and the jobs that fail twice

    The email that arrived four times and the charge that arrived twice. What makes a job safe to run again, and keeping workers alive without them serving stale…

  • HTTP/2 in nginx needs TLS and a recent build

    HTTP/2 does not require encryption in the specification and does in every browser, so in practice it arrives with the certificate. nginx 1.9.5 replaced the SPDY module with…

  • Argument order decides how readable the failure is

    PHPUnit takes the expected value first and the actual second, and getting them the wrong way round produces a test that passes and fails identically — but reports…

  • CQRS is two models, not two databases

    The pattern gets introduced alongside event sourcing, separate stores and eventual consistency, which makes it look like an architecture. The idea underneath is smaller: the shape that is…

  • define() takes an array constant now

    const has accepted arrays since 5.6, but define() had not — which mattered because const cannot be used conditionally or inside a function, so anything computed at bootstrap…

  • 5.7 turned strict mode on, and old inserts started failing

    The default sql_mode changed, and with it a decade of behaviour: inserting a string into a numeric column, a date of 0000-00-00, or more characters than the column…

  • The shutdown hook runs after the response is sent

    shutdown is the last action WordPress fires, and by then the output has already gone to the client — so it is the right place for bookkeeping and…

  • webpack resolve.alias removes the ../../..

    A deep component importing a helper writes ../../../lib/money, and the path breaks the moment the file moves — which makes reorganising a tree a mechanical exercise in fixing…