-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Narrow responsibilities in datetime related types #6017
Conversation
8207344
to
fef8c3c
Compare
f5e3389
to
ebe6512
Compare
I think you are doing this because in case a user wants to save the timezone but shoots themselves in the foot by picking the wrong type, is that it? |
|
14b3b34
to
2d57b7a
Compare
Thanks @phansys ! |
Passing an instance of DateTimeImmutable is deprecated, use Doctrine\DBAL\Types\DateTimeImmutableType::convertToDatabaseValue() instead. (DateTimeType.php:51 called by UTCDateTimeType.php:41, doctrine/dbal#6017, package doctrine/dbal)
Summary
DateTime|null
toDateType
,TimeType
,DateTimeType
,DateTimeTzType
andVarDateTimeType
;new DateTime()
andnew DateTimeImmutable()
are used as replacement todate_create()
anddate_create_immutable()
procedural functions.