Engineering notes
Practical write-ups from our day-to-day work. Older articles are updated when the tools change.
- Running the New Relic PHP agent in Docker
A two-container setup for New Relic APM with PHP-FPM: the agent inside the PHP image, the daemon in its own container, and the licence key kept out of the image.
- Using Doctrine ORM without the Symfony framework
How to add Doctrine ORM and its EntityManager to a custom PHP project, including the console tools, with Doctrine ORM 3 and PHP 8 attributes.
- Don't add 86,400 seconds to get the next day
A day is not always 86,400 seconds long. Here is the daylight saving time bug this causes, and the correct way to iterate over dates in PHP.
- Removing duplicate rows in MySQL
Two safe ways to delete duplicates in place, without rebuilding the table or losing AUTO_INCREMENT values.