Transactions? Not your problem!
In most PHP projects, transaction management falls on the developer. But a forgotten DB::transaction() or a missing rollback, and the data sometimes ends up in an inconsistent state.
In most PHP projects, transaction management falls on the developer. But a forgotten DB::transaction() or a missing rollback, and the data sometimes ends up in an inconsistent state.
You have been doing MVC for ten years. Someone drops "Clean Architecture" in a meeting. You nod.
But concretely, what becomes of your Model?
At the start of a project, you lay down grand principles: "the Domain never imports the Application layer", "Controllers do not access repositories directly." Three months later, an import slips through, nobody notices, and the boundaries fade away.
Testing code that uses new DateTime('now') or time() is painful. You end up mocking native functions, or accepting fragile tests that fail at midnight.
Direct dependency on a concrete implementation causes the same kind of problems for the logger, the cache, or the ID generator...
In many PHP projects, CQRS is applied systematically. Every operation goes through a Command or Query Bus, with handlers, middleware, and event dispatching. For a homepage that displays three statistics, that is pointless boilerplate.
CQRS is not the problem. Its systematic application is.