Use namespaced Doctrine annotations
[MAILPOET-2437]
This commit is contained in:
committed by
Jack Kitterhing
parent
f27946444e
commit
48802e47c4
@@ -42,7 +42,7 @@ class ConfigurationFactory {
|
||||
// register annotation reader if doctrine/annotations package is installed
|
||||
// (i.e. in dev environment, on production metadata is dumped in the build)
|
||||
if (class_exists(SimpleAnnotationReader::class)) {
|
||||
$configuration->setMetadataDriverImpl($configuration->newDefaultAnnotationDriver([self::ENTITY_DIR]));
|
||||
$configuration->setMetadataDriverImpl($configuration->newDefaultAnnotationDriver([self::ENTITY_DIR], false));
|
||||
} else {
|
||||
// Should never be called but Doctrine requires having driver set
|
||||
$configuration->setMetadataDriverImpl(new PHPDriver([]));
|
||||
|
@@ -2,11 +2,13 @@
|
||||
|
||||
namespace MailPoet\Doctrine\EntityTraits;
|
||||
|
||||
use MailPoetVendor\Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
trait AutoincrementedIdTrait {
|
||||
/**
|
||||
* @Column(type="integer")
|
||||
* @Id
|
||||
* @GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @var int|null
|
||||
*/
|
||||
private $id;
|
||||
|
@@ -3,10 +3,11 @@
|
||||
namespace MailPoet\Doctrine\EntityTraits;
|
||||
|
||||
use DateTimeInterface;
|
||||
use MailPoetVendor\Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
trait CreatedAtTrait {
|
||||
/**
|
||||
* @Column(type="datetimetz")
|
||||
* @ORM\Column(type="datetimetz")
|
||||
* @var DateTimeInterface
|
||||
*/
|
||||
private $created_at;
|
||||
|
@@ -3,10 +3,11 @@
|
||||
namespace MailPoet\Doctrine\EntityTraits;
|
||||
|
||||
use DateTimeInterface;
|
||||
use MailPoetVendor\Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
trait DeletedAtTrait {
|
||||
/**
|
||||
* @Column(type="datetimetz", nullable=true)
|
||||
* @ORM\Column(type="datetimetz", nullable=true)
|
||||
* @var DateTimeInterface|null
|
||||
*/
|
||||
private $deleted_at;
|
||||
|
@@ -3,10 +3,11 @@
|
||||
namespace MailPoet\Doctrine\EntityTraits;
|
||||
|
||||
use DateTimeInterface;
|
||||
use MailPoetVendor\Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
trait UpdatedAtTrait {
|
||||
/**
|
||||
* @Column(type="datetimetz")
|
||||
* @ORM\Column(type="datetimetz")
|
||||
* @var DateTimeInterface
|
||||
*/
|
||||
private $updated_at;
|
||||
|
Reference in New Issue
Block a user