ci-cd

  • PHPUnit 8 and the deprecations with a deadline

    void return types on setUp, and a fatal error rather than a warning. The mechanical pass, the one it cannot do, and the assertion split that is not…

  • BuildKit is the default in 19.03, and it is faster for a reason

    The old builder executes every instruction in order on one goroutine. BuildKit builds a graph, runs independent branches concurrently, and skips stages nothing depends on. The concurrency is…

  • The lock file is the artefact, not the manifest

    composer.json describes what is acceptable; composer.lock describes what was tested. Deploys that run update rather than install are resolving fresh on every release and shipping something no one…

  • COPY the lock file before the source, always

    Docker caches per instruction, and the cache is invalidated by the first changed file. Copying the whole source before installing dependencies means every code change reinstalls everything. The…

  • A content security policy that does not break the site

    The header is one line. The work is finding out what it will break — which means report-only for weeks, and reading violations that are mostly not your…

  • Bitbucket Pipelines caching, and the build minutes it saves

    A pipeline that downloads the same eighty packages on every push is spending most of its allowance on the network, and the fix is four lines. The named…

  • Testing what the database actually does

    The repository test passed against a mock and failed against MySQL. A mock asserts what you believe the database does, which is the thing in question.

  • set -euo pipefail at the top of every script

    A deploy script without it continues after a failed command, so a failed composer install is followed by a successful symlink swap and a broken site reported as…

  • Seven services in one development environment

    Apache, Nginx, PHP, MySQL, Redis, Beanstalkd and a mail catcher, on a laptop. Onboarding measured in minutes rather than days, and what it costs to run.

  • A deploy that is a symlink swap is a deploy you can undo

    Deploying by pulling into the live directory means the site is briefly running half of one release and half of another, and rolling back means pulling again and…