public function thisPromotionHasExpired(PromotionInterface $promotion) { $promotion->setEndsAt(new \DateTime('1 day ago')); $this->objectManager->flush(); }