webDEVILopers
webDEVILopers
That indeed is another discussion. Personally I never regard this code duplication. It is the same code technically. But I to prefer to look at the contexts the method exists...
> On the other side if you are using PHP 8 you can also shorten it a little bit this way: Nice! The next project will start with PHP8. I...
> So I think the only question remaining is "what happens if you have an invalid value in any of the properties (e.g. spotId) and the VO initialization fails? Good...
> What do you think is the right balance? I like the explanation by @matthiasnoback here: > My general rule is to have only immediately serializable data in a DTO...
> Something I was unable to see in #44 is - do you double the validations within the VOs? Indeed we sometimes "duplicate" validation - again: technically. But from the...
> One last thing - I see you are (ab)using the DomainException. Take care - it extends LogicException which is explained as "Exception that represents error in the program logic....
Related: https://github.com/prooph/event-store-symfony-bundle/issues/73 **Registered Upcaster Plugin is not recognized by Projection**
Of course there is Option #4 and go full event-driven. An Event could create the Order and then a Saga / Process Manager fires a "checkCredit" Event etc. - but...
In general a process manager subscribes to (Domain or Application) Events. Each event can fire one or more new command(s). The manager can decide which command to fire based on...
Does it help @iosifch?