2010/12/31 Christophe COEVOET <[email protected]>: > Le 31/12/2010 05:09, chesteroni a écrit : >> Hello! >> >> I just started my adventure with Symfony and I chose sf2. I managed to >> run sanbox, DBAL connection too. >> And I got stuck when it came to do db-based user auth. So I can >> suggest you to make sandbox example more complex, e.g. like Zend >> Framework one. I really would like some Doctrine usage examples, >> especially for authentication. > > Did you look at http://docs.symfony-reloaded.org/master/index.html ? Of course, I read most of guides. It is normal for me to read doc and run few examples. I really dislike to ask questions which are easy-to-answer. Answers for my questions may be obvious to you, but for me - they aren't. That's because many things have been written by people who don't remember that some things are not out-of-the box and that easy, obvious, one simple activity is a black magic for newcomers.
> It describes the basic use of Doctrine in a Sf2 project. It doesn't. Really. Much need to be written to describe real basics, advanced usage is something different but for me basic use mean that after reading a guide I will understand how to create simple DB structure, deal with 1-many and many-many relations and manage records via Framework. Threse are basics, absent as you know. The best way to understand is learning-by-example - that is why I requested for sandbox improvements (followed by detailed howto). For me Doctrine basics on that page are gobbledygook (funny word, http://en.wiktionary.org/wiki/gobbledygook ). There should be some detailed explanation of how it works, what are possible options, how it may be connected with users' bundles etc. Explanation followed by working examples. > If you wan to use authentication from your database you can also look at > https://github.com/FriendsOfSymfony/UserBundle which implements it. It only looks nice - it doesn't work. I followed the installation manual and nothing is working - they missed the most important point: HOW to create tables etc. I configured it to orm, created class User with proper namespaces etc. Then the next step should be to create user with console: php app/console fos:user:create chesteroni [email protected] paswo The output: PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'The user model class must be defined' in /home/chester/workspace/projectname/src/Bundle/FOS/UserBundle/DependencyInjection/UserExtension.php:41 I clearly should do something, which I didn't. For sure - something obvious. But what? >> Also I've noticed that Doctrine guide mentions 'migrations' but >> SF2:PR4 console app does not work with migrations. > > The console works with Migrations if you enable the DoctrineMigrationsBundle > (which is in the core) in your AppKernel. Ok, my mistake. But after uncommenting it still doesn't work. The cause is outdated version od Doctrine2 in SF2:PR4 distribution. I found error message in Google and figured out that was the bug with dealing with ENUM fields in MySQL which was fixed month ago (or so). chesteroni -- 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
