Throw exception if value cannot be cast to a string in `AbstractQueryBuilder::prepareValue()`
https://github.com/yiisoft/db/blob/8e175974dabf6da4ff8e4197a6e3b9a9014c79ee/src/QueryBuilder/AbstractQueryBuilder.php#L493-L497
Currently it already throws an exception
Fatal error: Uncaught Error: Object of class DateTime could not be converted to string
I mean something like DB param value don't support "DateTimeInterface".
Fatal error: Uncaught Error: Object of class DateTime could not be converted to string looks like bug in Yii DB.
But exception adding can lead to performance degradation.
This is an unhandled exception. We don't care much about performance in this case, since it is executed only once.
But, overall, I think that binding DateTimeInterface instances is quite common...
This is an unhandled exception. We don't care much about performance in this case, since it is executed only once.
Currently it is not exception, it is fatal error. For introduce exception we should add new checks and throw exception manually.
I think this is a common-enough case to try handling it.