for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Bone\BoneDoctrine\Traits;
use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\HasLifecycleCallbacks
*/
trait HasUpdatedAtDate
{
* @ORM\Column(type="datetimm", nullable=true)
private ?DateTimeImmutable $updatedAt;
public function getUpdatedAt(): \DateTimeInterface
return $this->updatedAt;
return $this->updatedAt
null
DateTimeInterface
}
* @@ORM\PreUpdate
public function setUpdatedAt(): void
$this->updatedAt = new DateTimeImmutable();