I have a Subscription
entity that has status
and canceledAt
fields.
I want status
to change from active
to canceled
when canceledAt
has expired.
So, I imagine checking canceledAt in Subscription::getStatus
method:
// Subscription.php
public function getStatus()
{
// .... check canceledAt
return $this->status;
}
but that would also require to change the status at persistence layer.
Should I do something with events?