File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,8 @@ public function onFlush(EventArgs $args)
6363 if (isset ($ config ['softDeleteable ' ]) && $ config ['softDeleteable ' ]) {
6464 $ reflProp = $ meta ->getReflectionProperty ($ config ['fieldName ' ]);
6565 $ oldValue = $ reflProp ->getValue ($ object );
66-
67- if (isset ($ config ['hardDelete ' ]) && $ config ['hardDelete ' ] && $ oldValue instanceof \Datetime ) {
66+ $ date = new \ DateTime ();
67+ if (isset ($ config ['hardDelete ' ]) && $ config ['hardDelete ' ] && $ oldValue instanceof \DateTimeInterface && $ oldValue <= $ date ) {
6868 continue ; // want to hard delete
6969 }
7070
@@ -73,7 +73,7 @@ public function onFlush(EventArgs $args)
7373 $ ea ->createLifecycleEventArgsInstance ($ object , $ om )
7474 );
7575
76- $ date = new \ DateTime ();
76+
7777 $ reflProp ->setValue ($ object , $ date );
7878
7979 $ om ->persist ($ object );
You can’t perform that action at this time.
0 commit comments