FriendsOfSymfony/FOSUserBundle — pull request #957 by scribblet (2013-01-18 04:07:36+00:00)
Title: Modify user variables to be nullable when expecting a DateTime 

If you create a simple CRUD application to work with FOSUserBundle entities (e.g. generate:doctrine:crud) and intend to enable editing of entities (as an Admin might want to do), you cannot bind a form back to the entity on submit as by default there are no password/credentials/expiresAt set when creating a user so null is passed back through the form to Doctrine for those fields. The problem with this is that because null is not a Datetime object, Doctrine cries when expecting a Datetime value and therefore you are forced to submit valid datetime values for those fields when editing unrelated fields (such as email address etc).

To get around this you can add a default Datetime set to null and therefore you are not forced to set a time for these fields when updating other fields unless you specifically want to.