Hi, Although a bit late I just started try Symfony2 out. To me it is also a good chance to try new things including features in PHP 5.3, Doctrine 2 and MongoDB. So yeah, everything seems new to me. It is still too early for me to comment on the good or bad of the current documentation, but there are something that make me feel lost for a moment. Here are what I encountered visiting 2 particular pages - Forms and MongoDB, but some issues are general and can apply to other pages as well.
First the "Forms" page (http://symfony-reloaded.org/guides/Forms). It is the code below that make me feel lost: -------------------------- # src/Application/HelloBundle/Controller/HelloController.php public function signupAction() { $customer = new Customer(); $form = new Form('customer', $customer, $this->container- >getValidatorService()); $form->add(new TextField('name')); $form->add(new IntegerField('age')); return $this->render('HelloBundle:Hello:signup', array('form' => $form)); } -------------------------- Two suggestions - (1) I think the document should be targeted to a) new comers to Symfony2, or even b) new comers to Symfony2 and PHP 5.3. Symfony2 uses namspace everywhere. In the above example, "Form", "TextField", "IntegerField" classes are under the namespace "Symfony\Components \Form", but are used without any namespace reference. It seems reasonable to state the namespace explicitly, or add "use" statements before the public function. To me I don't mind reading code like "new Symfony\Components\Form \Form()", it is clear and verbose, and shouldn't be too verbose as the example code is short. (2) "$this->container->getValidatorService()" is quite a sudden introduction, and this method call requires a setup before use. As the document is ought to be independent I suggest to add a note saying something like "Validation service needs to be setup first. Please refer to the Validation documentation". Then for the "MongoDB" page (http://symfony-reloaded.org/guides/ Doctrine/MongoDB), also some suggestions: (1) It's better to have a note reminding the developer to enable the DoctrineMongoDBBundle in HelloKernel.php. (2) Add "use Application\HelloBundle\Documents\User;" before the class definition of UserController. (3) Not very important, how about a "listAction" for a more complete feature demonstration: public function listAction() { $dm = $this->container- >getService('doctrine.odm.mongodb.document_manager'); $users = $dm->getRepository('Application\HelloBundle\Documents \User')->findAll(); // ... } That's all for now. And finally, any plan for a separate user gruop for Symfony2? Not sure about devs, but seems essential for users. Thanks again for the great work! Tamcy -- 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 developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
