php

  • An event-driven seam between two services

    The synchronous call between two services was the reason both were down. Publishing an event decouples their availability — and makes eventual consistency a business decision.

  • Laravel 5.4 dropped the model events you were using

    5.4 removed the string-based model events fired through the event dispatcher — eloquent.saved: AppOrder and its relatives — in favour of an $dispatchesEvents map to real classes. The…

  • composer install –no-scripts on a machine you do not trust

    Composer runs scripts declared by packages during install, which is convenient and means composer install executes third-party code the moment it lands. On a CI runner building a…

  • Signed numeric strings compare differently now

    PHP 7.1 changed how a string with a leading sign is treated in a numeric context, which is a correctness fix and a behaviour change in code that…

  • get_id() rather than ->id, and why it matters

    The getter looks like ceremony over a property and is the entire point of the release: with the read going through a method, where the value comes from…

  • Schema changes that do not need a maintenance window

    An ALTER on a 40 million row table held a metadata lock behind every query. Expand, migrate, contract turns one blocking release into three safe ones.

  • Queue retry_after and the job that runs twice

    The queue worker’s –timeout and the connection’s retry_after are two different clocks, and getting their order wrong is the most common cause of a job silently running twice.…

  • 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 —…