php-coupling-detector icon indicating copy to clipboard operation
php-coupling-detector copied to clipboard

Move logic to the domain

Open phaseinducer opened this issue 5 years ago • 0 comments

Currently, most of the application logic is located in service-like classes (CouplingDetector and RuleChecker) while the domain is dumb. It would make sense to let the domain be responsible for domain logic and use it directly from the commands without services in the middle.

It would be a good occasion to use more value objects instead of scalars too.

Since some events are dispatched by that logic through Symfony's EventDispatcher we may want to use a message bus instead (something like https://symfony.com/doc/current/components/messenger.html)

phaseinducer avatar Dec 05 '19 15:12 phaseinducer