[?] Ok, I got your point. Of course, it is up to the developer to remember everything, and debug any issue during the life cicle of the app. If not then he/she wouldn't be a developer.
But I'm pretty sure that you mean that you want more abstraction. You could: <?php namespace bla\bla\Entity; use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder; Class User { public function setPassword($password) { $this->salt = md5(time()); } } 2011/5/30 Vincent Lechemin <vincent.leche...@gmail.com> > Ops, the forced parameter in the constructor is not a good idea for an > entity :p > > -- > Vincent > On May 30, 2011 9:29 AM, "Vincent Lechemin" <vincent.leche...@gmail.com> > wrote: > > Hi, > > you could use doctrine events such as preUpdate and prePersist. Then > adding > > the encoder service in the constructor could be a way to enforce the > > encryption. For the fixtures, you have access to the container so it > should > > not be a problem. > > > > -- > > Vincent > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
<<338.gif>>