From 2a9f6918c7acb6c21490d4e94eb28545e3cc3e28 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Mon, 19 Mar 2018 16:40:51 -0500 Subject: [PATCH] Added deprecation warning when using non-DateTimeTypes in TimestampBehavior --- src/ORM/Behavior/TimestampBehavior.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ORM/Behavior/TimestampBehavior.php b/src/ORM/Behavior/TimestampBehavior.php index 48d0539e52f..5cbcfcf5d1f 100644 --- a/src/ORM/Behavior/TimestampBehavior.php +++ b/src/ORM/Behavior/TimestampBehavior.php @@ -206,6 +206,7 @@ protected function _updateField($entity, $field, $refreshTimestamp) $type = Type::build($columnType); if (!$type instanceof Type\DateTimeType) { + deprecationWarning('TimestampBehavior support for column types other than DateTimeType will be removed in 4.0.'); $entity->set($field, (string)$ts); return;