Yannick Voyer

Results 22 comments of Yannick Voyer

To add more sugar to the command, maybe we could add a static factory method `EditPostCommand::fromPost (Post $post): EditPostCommand`. That way instead of changing the controller when adding a new...

@webdevilopers I may add a suggestion on how to solve this. Maybe you could use an interface for your `Timesheet` that would be implemented by the `Contract` and `Employye`. From...

I'm unsure how to handle interfaces that could cross BC. Whether it is a bad practice or its a soft dependency. IMO, I would prefer the AR to use the...

Or `ContractType` is an interface that is in charge of creating the `Contract`. ```php inteface ContractType { public function createContract(): EmploymentContract; } final class FixedContractType implements ContractType { public function...

The same aggregate could still manage both types: ```php final class EmploymentContract extends AggregateRoot { protected function onFixedContractWasSigned(FixedContractWasSigned $event): void { // ... } protected function onPermanentContractWasSigned(PermanentContractWasSigned $event): void {...

@webdevilopers I am wondering why you need the document to be returned by the repository, is it necessary. If it is required by the handler, or a controller, the `UploadInvoiceDocument`...

> It is still technically possible to modify $bars from the outside, as the returned stuff is actually an ArrayCollection for PHP. But it's not for developers. Developers won't know...

I would go with **Version 1**, but define the `DormerType` argument as an interface. I know it feels ugly to pass the entity to the value object, but in reality,...

As a side note: It feels like the `DormerCalculationFactory` is more of a handler than a factory. IMO, a factory would created an object, where the current implementation seems to...

The problem if you pass only the id, is that you lose the option to check whether a gutter can be added, since the `DormerTypeId` do not know about the...