In Search of the Missing PDO Interface

PHP’s PDO extension has been the standard database abstraction layer since PHP 5.1. It does its job well: it provides a unified API over multiple database drivers and handles the low-level details of connecting, querying, and fetching results. Yet, after nearly two decades, PDO is still missing something fundamental: an interface. This might seem like a minor inconvenience, but the consequences ripple across the PHP ecosystem in ways that are worth examining. This post explores the gap, the workarounds the community has invented to fill it, and what a minimal standard interface could look like. ...

March 1, 2026 · 9 min · Maxime Gosselin

Using the Middleware Pattern to Extend PHP Libraries

If you have been writing PHP professionally for the past few years, you have almost certainly encountered PSR-15. It formalized the concept of middleware for HTTP request handling, and it changed the way we think about extensibility in PHP applications. But here is the thing: the idea behind PSR-15 is too good to leave confined to HTTP. This article is for PHP developers who maintain libraries. If you have ever exposed an extension point in your library using the Decorator pattern, I want to show you a better default. ...

February 27, 2026 · 7 min · Maxime Gosselin