[symfony-users] Re: Any chance of creating a new Google group for Symfony2 only?
+1 On jún. 22, 07:07, Fabien Potencier wrote: > On 6/21/11 5:49 PM, Luis Cordova wrote: > > > don't fabien you will give more work to everybody > > as you said the problem will be only for few more months > > then sf1.x will die out and problem solved :) > > symfony1 is not going to die anytime soon. End of maintenance is end of > 2012; and people will continue to use it even after that. So, "the end > of life" of symfony1 will probably be in 2015-2020, not sooner. At > Sensio, we still have symfony 1.0 applications that won't be migrated to > 1.4 for instance. And that's fine. > > Fabien > > > > > > > > > On Tue, Jun 21, 2011 at 9:58 AM, Jeremiah Dodds > > wrote: > > >> 2011/6/21 Fabien Potencier > > >>> I've been thinking about this mailing-list issue a lot during the last few > >>> months and I'm still convinced that creating more mailing-lists is not the > >>> right solution. Anyway, as many people think the contrary, here is what I > >>> propose now: > > >>> We create two new mailing-lists: one for symfony1 and one for Symfony2. To > >>> be clear, this mailing-list (symfony-users) will die. That way, there is > >>> no > >>> "legacy" mailing-list, all symfony users will be treated the same way: > >>> they > >>> will have to do something about their subscription. > > >>> If everybody agree, I will start the migration and send invitations for > >>> all current subscribers. > > >>> Cheers, > >>> Fabien > > >> + 1 . How do you feel about having the forums and mailing lists mirror each > >> other via mail2forum or similar? > > >> -- > >> 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
[symfony-users] Re: DoctrineMongoDBBundle missing in Beta1?
Now that Doctrine 2.1 Beta has been released can we use the MongoDB bundle with Symfony 2.0 if we update as described here? Andras On máj. 11, 08:46, jarod wrote: > I found this very help to me on how tomongodbin symfony2Beta1 > > http://forum.symfony-project.org/viewtopic.php?t=35156&p=117640 > > On Apr 29, 11:13 pm, Conrad wrote: > > > > > > > > > Alright, thanks for cheering me up :) > > > I guess it needs some guts anyway to do it all the bleeding edge way ;) > > > Thanks for the nice work and have a good weekend! -- 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
[symfony-users] Re: symfony2 twig subform error messages
No, I finally decided not to use a subform (see below). Originally I wanted to use a subform because 'termsAccepted' was not a property of the class Enterprise. 'termsAccepted' and the class Enterprise were both properties of the Registration class. Now both Enterprise and Registration have the properties username, contactName, etc. I bind the form to the Registration class and later save the values to Enterprise. Twig now looks like this: {{ form_errors(form) }} {{ form_errors(form.username) }} {% trans "username" from "labels" %}: {{ form_field(form.username) }} {{ form_errors(form.contactName) }} {% trans "contact.name" from "labels" %}: {{ form_field(form.contactName) }} {{ form_errors(form.contactEmail) }} {% trans "contact.email" from "labels" %} : {{ form_field(form.contactEmail) }} {{ form_errors(form.password) }} {{ form_errors(form.password.password) }} {% trans "password" from "labels" %} : {{ form_field(form.password.password) }} {% trans "password.again" from "labels" %}: {{ form_field(form.password.passwordAgain) }} {{ form_errors(form.termsAccepted) }} {{ form_field(form.termsAccepted) }} {% trans "terms.accepted" from "labels" %}. {{ form_hidden(form) }} The controller looks like this: public function signupAction() { $registration = new Registration(); $manager = $this->get('doctrine.orm.entity_manager'); $form = RegistrationForm::create($this->get('form.context'), 'registrationForm'); $form->bind($this->get('request'), $registration); if ($form->isValid()) { $factory = $this->get('security.encoder_factory'); $translator = $this->get('translator'); $mailer = $this->get('mail_manager'); $enterprise = $registration->process($manager, $factory, $mailer, $translator); return $this->render('::confirmPublic.twig.html', array('message' => $translator->trans('registered', array(), 'page_messages'))); } return $this->render('AuthBundle:Auth:signup.twig.html', array('form' => $form)); } The form looks like this: class RegistrationForm extends Form { protected function configure() { $this->add(new TextField('username')); $this->add(new TextField('contactName')); $this->add(new TextField('contactEmail')); $this->add(new PasswordField('password')); $this->add(new RepeatedField(new PasswordField('password'), array('first_key' => 'password', 'second_key' => 'passwordAgain'))); $this->add(new CheckboxField('termsAccepted')); } } Registration class looks likes this: class Registration { ... public function process(EntityManager $manager, EncoderFactory $factory, MailManager $mailer, Translator $translator) { $enterprise = new Enterprise(); $enterprise->setUsername($this->username); $enterprise->setContactName($this->contactName); $enterprise->setContactEmail($this->contactEmail); $now = new \DateTime("now"); $enterprise->setCreatedAt($now); $enterprise->setUpdatedAt($now); $enterprise->setLastLogin($now); $enterprise->setEnabled(FALSE); $enterprise->setAccountNonExpired(TRUE); $enterprise->setAccountNonLocked(TRUE); $enterprise->setCredentialsNonExpired(TRUE); $enterprise->setSalt(rand(0, 1)); $confirmationToken = \md5($this->username . $enterprise- >getSalt()); $enterprise->setConfirmationToken($confirmationToken); $encoder = $factory->getEncoder($enterprise); $encrPassword = $encoder->encodePassword($this->password, $enterprise->getSalt()); $enterprise->setPassword($encrPassword); $enterpriseRole = $manager->getRepository('iMARKET\AuthBundle \Entity\Role')->findOneByRole('ROLE_ENTERPRISE'); $enterprise->getAllRoles()->add($enterpriseRole); $manager->persist($enterprise); $manager->flush(); $mailer->sendTemplateEmail($this->contactEmail, $translator- >trans('activate', array(), 'mail_subjects'), 'AuthBundle:Auth:activationEmail.twig.html', array('contactName' => $this->contactName, 'confirmationToken' => $confirmationToken)); return $enterprise; } ... } On ápr. 5, 08:20, F
[symfony-users] Re: [symfony2, PR7] customizing validation messages for form fields
Thanks, but RepeatedField has a getter constraint, not a property constraint, and I don't know where and how to override the message: The two values should be equal Andras On márc. 8, 17:56, oscar balladares wrote: > Hi. > > If you are using a YML file, remember to override the "message" property. > > For example: > > someColumName: > AssertType: > type: Integer > message: { "This value must be an integer" } > > If you have read the validation documentation you should get the idea :D > > Sorry, I haven't worked with RepeatedField. > > 2011/3/8 Andras > > > Hi, > > > How can I customize the validation messages for form fields like > > RepeatedField ("The two values should be equal.")? > > > Andras > > > -- > > 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
[symfony-users] [symfony2, PR7] customizing validation messages for form fields
Hi, How can I customize the validation messages for form fields like RepeatedField ("The two values should be equal.")? Andras -- 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
[symfony-users] [Symfony2] password empty after login
Hi, After a successful form-based/Doctrine Entity Provider login I am trying to retrieve the encrypted password of the user by $password = this->get("security.context")->getUser()->getPassword(); $password is empty though I can see that it is not empty in the database. print_r($this->get('security.context')) returns the following: ... [user:protected] => iMARKET\SignUpBundle\Entity\Enterprise Object ( [id:protected] => 3 [contact_name:protected] => Test User2 [contact_email:protected] => te...@test.hu [username:protected] => test2 [password:protected] => [salt:protected] => 4259 ... [originalEntityData:Doctrine\ORM\UnitOfWork:private] => Array ( [63ad1ee54d32053c] => Array ( [id] => 3 [username] => test2 [password] => 8aa8b391cd368edf237aab80b4f53cabf89dc4cb [salt] => 4259 ... What's the problem, why can't I retrieve the password by simply calling getPassword after login? Andras -- 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
[symfony-users] Re: symfony2 RepeatedField
Hi, I'm trying to change the default error message for RepeatedField ("The two values should be equal.") but I can't figure out how to do it. Andras On febr. 15, 14:53, Bernhard Schussek wrote: > Hi Andras, > > Please don't cross post. I have answered your question in your > previous thread already. > > Bernhard -- 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
[symfony-users] Re: [Symfony2] acessing the container inside custom validators
Hi, Could you please be more specific? E.g. I would like to create a validator which returns FALSE if a username already exists in one of the database tables. Could you please write a code example for 1. adding the Entity Manager as a parameter 2. adding the validator as an annotation to a property in a class configuration Andras On jan. 21, 12:06, stof wrote: > On Fri, 21 Jan 2011 02:45:08 -0800 (PST), cestcri > wrote: > > > Hello, > > > is there a way do access the container and thus services from inside > > custom validators? > > > Thanks in advance, > > Christian > > You have to define yourvalidatoras a service to be able to give him its > dependencies. > Seehttp://docs.symfony-reloaded.org/master/guides/validator/constraints > for the doc. > > Regards > > -- > Christophe | Stof -- 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
[symfony-users] Re: symfony2 twig subform error messages
Hi, A bit shorter version of my question: I have a form with a subform called enterprise. How can I print the field validation errors with twig? E.g. {{ form_errors(form.enterprise.username) }} does not work for the field username. Andras On febr. 15, 11:42, Andras wrote: > Hi, > > I'm trying to print the error messages for the fields of the subform > called enterprise in twig: > > If I do it like this no messages appear (except for > form_errors(form.termsAccepted)): > > {{ form_errors(form) }} > {{ form_errors(form.enterprise.username) }} > {{ form_label(form.enterprise.username) }}: > {{ form_field(form.enterprise.username) }} > {{ form_errors(form.enterprise.contact_name) }} > {{ form_label(form.enterprise.contact_name) }}: > {{ form_field(form.enterprise.contact_name) }} > {{ form_errors(form.enterprise.contact_email) }} > {{ form_label(form.enterprise.contact_email) }}: > {{ form_field(form.enterprise.contact_email) }} > {{ form_errors(form.enterprise.password.first) }} > {{ form_label(form.enterprise.password.first) }}: > {{ form_field(form.enterprise.password.first) }} > {{ form_errors(form.enterprise.password.second) }} > {{ form_label(form.enterprise.password.second) }}: > {{ form_field(form.enterprise.password.second) }} > {{ form_errors(form.termsAccepted) }} > {{ form_field(form.termsAccepted) }} > {{ form_label(form.termsAccepted) }} > {{ form_hidden(form) }} > > If I write {{ form_errors(form.enterprise) }} to the top it shows all > of the subform error messages at once at the top of the form. Is this > a bug or am I doing something the wrong way? > > Andras -- 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
[symfony-users] symfony2 RepeatedField
Hi, I have added a RepeatedField to a form: $enterprise->add(new RepeatedField(new PasswordField('password'), array('first_key' => 'password', 'second_key' => 'password_again'))); How can I change the labels Password and Password again in Twig? {{ form_label(form.enterprise.password, 'Password') }}: {{ form_field(form.enterprise.password) }} Regards, Andras -- 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
[symfony-users] symfony2 twig subform error messages
Hi, I'm trying to print the error messages for the fields of the subform called enterprise in twig: If I do it like this no messages appear (except for form_errors(form.termsAccepted)): {{ form_errors(form) }} {{ form_errors(form.enterprise.username) }} {{ form_label(form.enterprise.username) }}: {{ form_field(form.enterprise.username) }} {{ form_errors(form.enterprise.contact_name) }} {{ form_label(form.enterprise.contact_name) }}: {{ form_field(form.enterprise.contact_name) }} {{ form_errors(form.enterprise.contact_email) }} {{ form_label(form.enterprise.contact_email) }}: {{ form_field(form.enterprise.contact_email) }} {{ form_errors(form.enterprise.password.first) }} {{ form_label(form.enterprise.password.first) }}: {{ form_field(form.enterprise.password.first) }} {{ form_errors(form.enterprise.password.second) }} {{ form_label(form.enterprise.password.second) }}: {{ form_field(form.enterprise.password.second) }} {{ form_errors(form.termsAccepted) }} {{ form_field(form.termsAccepted) }} {{ form_label(form.termsAccepted) }} {{ form_hidden(form) }} If I write {{ form_errors(form.enterprise) }} to the top it shows all of the subform error messages at once at the top of the form. Is this a bug or am I doing something the wrong way? Andras -- 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