A Composable PHP Component System
React taught me to think in components with typed props. This is how I get the same thing in plain PHP: a tiny abstract base, a typed options object per component, and a static factory that renders.
Writing about web development and how to be solutions oriented.
React taught me to think in components with typed props. This is how I get the same thing in plain PHP: a tiny abstract base, a typed options object per component, and a static factory that renders.
A strict Content Security Policy sounds like a project. In Laravel it is one middleware and a handful of directives. Here is the whole thing, why each line is there, and how to keep it from breaking local dev.
Build the tools you rely on. Not to replace them, but to understand them. Here's how working through an ORM decision turned Doctrine's typed fields and Eloquent's casts from magic I used into choices I could actually read.
Most CSRF tokens only prove a request came from your form. This article explains how to take form tokens further: they can carry the processor class and method to run, so the URL becomes a hint and the token becomes the source of truth.
Swap data for abstract tokens before calling an LLM, then detokenize the response. You get AI-powered insights while the real data never leaves your server.
Replace loose template variables with typed PHP view classes that enforce contracts between controllers and views, compose like React components, and unit test without booting a framework.
AI can build a feature in an afternoon that used to take a week. That's great, but that speed comes with a cost, and it is not just in the code.