The same acceptance tests, on four different databases
Hexagonal architecture promises adapter interchangeability, but in practice, this promise often remains implicit, with nothing in the code to verify it.
Hexagonal architecture promises adapter interchangeability, but in practice, this promise often remains implicit, with nothing in the code to verify it.
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...