Skip to content

Commit 5b8e2f2

Browse files
committed
DateTime -> DateTimeInterface
1 parent a482f11 commit 5b8e2f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Serializers/Native.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Laravel\SerializableClosure\Support\ClosureStream;
1010
use Laravel\SerializableClosure\Support\ReflectionClosure;
1111
use Laravel\SerializableClosure\Support\SelfReference;
12+
use DateTimeInterface;
1213
use ReflectionObject;
1314
use UnitEnum;
1415

@@ -460,7 +461,7 @@ protected function mapByReference(&$data)
460461

461462
$instance = $data;
462463

463-
if ($data instanceof \DateTime) {
464+
if ($data instanceof DateTimeInterface) {
464465
$this->scope[$instance] = $data;
465466

466467
return;

0 commit comments

Comments
 (0)