src/Domain/AggregateRoot/EventSourcedAggregateRoot.php
final protected function applyChange(Serializable $payload)
    {
        $this->apply($payload);
        $this->changes()->addEventFromPayload($payload);
    }
final protected function applyChange(Serializable $payload)
    {
        $this->apply($payload);
        $this->changes()->addEventFromPayload($payload);
    }
final protected function applyChange ( Serializable $ payload ) { $ this -> apply ( $ payload ) ; $ this -> changes ( ) -> addEventFromPayload ( $ payload ) ; }
Mutate the state of the aggregate by applying a domain event.
Keep track of the change until it has been successfully committed.

@param Serializable $payload
Mutate the state of the aggregate by applying a domain event . Keep track of the change until it has been successfully committed .