Modeling business rules with domain exceptions in Symfony

Cover image for Modeling business rules with domain exceptions in Symfony

Using named domain exceptions to express rejected business rules, roll back commands, cross Symfony Messenger safely, produce RFC 9457 problem responses, and separate expected failures from real incidents.

…

Related writing

July 23, 2026

Making system time an explicit dependency in Symfony

Why reading the system clock inside business logic creates nondeterministic behavior, and how an explicit Clock port makes expiry, validity, scheduling, persistence, and time-sensitive tests predictable.

Read

Need a software engineer?

Send the goal, stack, and timeline. I'll reply with a next step.

Work with me