Skip to content

Commit 01da0ea

Browse files
committed
ISSUE-344: test fix
1 parent 0ef87b6 commit 01da0ea

File tree

7 files changed

+3
-27
lines changed

7 files changed

+3
-27
lines changed

src/Domain/Model/Identity/Administrator.php

-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ class Administrator implements DomainModel, Identity, CreationDate, Modification
4242
#[ORM\Column(name: 'created', type: 'datetime')]
4343
protected ?DateTime $creationDate = null;
4444

45-
#[ORM\Column(name: 'modified', type: 'datetime')]
46-
protected ?DateTime $modificationDate;
47-
4845
#[ORM\Column(name: 'modifiedby', type: 'string', length: 66, nullable: true)]
4946
protected ?string $modifiedBy;
5047

src/Domain/Model/Messaging/ListMessage.php

-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ class ListMessage implements DomainModel, Identity, ModificationDate
2727
#[ORM\Column(name: 'messageid', type: "integer")]
2828
private int $messageId;
2929

30-
#[ORM\Column(name: 'modified', type: 'datetime')]
31-
protected ?DateTime $modificationDate;
32-
3330
#[ORM\Column(name: "listid", type: "integer")]
3431
private int $listId;
3532

src/Domain/Model/Messaging/SendProcess.php

+1-8
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#[ORM\Entity]
1616
#[ORM\Table(name: "phplist_sendprocess")]
17+
#[ORM\HasLifecycleCallbacks]
1718
class SendProcess implements DomainModel, Identity, ModificationDate
1819
{
1920
use IdentityTrait;
@@ -22,9 +23,6 @@ class SendProcess implements DomainModel, Identity, ModificationDate
2223
#[ORM\Column(name: "started", type: "datetime", nullable: true)]
2324
private ?DateTime $started = null;
2425

25-
#[ORM\Column(name: "modified", type: "datetime", options: ["default" => "CURRENT_TIMESTAMP"])]
26-
private ?DateTime $modificationDate = null;
27-
2826
#[ORM\Column(name: "alive", type: "integer", nullable: true, options: ["default" => 1])]
2927
private ?int $alive = 1;
3028

@@ -45,11 +43,6 @@ public function setStartedDate(DateTime $started): self
4543
return $this;
4644
}
4745

48-
public function getModificationDate(): ?DateTime
49-
{
50-
return $this->modificationDate;
51-
}
52-
5346
public function getAlive(): ?int
5447
{
5548
return $this->alive;

src/Domain/Model/Messaging/SubscriberList.php

-4
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ class SubscriberList implements DomainModel, Identity, CreationDate, Modificatio
5454
#[Groups(['SubscriberList'])]
5555
protected ?DateTime $creationDate = null;
5656

57-
#[ORM\Column(name: 'modified', type: 'datetime')]
58-
#[Ignore]
59-
protected ?DateTime $modificationDate = null;
60-
6157
#[ORM\Column(name: 'listorder', type: 'integer', nullable: true)]
6258
#[SerializedName('list_position')]
6359
#[Groups(['SubscriberList'])]

src/Domain/Model/Subscription/Subscriber.php

-4
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ class Subscriber implements DomainModel, Identity, CreationDate, ModificationDat
4343
#[Groups(['SubscriberListMembers'])]
4444
protected ?DateTime $creationDate = null;
4545

46-
#[ORM\Column(name: 'modified', type: 'datetime')]
47-
#[Ignore]
48-
protected ?DateTime $modificationDate = null;
49-
5046
#[ORM\Column(unique: true)]
5147
#[SerializedName('email')]
5248
#[Groups(['SubscriberListMembers'])]

src/Domain/Model/Subscription/Subscription.php

-4
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ class Subscription implements DomainModel, CreationDate, ModificationDate
3838
#[SerializedName('creation_date')]
3939
protected ?DateTime $creationDate = null;
4040

41-
#[ORM\Column(name: 'modified', type: 'datetime')]
42-
#[Ignore]
43-
protected ?DateTime $modificationDate = null;
44-
4541
#[ORM\Id]
4642
#[ORM\ManyToOne(
4743
targetEntity: 'PhpList\Core\Domain\Model\Subscription\Subscriber',

src/Domain/Model/Traits/ModificationDateTrait.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
*/
2020
trait ModificationDateTrait
2121
{
22-
private DateTime $modificationDate;
22+
#[ORM\Column(name: 'modified', type: 'datetime')]
23+
private ?DateTime $modificationDate = null;
2324

2425
public function getModificationDate(): ?DateTime
2526
{

0 commit comments

Comments
 (0)