Skip to content

Commit

Permalink
Added deprecation warning when using non-DateTimeTypes in TimestampBe…
Browse files Browse the repository at this point in the history
…havior
  • Loading branch information
jeremyharris committed Mar 19, 2018
1 parent 606717f commit 2a9f691
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ORM/Behavior/TimestampBehavior.php
Expand Up @@ -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;
Expand Down

0 comments on commit 2a9f691

Please sign in to comment.