[symfony-users] Re: SF2: Missing hydrators for MongoDB
Or at least mention the generate:hydrators :) On 22 juin, 12:12, Adrien Mogenet wrote: > Hi everyone, > > I was playing with Doctrine and MongoDB thanks to SF2, and I observed > that a configuration line was missing in your documentation. > > doctrine_mongodb: > auto_generate_hydrator_classes: true > > Otherwise, lots of things won't work properly... > Regards, -- 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] SF2: Missing hydrators for MongoDB
Hi everyone, I was playing with Doctrine and MongoDB thanks to SF2, and I observed that a configuration line was missing in your documentation. doctrine_mongodb: auto_generate_hydrator_classes: true Otherwise, lots of things won't work properly... Regards, -- 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 : Query MongoDB collection
Seriously dude... I checked ; several times. Here is the version I had in my tab : http://twitpic.com/5ef73k Documentation has just been updated recently, I didn't had your version even 1 hour ago... Thanks anyway On 20 juin, 21:27, Christophe COEVOET wrote: > Le 20/06/2011 21:17, Adrien Mogenet a �crit :> I don't get it... from the > documentation link I was talking about, > > User class was annotated with : > > > /** @mongodb:Document(collection="users") */ > > > I used this syntax ; you tell me this one is wrong ? > > When following the link, I see / > > use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; > > /** > * @MongoDB\Document/ > *// > class Product/ > > Please compare to what you write and use this syntax. It is not the same > than the one you use. > > -- > 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 : Query MongoDB collection
I don't get it... from the documentation link I was talking about, User class was annotated with : /** @mongodb:Document(collection="users") */ I used this syntax ; you tell me this one is wrong ? On 20 juin, 21:10, Christophe COEVOET wrote: > Le 20/06/2011 21:05, Adrien Mogenet a crit : > > > > > > > > > Hi everyone, > > > I'm still trying to query my MongoDB store thanks to symfony2 and > > Doctrine ODM. > > > I'm following these instructions > > :http://symfony.com/doc/current/cookbook/doctrine/mongodb.html > > > So I tried : > > $dm = $this->get('doctrine.odm.mongodb.document_manager'); > > $user = $dm->createQuery('find all from AcmeHelloBundle:User where id > > = ?', $id); > > > And I got an "undefined method Doctrine\ODM\MongoDB > > \DocumentManager::createQuery() ", so I tried with > > "createQueryBuilder" but I got : > > > The annotation "@mongodb:Document" in class MC\CardBundle\Document > > \Card was never imported. > > This annotation is wrong. Look at the doc using the link you pasted to > see the correct syntax. Once it is fixed you should be able to use the ODM. > > > I also tried this other mentionned query : $user = $dm- > >> find('AcmeHelloBundle:User', $id); but it gave me the same error > > message. > > And thus my question is : how the hell can I query my datastore ? :) > > > 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] Symfony2 : Query MongoDB collection
Hi everyone, I'm still trying to query my MongoDB store thanks to symfony2 and Doctrine ODM. I'm following these instructions : http://symfony.com/doc/current/cookbook/doctrine/mongodb.html So I tried : $dm = $this->get('doctrine.odm.mongodb.document_manager'); $user = $dm->createQuery('find all from AcmeHelloBundle:User where id = ?', $id); And I got an "undefined method Doctrine\ODM\MongoDB \DocumentManager::createQuery() ", so I tried with "createQueryBuilder" but I got : The annotation "@mongodb:Document" in class MC\CardBundle\Document \Card was never imported. I also tried this other mentionned query : $user = $dm- >find('AcmeHelloBundle:User', $id); but it gave me the same error message. And thus my question is : how the hell can I query my datastore ? :) Regards, -- 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: Lost with Symfony2 forms
But if I'm using it with Doctrine, I don't like to see the Doctrine object definitions completely disconnected from another namespace declaration (eg Application\MyBundle\Cart\CartRequest.php and Document \Cart.php). On 6 fév, 15:59, Bernhard Schussek wrote: > Hi Adrien, > > 2011/2/6 Adrien Mogenet : > > > What's the strategy here ? What should be the namespace of Form > > classes and Domain Objects ? > > There's no best practice for this yet. It depends on how you organize > your namespaces. If you organize them by your business domain > (Contact, Sales, etc.) it makes sense to put forms in the same > namespace as the according domain objects. You can also organize your > code by technical aspects (Model, Form, etc.), like it was in sf1. > > I personally prefer the first approach, but it's really up to you. > > Bernhard > -- > Software Architect & Engineer > Blog:http://webmozarts.com > Twitter:http://twitter.com/webmozart -- 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] Lost with Symfony2 forms
Hi, I'm appreciating overview of sf2 forms, but I don't understand, according to the documentation, what's the /bundle/Contact folder ? What's the strategy here ? What should be the namespace of Form classes and Domain Objects ? I can make it work, but not sure I get the good way here, with crappy and redondant namespaces and heavy inclusions within the controller. Is there any concrete article / tutorial ? -- 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: Desactivate Twig auto escaping ?
Or if you doing it just on a few cases : {% autoescape false %} Everything will be outputed as is in this block {% endautoescape %} On 3 fév, 10:17, stof wrote: > On Thu, 3 Feb 2011 08:57:43 +0100, Christophe Beyer > wrote: > > > Hello, > > > How can I desactivate the Twig auto escaping ? > > > Thanks ! > > Just xonfigure it this way in the config file: > > twig.config: > autoescape: false > > 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 + Doctrine MongoDB : can't createQuery()
Using createBuilder() gave me a missing Hydrator class exception. I had to add this into my config.yml : doctrine_odm.mongodb: auto_generate_hydrator_classes: true On 1 fév, 21:47, Adrien Mogenet wrote: > Well, when I see "it works", I should say "it doesn't throw any > error", because this code does not retrieve any row. > > On 1 fév, 21:37, Adrien Mogenet wrote: > > > > > > > > > G'd evening, > > Still learning Symfony2... with MongoDB ORM. I can store new records, > > but when I try to retrieve my rows : > > > $dm = $this->get('doctrine.odm.mongodb.document_manager'); > > $dm->createQuery(...); > > > I got a "Class has no method" error. However : > > > $query = $dm->createQueryBuilder('EbBundle:Snippet'); > > $snippets = $query->find(); > > > does work. Is it normal ? In DocumentManager class, I can see that > > there is effectively no createQuery() method... -- 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 + Doctrine MongoDB : can't createQuery()
Well, when I see "it works", I should say "it doesn't throw any error", because this code does not retrieve any row. On 1 fév, 21:37, Adrien Mogenet wrote: > G'd evening, > Still learning Symfony2... with MongoDB ORM. I can store new records, > but when I try to retrieve my rows : > > $dm = $this->get('doctrine.odm.mongodb.document_manager'); > $dm->createQuery(...); > > I got a "Class has no method" error. However : > > $query = $dm->createQueryBuilder('EbBundle:Snippet'); > $snippets = $query->find(); > > does work. Is it normal ? In DocumentManager class, I can see that > there is effectively no createQuery() method... -- 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 + Doctrine MongoDB : can't createQuery()
G'd evening, Still learning Symfony2... with MongoDB ORM. I can store new records, but when I try to retrieve my rows : $dm = $this->get('doctrine.odm.mongodb.document_manager'); $dm->createQuery(...); I got a "Class has no method" error. However : $query = $dm->createQueryBuilder('EbBundle:Snippet'); $snippets = $query->find(); does work. Is it normal ? In DocumentManager class, I can see that there is effectively no createQuery() method... -- 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 : 3rd-party libraries
Well ; shame on me. It makes sense, yeah. Thanks for your answers. Reading PHP 5.3 specs again are helpful :) (more than reading it in early days of 5.3 alpa...) On 1 fév, 09:55, stof wrote: > On Mon, 31 Jan 2011 22:59:07 -0800 (PST), Adrien Mogenet > > wrote: > > Yes, this is the whole class name SF2 is attempting to load... Despite > > I declared this class using "prefixes" in autoloader. > > > I agree this is not very logical, (at least, not so transparent) but I > > don't think this could be a bug in autoloader. > > It is logical. When you use GeSHI_Displayer, PHP will search it in the > current namespace. The \ is there to say that your class is in the global > namespace. This is the way namespaces work (and so it is PHP stuff, not > Symfony one). the autoloader tries to load > Application\MyBundle\Controller\GeSHI_Displayer because PHP tries to access > this class. > > -- > 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 : 3rd-party libraries
Yes, this is the whole class name SF2 is attempting to load... Despite I declared this class using "prefixes" in autoloader. I agree this is not very logical, (at least, not so transparent) but I don't think this could be a bug in autoloader. On 31 jan, 22:40, Christophe COEVOET wrote: > Le 31/01/2011 22:30, Adrien Mogenet a crit :> I don't understand, GeSHI is > not using namespaces ! > > > But if I use new GeSHI_Displayer, is does not work ; > > \GeSHI_Displayer does ! > > If there is no namespace it is logical. But in your previous message you > talked about 'Application\EbBundle\Controller\GeSHi_Displayer' (which is > effectively the class which is used when using GeSHI_Displayer without > the \ in your controller) > > > On 31 jan, 21:48, Christophe COEVOET wrote: > >> Le 31/01/2011 21:43, Adrien Mogenet a crit :> I moved the class within > >> src/vendor/geshi/GeSHI/Displayer.php ... but > >>> nothing happened :-x > >>> Class 'Application\EbBundle\Controller\GeSHi_Displayer' > >> If you are using this namespace, you have to autoload it according to > >> the namespace and it has to be in > >> Application/EbBundle/Controller/GeSHI_Displayer.php > >> The PEAR convention is used for classes not using namespaces. > > >> -- > >> Christophe | Stof > > -- > 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 : 3rd-party libraries
I don't understand, GeSHI is not using namespaces ! But if I use new GeSHI_Displayer, is does not work ; \GeSHI_Displayer does ! On 31 jan, 21:48, Christophe COEVOET wrote: > Le 31/01/2011 21:43, Adrien Mogenet a crit :> I moved the class within > src/vendor/geshi/GeSHI/Displayer.php ... but > > nothing happened :-x > > > Class 'Application\EbBundle\Controller\GeSHi_Displayer' > > If you are using this namespace, you have to autoload it according to > the namespace and it has to be in > Application/EbBundle/Controller/GeSHI_Displayer.php > The PEAR convention is used for classes not using namespaces. > > -- > 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 : 3rd-party libraries
My mistake... it works, using \GeSHi_Displayer() :-) On 31 jan, 21:43, Adrien Mogenet wrote: > I moved the class within src/vendor/geshi/GeSHI/Displayer.php ... but > nothing happened :-x > > Class 'Application\EbBundle\Controller\GeSHi_Displayer' > > On 31 jan, 21:33, Christophe COEVOET wrote: > > > > > > > > > Le 31/01/2011 21:02, Adrien Mogenet a crit : > > > > Hi everyone, > > > > I'm still learning Symfony2... > > > I added "GeSHI" as a library in src/vendor/geshi. > > > I renamed the GeSHI class to "GeSHI_Displayer", as described in > > > documentation PEAR naming usage (http://docs.symfony-reloaded.org/ > > > guides/tools/autoloader.html#usage) > > > I declared this library into the autoload.php (registerPrefixes : > > > GeSHI_ => $vendor/geshi) > > > > But, when I try to instantiate a new object from a controller... > > > >> $geshi = new GeSHI_Displayer($code, $language); > > > I got the Class Not Found exception. Did I miss something with the > > > autoloader ? > > > The GeSHI_Displayer class has to be defined in GeSHI/Displayer.php to > > follow the PEAR naming convention. This is the way the autoloader finds > > the good file. > > > -- > > 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 : 3rd-party libraries
I moved the class within src/vendor/geshi/GeSHI/Displayer.php ... but nothing happened :-x Class 'Application\EbBundle\Controller\GeSHi_Displayer' On 31 jan, 21:33, Christophe COEVOET wrote: > Le 31/01/2011 21:02, Adrien Mogenet a crit : > > > > > > > > > Hi everyone, > > > I'm still learning Symfony2... > > I added "GeSHI" as a library in src/vendor/geshi. > > I renamed the GeSHI class to "GeSHI_Displayer", as described in > > documentation PEAR naming usage (http://docs.symfony-reloaded.org/ > > guides/tools/autoloader.html#usage) > > I declared this library into the autoload.php (registerPrefixes : > > GeSHI_ => $vendor/geshi) > > > But, when I try to instantiate a new object from a controller... > > >> $geshi = new GeSHI_Displayer($code, $language); > > I got the Class Not Found exception. Did I miss something with the > > autoloader ? > > The GeSHI_Displayer class has to be defined in GeSHI/Displayer.php to > follow the PEAR naming convention. This is the way the autoloader finds > the good file. > > -- > 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] symfony2 : 3rd-party libraries
Hi everyone, I'm still learning Symfony2... I added "GeSHI" as a library in src/vendor/geshi. I renamed the GeSHI class to "GeSHI_Displayer", as described in documentation PEAR naming usage (http://docs.symfony-reloaded.org/ guides/tools/autoloader.html#usage) I declared this library into the autoload.php (registerPrefixes : GeSHI_ => $vendor/geshi) But, when I try to instantiate a new object from a controller... > $geshi = new GeSHI_Displayer($code, $language); I got the Class Not Found exception. Did I miss something with the autoloader ? -- 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 : where should images stand ?
Hi everyone, I was a "heavy" sf1.x developer, and I'm learning sf2 :) I am wondering something about paths for images. I read that web resources should stand in /src/Application/MyBundle/ Resources/public Is that right ? And thus, how do I insert my image using the {% asset( path ) %} function ? -- 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: What's the future of Lime2 ? (vs PHPUnit)
Thank you for that quick answer :-) Have a nice day ! -- Adrien Mogenet On 23 août, 10:37, Thomas Rabaix wrote: > On Mon, Aug 23, 2010 at 9:39 AM, Adrien Mogenet > wrote: > > > Hi all ! > > > I am designing a CI platform and I was wondering which choice should > > be the most efficient : PHPUnit or Lime2 > > > To make this choice, I would like to know what wil be the future of > > Lime 2 ? Any idea ? > > No future as Symfony 2 will use PHPUnit > > > > > Will SensioLabs continue to develop Lime2 ? Will it be maintained ? > > SensioLabs is not maintaining Lime2, Bernhard Schussek does. > > > > > > > > > Regards, > > > -- > > Adrien Mogenet > > > -- > > 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 > legroups.com> > > For more options, visit this group at > >http://groups.google.com/group/symfony-users?hl=en > > -- > Thomas Rabaixhttp://rabaix.net -- 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] What's the future of Lime2 ? (vs PHPUnit)
Hi all ! I am designing a CI platform and I was wondering which choice should be the most efficient : PHPUnit or Lime2 To make this choice, I would like to know what wil be the future of Lime 2 ? Any idea ? Will SensioLabs continue to develop Lime2 ? Will it be maintained ? Regards, -- Adrien Mogenet -- 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: Translate lime tests into PHPUni
I finally launched my tests with Lime2 :-) On 16 août, 12:14, Adrien Mogenet wrote: > Hi everyone, > > I'm working on a old project, written with symfony 1.1. > I would like to write only PHPUnit tests, but not losing existing (and > numerous)limetests. > > Do you know an efficient way totranslate/embedlimetests into > PHPUnit ? > I found sfPhpUnit2Plugin but it works only since sf 1.2. :-{ > > Regards, > Adrien -- 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] Translate lime tests into PHPUni
Hi everyone, I'm working on a old project, written with symfony 1.1. I would like to write only PHPUnit tests, but not losing existing (and numerous) lime tests. Do you know an efficient way to translate/embed lime tests into PHPUnit ? I found sfPhpUnit2Plugin but it works only since sf 1.2. :-{ Regards, Adrien -- 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: Fixtures with dynamic parameters ?
I agree, but in my specific case, I would like other users (and not developpers) to be able to add/edit this content easily. Yaml fixtures files would have be a nice choice ;-) But if it's not possible, I'm gonna look for another way ! -- Adrien On May 24, 4:45 pm, Pietrino Atzeni wrote: > Hi, > I don't think it's easy, but... why would you do that? I think it's best > to create a specific task to accomplish this, since data-load reloads > everything in the db and it's really slow when it comes to load a lot of > data. > > Hope this helps, > Pietro > > > > > > > Hi all, > > > I would like to store a set of items into a YML fixture file, a list > > of "Group" to apply for each new "User" that will be created. > > > And thus I would like to write something like this : > > > Group_1: > > label: My first group > > user: > > > Group2: > > label: My second group > > user: > > > And I would launch the insertion like this : > > > `php symfony doctrine:data-load groups.yml?user=XXX` > > > Do you know if it's possible ? > > > -- > > Adrien Mogenet > > -- > 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 > athttp://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] Fixtures with dynamic parameters ?
Hi all, I would like to store a set of items into a YML fixture file, a list of "Group" to apply for each new "User" that will be created. And thus I would like to write something like this : Group_1: label: My first group user: Group2: label: My second group user: And I would launch the insertion like this : `php symfony doctrine:data-load groups.yml?user=XXX` Do you know if it's possible ? -- Adrien Mogenet -- 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] Can't select/validate day #31 in sfWidgetFormJQueryDate
Hi all, I just noticed a strange bug using a sfWidgetFormJQueryDate, when I tried to select the 2010-12-31, it just doesn't pass... My code : $this->widgetSchema['birth'] = new sfWidgetFormJQueryDate(array( 'image' => image_path('/pwCorePlugin/images/calendar.gif'), 'config' => '{}', 'culture' => 'fr_FR', 'date_widget' => new sfWidgetFormDate(array( 'format' => '%day%.%month%.%year%', 'years' => range(1900, 2010) )), )); And my validator : $this->validatorSchema['birth'] = new sfValidatorDate(array('required' => false)); Then, I tried to select 2010-03-31, and other #31, but ... always failed. Did you notice the same thing ? My class version : revision 24548, 2009-11-30 -- 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] Error message "No description for object of class..."
Hi all, let's consider these simple lines : foreach ($extraRows as $rowId => $extraValue) { var_dump($extraValue); $extraValue = new MemberExtraValue(); $extraValue->setValue($extraValue); //... } Well, if I print $extraValue. no problem. But in ->setValue, it tries to set "No description for object of class MyClass". WTF ?? If I set directly a value, it works. I really don't understand this behaviour.. -- Adrien -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@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: sfTestFunctional api documentation
I definitely agree with, so many times I had to investigate in order to find list of possible parameters or things like tat :-) -- Adrien On 15 déc, 15:49, Tarjei Huse wrote: > Hi, > > On 12/15/2009 03:32 PM, Alexandru-Emil Lupu wrote:> You might wanna read: > >http://www.symfony-project.org/jobeet/1_4/Doctrine/en/09 > >http://www.symfony-project.org/jobeet/1_4/Doctrine/en/11 > > I know of (and have read) those chapters of the excellent Symfony > documentation, but sometimes it is easier to lookup the API docs rathern > than try to scan a whole chapter of the docs or the sourcecode. > > Regards, > Tarjei > > > > > The source code of the file: > > >http://trac.symfony-project.org/browser/branches/1.4/lib/test/sfTestF... > > > On Tue, Dec 15, 2009 at 11:46 AM, Tarjei Huse wrote: > > >> Hi, I tried finding the API documentation for sfTestFunctional but > >> didn't find anything using the api search. > > >> Is there a reason why it is missing, or should I file a bug? > > >> Regards, > >> Tarjei > > >> -- > > >> You received this message because you are subscribed to the Google Groups > >> "symfony users" group. > >> To post to this group, send email to symfony-us...@googlegroups.com. > >> To unsubscribe from this group, send email to > >> symfony-users+unsubscr...@googlegroups.com. > >> For more options, visit this group > >> athttp://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@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] Symfony color scheme for Netbeans
Good evening the group ! I just published the color scheme I made. Download it : http://piwam.googlecode.com/files/SymfonyColorScheme.zip Preview : http://www.ze-technology.com/ I set colors for PHP, JS, SQL, YAML, HTML and XML files. Hope you'll enjoy, this is a first release don't hesitate to comment ;-) -- Adrien Mogenet -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@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: Extend forms (Doctrine) with Plugins
My `main` application provides a "Expense" module, to manage "Expense" records { account_id, amount, label } So, expense/new action displays an ExpenseForm instance, with these fields. A developer may want to add a "company_id" field to link an expense to a company. So he will need to override existing ExpenseForm, to be able to use it in expense/new action. -- Adrien On 11 déc, 13:51, Daniel Lohse wrote: > What exactly is your use-case secenario? What are you trying to accomplish > (and, I don't mean extend a plugin, I mean the underlying motivation)? > > Daniel > > On 2009-12-11, at 11/December, 10:24 AM, Adrien Mogenet wrote: > > > Hi Daniel, > > > I thought about that, but second point make things impossible. If 2 > > developers want to develop 2 plugins to extend this UserForm, it won't > > work... :-( > > > On 11 déc, 02:32, Daniel Lohse wrote: > >> What you can do is this: > > >> - you have a BaseUserForm which extends BaseForm, don't you? (or > >> sfForm[Propel, Doctrine] when you're using symfony 1.2, doesn't matter) > >> - UserForm extends BaseUserForm > > >> - add another form called ExtendUserForm which extends BaseUserForm > >> - change UserForm to extend ExtendUserForm > > >> What your users can do now is replace ExtendUserForm with their own things > >> and you can use UserForm in you foobar module which does not have to > >> overridden at all (apart from templates or such, if need be). > > >> First remark: remember to correctly wire all configure() and setup() > >> methods to call parent::configure() and parent::setup() accordingly. > >> Second remark: if you yourself need to at least provide some changes to > >> your users (make email fields validate as email fields and not as string > >> fields etc.) you'll have to insert another hierarchy between > >> ExtendUserForm and BaseUserForm. > > >> Cheers, Daniel > > >> On 2009-12-11, at 11/December, 1:23 AM, Adrien Mogenet wrote: > > >>> Hi all, > > >>> In my `main` application, let say I have a UserForm.class.php to > >>> manage my Users. > >>> This `main` application has a `foobar` module which displays a > >>> UserForm instance. > > >>> Well, I want to offers to the developers a way to extend this UserForm > >>> class by developing some plugins. Is there a clever way to extend > >>> UserForm, without overriding the whole `foobar` module ? > > >>> -- > >>> Adrien > > >>> -- > > >>> You received this message because you are subscribed to the Google Groups > >>> "symfony users" group. > >>> To post to this group, send email to symfony-us...@googlegroups.com. > >>> To unsubscribe from this group, send email to > >>> symfony-users+unsubscr...@googlegroups.com. > >>> For more options, visit this group > >>> athttp://groups.google.com/group/symfony-users?hl=en. > > > -- > > > You received this message because you are subscribed to the Google Groups > > "symfony users" group. > > To post to this group, send email to symfony-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > symfony-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@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] Extending model within a plugin : execute SQL statements
Hi all, I'm writing a plugin, with a custom new schema.yml. Well, doctrine:build-model generates my model files. doctrine:build-sql build the SQL file in the main SQL file Is there a clever way to generate SQL statements and execute them within a plugin ? Because if I perform doctrine:insert-sql, doctrine will execute the whole SQL file... -- Adrien -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@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: Extend forms (Doctrine) with Plugins
Hi Daniel, I thought about that, but second point make things impossible. If 2 developers want to develop 2 plugins to extend this UserForm, it won't work... :-( On 11 déc, 02:32, Daniel Lohse wrote: > What you can do is this: > > - you have a BaseUserForm which extends BaseForm, don't you? (or > sfForm[Propel, Doctrine] when you're using symfony 1.2, doesn't matter) > - UserForm extends BaseUserForm > > - add another form called ExtendUserForm which extends BaseUserForm > - change UserForm to extend ExtendUserForm > > What your users can do now is replace ExtendUserForm with their own things > and you can use UserForm in you foobar module which does not have to > overridden at all (apart from templates or such, if need be). > > First remark: remember to correctly wire all configure() and setup() methods > to call parent::configure() and parent::setup() accordingly. > Second remark: if you yourself need to at least provide some changes to your > users (make email fields validate as email fields and not as string fields > etc.) you'll have to insert another hierarchy between ExtendUserForm and > BaseUserForm. > > Cheers, Daniel > > On 2009-12-11, at 11/December, 1:23 AM, Adrien Mogenet wrote: > > > Hi all, > > > In my `main` application, let say I have a UserForm.class.php to > > manage my Users. > > This `main` application has a `foobar` module which displays a > > UserForm instance. > > > Well, I want to offers to the developers a way to extend this UserForm > > class by developing some plugins. Is there a clever way to extend > > UserForm, without overriding the whole `foobar` module ? > > > -- > > Adrien > > > -- > > > You received this message because you are subscribed to the Google Groups > > "symfony users" group. > > To post to this group, send email to symfony-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > symfony-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@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] Extend forms (Doctrine) with Plugins
Hi all, In my `main` application, let say I have a UserForm.class.php to manage my Users. This `main` application has a `foobar` module which displays a UserForm instance. Well, I want to offers to the developers a way to extend this UserForm class by developing some plugins. Is there a clever way to extend UserForm, without overriding the whole `foobar` module ? -- Adrien -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@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] Issue with doctrine/forms... only in tests
Hi all, This is a part of my schema : --- association: id name : string created_by: integer relations: created_by: { class: Member, local: created_by, foreign: id } member: id username: string state: integer association_id: integer --- It works fine in my frontend, but in my functional test, when I'm updating an association, Doctrine tries to INSERT a new member, with just 3 fields : `state`, `created_at`, `updated_at` VALUES (1, date, date). And so I get an exception because constraint on `member.association_id` is not respected. The stack trace shows that issues comes from AssociationForm::doSave (), but I didn't do anything special (and it works perfectly in my frontend). I don't especially want you to find out why I get this issue (but if you know.. feel free) ; I mostly want to get some tips to find out how to debug it. Step by Step does not show anything... :-\ Thx for helping me -- Adrien -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@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] Using routes in forms
Basically generated forms look like : ? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@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: Doctrine: execute vs fetchArray
Thanks :-) I'll keep my lovely objects ! Adrien On 28 nov, 01:17, Alexandre SALOME wrote: > Yes, it's faster with a simple array hydrating... You don't instanciate your > objects, just map their configuration. > > Objects are useful for executing some business logic (sometimes, very > complex). Array can be useful for templates, for example. > > Depends of your case, but don't be afraid of objects ;) make some > time/memory measures in your use case, and select the best solution. > > Alexandre > > 2009/11/28 Adrien Mogenet > > > > > Yes I knew that, but HYDRATE_ARRAY parameters is faster and acts > > differently than when we HYDRATE_OBJECT ! > > > That was my real question... ;-) > > > On 27 nov, 23:40, Michael Boyd wrote: > > > The source of fetchArray() is: > > > > public function fetchArray($params = array()) > > > { > > > return $this->execute($params, Doctrine_Core::HYDRATE_ARRAY); > > > } > > > > So they are exactly the same :) > > > > On Nov 27, 8:34 pm, Adrien Mogenet wrote: > > > > > Hi all, > > > > > I'm a Propel user, but I'm switching to Doctrine... > > > > > I don't know if I should use execute() or fetchArray() to retrieve my > > > > data. > > > > > execute() : I get an array of Object, and I like dealing with > > > > Objects ! > > > > > fetchArray() : I read that it's better (less memory consuming ?) but I > > > > don't really enjoy managing arrays (and arrays of arrays when I get > > > > relationship). Moreover, when they're given to my view, it's > > > > considered as sfOutputEscaperArrayDecorator so I have to perform - > > > > > >getRawValue(). > > > > > Is it really awful to call "execute()" method in Doctrine ? > > > > > -- > > > > Adrien > > > -- > > > You received this message because you are subscribed to the Google Groups > > "symfony users" group. > > To post to this group, send email to symfony-us...@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. > > -- > Alexandre Salomé -- alexandre.sal...@gmail.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-us...@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: Doctrine: execute vs fetchArray
Yes I knew that, but HYDRATE_ARRAY parameters is faster and acts differently than when we HYDRATE_OBJECT ! That was my real question... ;-) On 27 nov, 23:40, Michael Boyd wrote: > The source of fetchArray() is: > > public function fetchArray($params = array()) > { > return $this->execute($params, Doctrine_Core::HYDRATE_ARRAY); > } > > So they are exactly the same :) > > On Nov 27, 8:34 pm, Adrien Mogenet wrote: > > > Hi all, > > > I'm a Propel user, but I'm switching to Doctrine... > > > I don't know if I should use execute() or fetchArray() to retrieve my > > data. > > > execute() : I get an array of Object, and I like dealing with > > Objects ! > > > fetchArray() : I read that it's better (less memory consuming ?) but I > > don't really enjoy managing arrays (and arrays of arrays when I get > > relationship). Moreover, when they're given to my view, it's > > considered as sfOutputEscaperArrayDecorator so I have to perform - > > > >getRawValue(). > > > Is it really awful to call "execute()" method in Doctrine ? > > > -- > > Adrien -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@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] Doctrine: execute vs fetchArray
Hi all, I'm a Propel user, but I'm switching to Doctrine... I don't know if I should use execute() or fetchArray() to retrieve my data. execute() : I get an array of Object, and I like dealing with Objects ! fetchArray() : I read that it's better (less memory consuming ?) but I don't really enjoy managing arrays (and arrays of arrays when I get relationship). Moreover, when they're given to my view, it's considered as sfOutputEscaperArrayDecorator so I have to perform - >getRawValue(). Is it really awful to call "execute()" method in Doctrine ? -- Adrien -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@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: what is the easiest way to test whether the user just logged in?
What's your exact question ? Determining if this is the *first* time an user logged in ? -- Adrien On 14 nov, 00:37, larry wrote: > Symfony 1.2.5 > > i want my users to see a message when they first login (and each time > they login). I'm thinking I will override the signin method in sfGuard > to set a variable on the user object. I'm curious if there is an > easier or more obvious way? --~--~-~--~~~---~--~~ 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: Functional tests and cookies
I tried to get Cookie which has a explicit name, and then I tried to test in sfBrowser that it has been correctly set, but it does not work... with('request')->hasCookie('MyCookie') fails :-/ -- Adrien On 11 nov, 16:40, Adrien Mogenet wrote: > Hi everyone, > > In my action class, I'm checking thatcookiewas correctly created : > > > $request->getCookie(session_name()) > > But in my functionaltest,cookieseems to be created. > Documentation says : > > > Thetestbrowser has its own mechanisms to manage sessions (sfTestStorage) > > and cookies. > > Am I wrong ? Is there a better (symfony) way to check that mycookie > has been created ? > > -- > Adrien --~--~-~--~~~---~--~~ 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: validateMyAction is not executed
Obviously yes I could, but the documentation tell us : "symfony always looks for a method called validateMyAction() first. If it is found, then symfony executes it. " I guess I wouldn't have to call it explicitely ;-) thx anyway -- Adrien On 13 nov, 21:59, Alexandru-Emil Lupu wrote: > i guess the system allows you to fo something like: > > private function validateShow(sfWebRequest $request) > { > // some bunch of validation code > > } > > public function executeShow(sfWebRequest $request) > { > $this->validateShow($request); > > // your other code > > > > } > On Fri, Nov 13, 2009 at 6:42 AM, Dennis wrote: > > > Validation is between the user and the system. That's why it's now in > > the form. That's why Symfony automagically makes the validators and > > widgets part of the form for you. > > > That's the model now. Trying to do something different that the > > overall design of the framework would be quite a headache. > > > On Nov 12, 3:30 am, Adrien Mogenet wrote: > > > But that's not a form that I want to validate, but really the > > > parameters given to my actions ;-) > > > > I found validateMyAction was a cool way to divide my code in 2 > > > different methods :'( > > > > Thx for your answer, > > > > -- > > > Adrien > > > > On 12 nov, 12:00, Davide Borsatto wrote: > > > > > I don't know the solution of your problem, but my advice is this: > > > > That's a deprecated feature from symfony 1.0. Now the whole validation > > > > system is included within the form framework. Use that instead of > > > > relying on deprecated stuff, especially if you're using sf 1.2. > > > > > On Nov 11, 3:12 pm, Adrien Mogenet wrote: > > > > > > Does anyone use this feature ? > > > > > > -- > > > > > Adrien > > > > > > On 10 nov, 12:15, Adrien Mogenet wrote: > > > > > > > Hi all, > > > > > > > As described here : > >http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Laye..., > > > > > > I want to validate an action. > > > > > > > but my public function validateShow() is not executed before my > > > > > > executeShow() action. > > > > > > > Any idea ? Is this feature still up to date ? > > > > > > > -- > > > > > > Adrien > > -- > Have a nice day! > Alecs > > As programmers create bigger & better idiot proof programs, so the universe > creates bigger & better idiots! > I am on web: http://www.alecslupu.ro/ > I am on twitter:http://twitter.com/alecslupu > I am on linkedIn:http://www.linkedin.com/in/alecslupu > Tel: (+4)0748.543.798 --~--~-~--~~~---~--~~ 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: validateMyAction is not executed
But that's not a form that I want to validate, but really the parameters given to my actions ;-) I found validateMyAction was a cool way to divide my code in 2 different methods :'( Thx for your answer, -- Adrien On 12 nov, 12:00, Davide Borsatto wrote: > I don't know the solution of your problem, but my advice is this: > That's a deprecated feature from symfony 1.0. Now the whole validation > system is included within the form framework. Use that instead of > relying on deprecated stuff, especially if you're using sf 1.2. > > On Nov 11, 3:12 pm, Adrien Mogenet wrote: > > > Does anyone use this feature ? > > > -- > > Adrien > > > On 10 nov, 12:15, Adrien Mogenet wrote: > > > > Hi all, > > > > As described here > > > :http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Laye..., > > > I want to validate an action. > > > > but my public function validateShow() is not executed before my > > > executeShow() action. > > > > Any idea ? Is this feature still up to date ? > > > > -- > > > Adrien --~--~-~--~~~---~--~~ 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: Overwrite Security Actions Settings
Maybe security.yml ? Otherwise you could custom your login action to redirect to another one or set custom template :-) Keep us posted, Adrien On 11 nov, 19:30, jp wrote: > Hi, > > security actions are defined in apps/myapp/settings.yml > Is it possible to overwrite those settings for a module > so I can have different login modules etc. ? > I tried settings.yml and app.yml in mymodule/config > containing > > all: > .actions: > login_module: xyz > login_action: xyz > secure_module: xyz > secure_action: xyz > > With no success. Do you have any ideas? > > Thank you! > Jan --~--~-~--~~~---~--~~ 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] Functional tests and cookies
Hi everyone, In my action class, I'm checking that cookie was correctly created : > $request->getCookie(session_name()) But in my functional test, cookie seems to be created. Documentation says : > The test browser has its own mechanisms to manage sessions (sfTestStorage) > and cookies. Am I wrong ? Is there a better (symfony) way to check that my cookie has been created ? -- Adrien --~--~-~--~~~---~--~~ 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: validateMyAction is not executed
Does anyone use this feature ? -- Adrien On 10 nov, 12:15, Adrien Mogenet wrote: > Hi all, > > As described here > :http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Laye..., > I want to validate an action. > > but my public function validateShow() is not executed before my > executeShow() action. > > Any idea ? Is this feature still up to date ? > > -- > Adrien --~--~-~--~~~---~--~~ 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] validateMyAction is not executed
Hi all, As described here : http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Layer#Validation%20and%20Error-Handling%20Methods, I want to validate an action. but my public function validateShow() is not executed before my executeShow() action. Any idea ? Is this feature still up to date ? -- Adrien --~--~-~--~~~---~--~~ 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: functional tests : issue with auto-increment and userID
I run tests under 'test' env which works perfectly, using a app-test database :-) The point I would like to figure out is really the issue with the ID that my sfBrowser is returning after signing in, which is different from the ID in Database, but not the first time, just after reloading fixtures automatically at least once time ! Thanks for helping me, Adrien On 29 oct, 11:28, Gareth McCumskey wrote: > This is the expected behaviour because symfony's load fixture methods dont > drop the tables and recreate them. If you drop the database yourself and > regenerate it before you run tests, or truncate each table, then you should > have things working as you want. > > On Tue, Oct 27, 2009 at 6:09 PM, Adrien Mogenet > wrote: > > > > > > > Hi everyone, > > > I'm using fixture to fill my database with 3 fake user accounts, the > > first one is my "demo" account. > > I'm writing my tests using a $browser as sfGuardTestFunctional, which > > signs me in automatically. > > > The first time I launch my test, my $browser works perferctly and > > shows that my User ID is #1 [OK] > > > But, second time, fixtures are put within my DB, so my "demo" account > > get the ID #4, but my $browser, which signs in again perfectly, says > > that I have the user ID #3 !!! > > > This behaviour avoid any other INSERT operation, resulting in > > constraint issues. > > > Thanks for helping me :-) > > > -- > > Adrien > > -- > Gareth McCumskeyhttp://garethmccumskey.blogspot.com > twitter: @garethmcc --~--~-~--~~~---~--~~ 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: change the value on the form with ajax
Humm I'm not using link_to_remote, but you can find an example of what I did here : http://code.google.com/p/piwam/source/browse/trunk/apps/front/modules/cotisation/templates/_form.php At the end of this source file, you can find JS function using ajaxupdater to update the "amount" text field. Good luck, Adrien On 28 oct, 02:26, Martin Ibarra Cervantes wrote: > i have a gallery with gallerific but when change the picture i need > change the ID on my form its possible change the value with the ajax. > > > > onClick=" > 'update' => 'description', > 'url' => 'retratos/show?id='.$imagen->getId(), > )) ?> > " > > retratos the model > show is the action and in the action i have this. > > public function executeShow(sfWebRequest $request) > { > $this->form = new MrImagenComentarioForm(); > $this->form->setDefault('id_imagen', $this->getParam( 'id')); > $this->setTemplate('show'); > } > > id_imagen is i hidden in my form. --~--~-~--~~~---~--~~ 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] functional tests : issue with auto-increment and userID
Hi everyone, I'm using fixture to fill my database with 3 fake user accounts, the first one is my "demo" account. I'm writing my tests using a $browser as sfGuardTestFunctional, which signs me in automatically. The first time I launch my test, my $browser works perferctly and shows that my User ID is #1 [OK] But, second time, fixtures are put within my DB, so my "demo" account get the ID #4, but my $browser, which signs in again perfectly, says that I have the user ID #3 !!! This behaviour avoid any other INSERT operation, resulting in constraint issues. Thanks for helping me :-) -- Adrien --~--~-~--~~~---~--~~ 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: Custom Propel Unique error message
Actually, I'm not using sfValidatorPropelUnique. My "login" field is checked by a sfStringValidator, but the "unique" constraint is checked by Propel anyway, and the "unique" error message is displayed. (unique constraint has been set in schema.yml). I would like to be able to write sthg like : $this->validatorSchema['login'] = new sfValidatorString(array ('required' => false), array('invalid' => 'Login already exists')); -- Adrien On 18 oct, 23:34, Gábor Fási wrote: > http://trac.symfony-project.org/browser/branches/1.2/lib/plugins/sfPr... > > sfValidatorPropelUnique throws an "invalid" error, customize that in > your form, in the second parameter of the constructor. > > On Sun, Oct 18, 2009 at 23:26, Adrien Mogenet > wrote: > > > Hi, > > > My field "login" has been set as unique. > > > So when I try to register as an existing user, Propel is warning me > > correctly with an error message (an object with the same _ _ _ _ > > already exists), but I would like to use a custom message. > > > How can I do that ? > > > Btw, I created a custom UniqueValidator, with a custom error message, > > but when I use this custom UniqueValidator, my forms displays both > > errors : my custom message AND the propel error message. > > > Ho can I avoid this behaviour ? > > > Regards, > > > -- > > Adrien --~--~-~--~~~---~--~~ 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] Custom Propel Unique error message
Hi, My field "login" has been set as unique. So when I try to register as an existing user, Propel is warning me correctly with an error message (an object with the same _ _ _ _ already exists), but I would like to use a custom message. How can I do that ? Btw, I created a custom UniqueValidator, with a custom error message, but when I use this custom UniqueValidator, my forms displays both errors : my custom message AND the propel error message. Ho can I avoid this behaviour ? Regards, -- Adrien --~--~-~--~~~---~--~~ 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: Strange behaviour when freezing project
Ok, I'll follow that ticket ! It's the same issue I met :-) -- Adrien Mogenet http://www.ze-technology.com On 7 oct, 15:56, "Henning Glatter-Gotz" wrote: > Adrien, > > I started using the freeze task a few weeks ago and noticed that it would > link the two plugins you mentioned. However, instead of linking them to the > "frozen" local copy of the framework, it linked them to the original > installation of sf outside of the project, which kind of defeats the purpose > of freezing. It looks to me like this is the same thing that is happening to > you. > I tested this on sf 1.2.5 through 1.2.8 - all exhibit the same behavior. > > Is ../../../Symfony/1.2 your sf library location outside of your sf project? > > I opened a ticket against sf1.2 > (http://trac.symfony-project.org/ticket/7204#preview) but it has not even > been reviewed yet. I also posted a question in the forum and no answer > (http://forum.symfony-project.org/index.php/t/23021/). > > On windows it works because it simply copies the files into the web folder > (there is no symlink concept on that OS), but on Linux the links are > definitely wrong (links are fine, but they point to the wrong target). > > I wrote a task to fix them (freezefix). > > Henning > > -Original Message- > From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] > > On Behalf Of Adrien Mogenet > Sent: Wednesday, October 07, 2009 3:10 AM > To: symfony users > Subject: [symfony-users] Strange behaviour when freezing project > > Hi everyone, > > I'm using sf1.2 (trunk), and 2 plugins : sfPropelPlugin and > sfProtocolousPlugin. > > Once I `symfony project:freeze /path/to/sf/`, I noticed that both > plugins folders in /web are... linked ! > > cd web && ls -l : > sfPropelPlugin -> ../../../Symfony/1.2/lib/plugins/sfPropelPlugin/web > sfProtoculousPlugin -> ../../../Symfony/1.2/lib/plugins/ > sfProtoculousPlugin/web > > Well, did I forget something ? > > -- > Adrien Mogenethttp://adrien.frenchcomp.nethttp://www.ze-technology.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: Strange behaviour when freezing project
Thank you both of you !! -- Adrien Mogenet http://www.ze-technology.com http://adrien.frenchcomp.net On 7 oct, 13:31, Eno wrote: > On Wed, 7 Oct 2009, Adrien Mogenet wrote: > > Once I `symfony project:freeze /path/to/sf/`, I noticed that both > > plugins folders in /web are... linked ! > > > cd web && ls -l : > > sfPropelPlugin -> ../../../Symfony/1.2/lib/plugins/sfPropelPlugin/web > > sfProtoculousPlugin -> ../../../Symfony/1.2/lib/plugins/ > > sfProtoculousPlugin/web > > "Archive Plug-Ins > > Some plug-ins come as a simple archive of files. To install those, just > unpack the archive into your project's plugins/ directory. If the plug-in > contains a web/ subdirectory, don't forget to run the > plugin:publish-assets command to create the corresponding symlink under > the main web/ folder as shown in listing 17-14. Finally, don't forget to > clear the cache." > > Excerpt from docs: > > http://www.symfony-project.org/book/1_2/17-Extending-Symfony#chapter_... > > -- --~--~-~--~~~---~--~~ 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] Strange behaviour when freezing project
Hi everyone, I'm using sf1.2 (trunk), and 2 plugins : sfPropelPlugin and sfProtocolousPlugin. Once I `symfony project:freeze /path/to/sf/`, I noticed that both plugins folders in /web are... linked ! cd web && ls -l : sfPropelPlugin -> ../../../Symfony/1.2/lib/plugins/sfPropelPlugin/web sfProtoculousPlugin -> ../../../Symfony/1.2/lib/plugins/ sfProtoculousPlugin/web Well, did I forget something ? -- Adrien Mogenet http://adrien.frenchcomp.net http://www.ze-technology.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: From Propel to Doctrine... for every projects ?
Thanks for the answers :-) I think I will try to perform a change for one module, in order to estimate the complexity of this process. If it's really easy and fast to change, I will update the whole project, otherwise, I will use Doctrine only for future projects ! -- Adrien Mogenet Looking for 6 month internship, innovative projects http://adrien.frenchcomp.net On 3 oct, 20:40, E_lexy wrote: > Hi Adrien, > > We are in the process of changing a large project to Doctrine, because > we found the DQL language better suited for our complex queries. > Having done Propel for 1,5 year, Doctrine is easy to learn and much > closer to (old skool) SQL. > > Also Doctrine is a bit more flexibel. There is usually more than one > way to get/do something. > > I am wrintin a howto on changing from Propel to > Doctrine:http://trac.symfony-project.org/wiki/ConvertingPropelProjectToDoctrine > > Like Gabor said, Propel has a new Lead (former core Symfony-er > Francois Zaninotto) > See > here:http://groups.google.com/group/symfony-devs/browse_thread/thread/8366... > So it will surely stay alive. > > The choice is yours! > > On Oct 2, 9:15 am, Adrien Mogenet wrote: > > > Hi everyone, > > > I developping a "simple" association manager, which can manage > > members, fees, expenses, activities, accounts... > > I'm using symfony 1.2 (trunk) and Propel 1.3 (trunk also). > > > I know that symfony will evolve with Doctrine and not with Propel > > anymore. > > > So I'm wondering if it would be interesting to change my current ORM, > > even if it's a small project. > > Will it take a long time to perform this change ? > > > Will it be interesting in the near future to change from Propel to > > Doctrine ? > > > If you have any experience to share, feel free :-) > > > -- > > Adrien Mogenet > > Looking for a 6 month internship, opensource/innovative > > projectshttp://adrien.frenchcomp.net --~--~-~--~~~---~--~~ 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] From Propel to Doctrine... for every projects ?
Hi everyone, I developping a "simple" association manager, which can manage members, fees, expenses, activities, accounts... I'm using symfony 1.2 (trunk) and Propel 1.3 (trunk also). I know that symfony will evolve with Doctrine and not with Propel anymore. So I'm wondering if it would be interesting to change my current ORM, even if it's a small project. Will it take a long time to perform this change ? Will it be interesting in the near future to change from Propel to Doctrine ? If you have any experience to share, feel free :-) -- Adrien Mogenet Looking for a 6 month internship, opensource/innovative projects http://adrien.frenchcomp.net --~--~-~--~~~---~--~~ 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] Disable cache checking for a module
Hi all, I develop an installation module which checks if /cache folder exists and is writable. The problem is that if I just extract my project and try to go to http://myapp.com/install, I get the the following exception : 'sfCacheException' with message 'Failed to make cache directory Obviously it's normal. But I would like to disable the cache checking. In my install module, I wrote a config/cache.yml file : index: enabled: off But I still get the message. How to disable the checking and display my own error page if cache is now writable ? -- Adrien Mogenet [fr] http://adrien.frenchcomp.net --~--~-~--~~~---~--~~ 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: Unable to load fixtures twice
I wrote another test case... and I was able to launch this test twice, even if I load fixtures. So I think it was due to my test, but now I have to investigate to find the reason :-) On 4 août, 13:55, Adrien Mogenet wrote: > Propel 1.3 > > On 4 août, 13:50, Szabolcs Heilig wrote: > > > > > Hello, > > > What ORM are you using? Doctrine or Propel? > > > I'm writing functional tests, and in bootstrap/functional.php I'm > > > > loading my own fixtures files. > > > It works fine the first time I launch my test (DB is empty at the > > > beginning). > > > Szabolcs HEILIG --~--~-~--~~~---~--~~ 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: Unable to load fixtures twice
Propel 1.3 On 4 août, 13:50, Szabolcs Heilig wrote: > Hello, > > What ORM are you using? Doctrine or Propel? > > I'm writing functional tests, and in bootstrap/functional.php I'm > > > loading my own fixtures files. > > It works fine the first time I launch my test (DB is empty at the > > beginning). > > Szabolcs HEILIG --~--~-~--~~~---~--~~ 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] Unable to load fixtures twice
Hi folks, I'm writing functional tests, and in bootstrap/functional.php I'm loading my own fixtures files. It works fine the first time I launch my test (DB is empty at the beginning). But if I try to relaunch the test (with data in my DB), symfony can't clean my database ! I read the log file, and it sounds like if MySQL was trying to delete data again and again, without end. Help is welcome :) -- Adrien --~--~-~--~~~---~--~~ 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: sfValidatorPropelChoice Problem
Hi ! Which version of symfony do you use ? It also didn't work for me when I was using symfony 1.1. That's why I decided to not use varchar as PK since this moment. -- Adrien http://www.ze-technology.com On 20 juil, 09:27, javiermf wrote: > Why sfValidatorPropelChoice validator doesn't work for primary keys > that ar > varchar or autoincrement:false? --~--~-~--~~~---~--~~ 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: set/getFlash() issue : active during 2 requests
Hi, Thanks for this piece of information... but, I don't use forward() method :-( You can see my whole mailing action here : http://code.google.com/p/piwam/source/browse/trunk/apps/front/modules/association/actions/actions.class.php#116 -- Adrien http://www.ze-technology.com On 20 juil, 15:09, Richtermeister wrote: > Hey Adrien, > > you're using a forward() command after the mailing form, so the flash > gets picked up in the current request and not unset until the next. > If you use a redirect(), the flash will truly only be shown once. This > is also best practice, since it avoids re-triggering the form by > hitting refresh.. > > Daniel > > On Jul 19, 8:49 am, Adrien Mogenet wrote: > > > Hi folks, > > > I've noticed something strange in my symfony app. > > I have 2 forms : a mailing form and a configuration form. They both > > set a flash message once form has been submit in order to display a > > success/failure message. > > > It works well, BUT, for example, if I submit my mailing form, I reach > > the 'mailing form' page again which displays my flash message, and > > then if I go to the configuration form, I still can see the flash > > message from my mailing form ! > > > According to the symfony configuration : > > Flash attributes are a clean way of passing information to the *very > > next* request. > > > Well, I don;t understand what happened... > > > Adrien --~--~-~--~~~---~--~~ 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: sfConfigCache::clear() doesn't clear the cache ?
Well... that looks strange... or I forgot something :-) I am editing the 'prod' part of my YML file from my dev controller : it doesn't work I am editing the 'prod' part of the file from the 'prod' controller : it works. Don't know if it's the expeted behaviour... Adrien On 20 juil, 13:08, Adrien Mogenet wrote: > Hi, > > I'm developing a GUI for my application, and I would like to be able > to reload the config cache after editing a YAML file. > > Within my actions.class.php, I wrote : > > $this->getContext()->getConfigCache()->clear(); > > But it does nothing... (ie: /cache/front/prod/config/ > config_myfile.yml.php still get the old values) > What the exact aim of this method ? Should it clear my config cache as > I expected ? > > Thanks, > > Adrien --~--~-~--~~~---~--~~ 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] sfConfigCache::clear() doesn't clear the cache ?
Hi, I'm developing a GUI for my application, and I would like to be able to reload the config cache after editing a YAML file. Within my actions.class.php, I wrote : $this->getContext()->getConfigCache()->clear(); But it does nothing... (ie: /cache/front/prod/config/ config_myfile.yml.php still get the old values) What the exact aim of this method ? Should it clear my config cache as I expected ? Thanks, Adrien --~--~-~--~~~---~--~~ 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] set/getFlash() issue : active during 2 requests
Hi folks, I've noticed something strange in my symfony app. I have 2 forms : a mailing form and a configuration form. They both set a flash message once form has been submit in order to display a success/failure message. It works well, BUT, for example, if I submit my mailing form, I reach the 'mailing form' page again which displays my flash message, and then if I go to the configuration form, I still can see the flash message from my mailing form ! According to the symfony configuration : Flash attributes are a clean way of passing information to the *very next* request. Well, I don;t understand what happened... Adrien --~--~-~--~~~---~--~~ 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: Easiest way to filter HTML inputs
Finally I customized my settings.yml : escaping_strategy: on escaping_method:ESC_ENTITIES Works well ! -- Adrien On 14 mai, 00:22, "David Ashwood" wrote: > If you're looking to ensure that the submitted HTML is conformant (ie > matching start/end tags, etc) then I usually just run it through tidy and > then show it back to them on submit - so they can visually check it > themselves to see if it's what they wanted. > > -Original Message- > From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] > > On Behalf Of Adrien Mogenet > Sent: 13 May 2009 23:51 > To: symfony users > Subject: [symfony-users] Easiest way to filter HTML inputs > > Hi everyone, > > I was wondering what's the better way (or the easier) to filter HTML > inputs ? > I mean, users can in a form submit inputs like this : > "foobar" > > Comments are welcome ! > > -- > Adrien --~--~-~--~~~---~--~~ 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] Easiest way to filter HTML inputs
Hi everyone, I was wondering what's the better way (or the easier) to filter HTML inputs ? I mean, users can in a form submit inputs like this : "foobar" Comments are welcome ! -- Adrien --~--~-~--~~~---~--~~ 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: Storing "NULL" instead of empty string
Yes I do :-) I'm going to check this now. I temporary overrode the setLogin() method which sets NULL if empty string. Thanks, Adrien On 7 mai, 10:40, cokker wrote: > Do you use Sf1.2 with sfForm? > > If so have a look at the stringValidator if uses as empty value a string > ('') not null > > greets > Sven > > Adrien Mogenet schrieb: > > > Hi all, > > > I get a very stupid question... and I'm really surprized to see that I > > can't find any solution thanks to Google ! > > > Simple Model : > > -- > > user: > > id: ~ > > login: {varchar, required: false} > > foobar: {varchar, required: true} > > > And then, when I'm filling my form, if I fill only `foobar` and not > > `login`, an empty string is stored and not the NULL value. > > > BUT, I want to store a NULL value... how can I do that ? > > > PS: Don't think too much about my model it's just a simple example ;) > > > -- > > Adrien > >http://ze-technology.blogspot.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] Storing "NULL" instead of empty string
Hi all, I get a very stupid question... and I'm really surprized to see that I can't find any solution thanks to Google ! Simple Model : -- user: id: ~ login: {varchar, required: false} foobar: {varchar, required: true} And then, when I'm filling my form, if I fill only `foobar` and not `login`, an empty string is stored and not the NULL value. BUT, I want to store a NULL value... how can I do that ? PS: Don't think too much about my model it's just a simple example ;) -- Adrien http://ze-technology.blogspot.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: sfValidatorEmail fails
That's good to know !! (even if I mostly work with Propel...) -- Adrien http://www.tekover.net On 23 avr, 00:02, Bernhard Schussek wrote: > Hi Eric, > > I know that problem too well. Unfortunately the Doctrine model and the > forms framework use two different validators. The forms validator > (symfony) only checks for validity of the email address format, while > the Doctrine model validator does also check whether the domain name > exists. > > You can disable checking of the MX record in your schema[1]: > > email: { type: string(255), email: { check_mx: false } } > > Bernhard > > [1]http://www.doctrine-project.org/documentation/manual/1_1/en/data-vali... --~--~-~--~~~---~--~~ 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: How do I set a field value on a form?
Good question, I was sure someone would ask me that :-] As I said in my example, I have a form that is instantiated in several pages. This forms has a field 'updated_by' that contains the ID of current user (according to session data) So, it's better - I think - to write only one time "setDefault ('updated_by', 'value');" within the form instead of writing it each time you instantiate a new form. (and the developper may forget to set the value...). I think this is a good reason, at least, there should be a way to do it... -- Adrien Mogenet http://adrien.frenchcomp.net/blog On 22 avr, 19:48, Lawrence Krubner wrote: > On Apr 22, 7:36 am, Adrien Mogenet wrote: > > > Be careful Mark, I think that by this way you'll get the same issue > > that I got... > > > =>http://groups.google.fr/group/symfony-users/browse_thread/thread/8473... > > > setDefault() didn't work for me within the form to "force" a value got > > from session ; but it worked when I call this method from the action > > class. > > > I'm still looking for a way to force this setting within the form.. > > I'm just asking out of pure curiosity, but what advantage do you get > from setting this value in the form, rather than the action? > > > On 22 avr, 12:34, Mark Smith wrote: > > > > I have a form with a list of services on it. When the user submits the > > > form, I want it to remember what item on the list was selected. Even > > > if it's several page requests later. > > > > I'm storing the index in session and trying to apply it to the form > > > field. Sending it in the constructor is probably tidier anyway, so I'm > > > changing it to do that. > > > > But for future reference, you are saying $form->setDefault('field', > > > 'value'); will work even after it's constructed and configure() has > > > been called? > > > > On Apr 22, 10:38 am, Bernhard Schussek wrote: > > > > > Hi Mark, > > > > > On Wed, Apr 22, 2009 at 10:23 AM, Mark Smith > > > > > wrote: > > > > > So you are saying the only way to change a form field once the object > > > > > exists, is to completely rebuild the form? > > > > > No. The question is _when_ you want to change the form. You can change > > > > the default values any time in the object lifecycle before you render > > > > the form. Note that the default values are not displayed anymore once > > > > you call ->bind(). > > > > > If you need more help, please provide a little more information on > > > > what you are trying to achieve. Otherwise it's hard to give you > > > > specific advice. > > > > > Bernhard --~--~-~--~~~---~--~~ 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: sfValidatorEmail fails
Are you really sure it's due to a wrong domain name ? I don't know why it would be Doctrine that will throw Exception... Which email address did you enter ? -- Adrien Mogenet http://www.tekover.net On 22 avr, 20:32, Eric wrote: > Hi, > > I just setup my table with > > --- schema.yml > email: { type: string(255), email: true } > --- > > I generated the module and the validator has been created > automatically > > --- Base...Form.php > $this->setValidators(array( > 'email' => new sfValidatorEmail(array('max_length' => 255, > 'required' => false)) > )); > --- > > Now when I submit a valid mail in my form, it works. Also submitting a > wrong-syntax-mail, the errormessage is printed correctly. > Now I enter an email which is syntactically correct but the domain > does not exist, e.g. no...@webbbqwe73.com > sfValidatorEmail only checks by RegEx, so the mail passes. But in this > case an exception is thrown: > > --- > Validation failed in class sfGuardUserProfile > 1 field had validation error: > * 1 validator failed on email (email) > > at () > in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/ > vendor/doctrine/Doctrine/Transaction.php line 265 ... > > 262. if ($this->_internalNestingLevel == 1) > { > 263. $tmp = $this->invalid; > 264. $this->invalid = array(); > 265. throw new > Doctrine_Validator_Exception($tmp); > 266. } > 267. } > 268. if ($this->_nestingLevel == 1) { > --- > > Regards > > Eric --~--~-~--~~~---~--~~ 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: How do I set a field value on a form?
Be careful Mark, I think that by this way you'll get the same issue that I got... => http://groups.google.fr/group/symfony-users/browse_thread/thread/8473bed60eda6dbe setDefault() didn't work for me within the form to "force" a value got from session ; but it worked when I call this method from the action class. I'm still looking for a way to force this setting within the form.. -- Adrien Mogenet On 22 avr, 12:34, Mark Smith wrote: > I have a form with a list of services on it. When the user submits the > form, I want it to remember what item on the list was selected. Even > if it's several page requests later. > > I'm storing the index in session and trying to apply it to the form > field. Sending it in the constructor is probably tidier anyway, so I'm > changing it to do that. > > But for future reference, you are saying $form->setDefault('field', > 'value'); will work even after it's constructed and configure() has > been called? > > On Apr 22, 10:38 am, Bernhard Schussek wrote: > > > Hi Mark, > > > On Wed, Apr 22, 2009 at 10:23 AM, Mark Smith > > > wrote: > > > So you are saying the only way to change a form field once the object > > > exists, is to completely rebuild the form? > > > No. The question is _when_ you want to change the form. You can change > > the default values any time in the object lifecycle before you render > > the form. Note that the default values are not displayed anymore once > > you call ->bind(). > > > If you need more help, please provide a little more information on > > what you are trying to achieve. Otherwise it's hard to give you > > specific advice. > > > Bernhard --~--~-~--~~~---~--~~ 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: http://www.symfony-project.org/plugins/ Unavailable
I don't know why but I find problems appear too often on this Website... Is it due to servers ? application ? On 22 avr, 09:06, Lawrence Krubner wrote: > On Apr 22, 12:13 am, Sherif wrote: > > > I'm unable to login tohttp://www.symfony-project.org/plugins/(its > > been like that for a few hours now). When you try to login, you get a > > "500 Server error". Just posting it here if anyone knows someone who > > can fix this, that would be great > > Yeah, we were just talking about that, here on the symfony_users > group, a few hours ago. > > What I did was delete all cookies from symfony-project.org. That did > not enable me to log in, but it did at least allow me to see the > pages. --~--~-~--~~~---~--~~ 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: Something I don't understand with form default values
I don't know if I was clear or not... but I DON'T want force values in the CLASS but in the FORM :-) Thx anyway lol -- Adrien On 21 avr, 09:02, Lawrence Krubner wrote: > On Apr 21, 2:45 am, Adrien Mogenet wrote: > > > Symfony 1.2 > > > As I said in my first message, YES, it works when I put `setDefault` > > in the action. But when you call this method from the form class, it > > seems to not FORCE the value but just set it as a default value (ie: > > if no other value has been set) > > > In my case, it would be very convenient to force this value in the > > action instead of setting it in the form class, that's why I'm looking > > for a "tip" to do that directly from the form class :-) > > So you want to force a value from the action? That seems easy enough. > Below I set a default value for the date, but if you took away the if > () statement, instead of a default it would be a forced value. > > public function executeUpdate($request) > { > $this->forward404Unless($request->isMethod('post')); > > $this->form = new NewNewsForm(NewNewsPeer::retrieveByPk($request- > > >getParameter('id'))); > > $submittedValuesArray = $request->getParameter('new_news'); > > // 03-12-09 - I'm introducing two categories for now, "front_page" > // and "general". The first is for the weblog, the other is for > any > // other page that might be added to the site. > $category = $request->getParameter('category'); > if ($category != "") $submittedValuesArray["category"] = > $category; > > /* > * 03-09-09 - if I do this: > * print_r($submittedValuesArray); > * die(" stopped execution "); > * > * I get an array like this: > * > * Array ( [title] => Sagisaws beat the Apaches [description] => > * A hard fought game, yesterday, down in Del Ray. > * [active] => 1 [id] => ) > * > * This is not the correct way to do this, but I'm going to add the > date here. > * If id is not set, in other words, if we are just creating the entry > for the > * first time, then we add a date. > */ > // 03-10-09 - we set the date 24 hours in the future > // > if ($submittedValuesArray["id"] == "") $submittedValuesArray["date"] > = time() + 86400; > > $this->form->bind($submittedValuesArray); > if ($this->form->isValid()) > { > $new_news = $this->form->save(); > > $this->redirect('newnews/edit?id='.$new_news->getId()); > } > > $this->setTemplate('edit'); > } > > > On 21 avr, 08:11, Lawrence Krubner wrote: > > > > Which version of Symfony? > > > > You should always be able to force a default value from the action. > > > Always. I've done this many times. > > > > On Apr 20, 5:42 pm, Adrien Mogenet wrote: > > > > > As I tought it changed nothing... :-/ > > > > > -- > > > > Adrien > > > > > On 20 avr, 23:28, "FlyLM [ML]" wrote: > > > > > > 2009/4/20 Adrien Mogenet > > > > > > > Hi all, > > > > > > > there is something - strange ? - that I don't understand. > > > > > > Let say I have a field "updated_by" within the class "user". > > > > > > > In the class form : > > > > > > > public function configure() > > > > > > { > > > > > > .. > > > > > > $this->setDefault('updated_by', '42'); > > > > > > ... > > > > > > } > > > > > > Try this : > > > > > > $this->widgetSchema->setDefault('updated_by', '42'); --~--~-~--~~~---~--~~ 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: Something I don't understand with form default values
Symfony 1.2 As I said in my first message, YES, it works when I put `setDefault` in the action. But when you call this method from the form class, it seems to not FORCE the value but just set it as a default value (ie: if no other value has been set) In my case, it would be very convenient to force this value in the action instead of setting it in the form class, that's why I'm looking for a "tip" to do that directly from the form class :-) -- Adrien On 21 avr, 08:11, Lawrence Krubner wrote: > Which version of Symfony? > > You should always be able to force a default value from the action. > Always. I've done this many times. > > On Apr 20, 5:42 pm, Adrien Mogenet wrote: > > > As I tought it changed nothing... :-/ > > > -- > > Adrien > > > On 20 avr, 23:28, "FlyLM [ML]" wrote: > > > > 2009/4/20 Adrien Mogenet > > > > > Hi all, > > > > > there is something - strange ? - that I don't understand. > > > > Let say I have a field "updated_by" within the class "user". > > > > > In the class form : > > > > > public function configure() > > > > { > > > > .. > > > > $this->setDefault('updated_by', '42'); > > > > ... > > > > } > > > > Try this : > > > > $this->widgetSchema->setDefault('updated_by', '42'); --~--~-~--~~~---~--~~ 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: Something I don't understand with form default values
As I tought it changed nothing... :-/ -- Adrien On 20 avr, 23:28, "FlyLM [ML]" wrote: > 2009/4/20 Adrien Mogenet > > > > > Hi all, > > > there is something - strange ? - that I don't understand. > > Let say I have a field "updated_by" within the class "user". > > > In the class form : > > > public function configure() > > { > > .. > > $this->setDefault('updated_by', '42'); > > ... > > } > > Try this : > > $this->widgetSchema->setDefault('updated_by', '42'); --~--~-~--~~~---~--~~ 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] Force use of default values
Actually, I noticed that the field takes the value stored in database instead of taking my default value (normal behaviour). So, now my question is : how to force use of these default values ? -- Adrien On 20 avr, 19:42, Adrien Mogenet wrote: > Hi all, > > there is something - strange ? - that I don't understand. > Let say I have a field "updated_by" within the class "user". > > In the class form : > > public function configure() > { > .. > $this->setDefault('updated_by', '42'); > ... > > } > > By this way, it doesn't take effect. > But when I put the code in action class : > > public function executeEdit() > { > ... > $this->form->setDefault('updated_by', '42'); > > } > > The default value is set correctly. This is the first time I discover > this behaviour... is it really normal ? > > Is there a way to do what I wanted to write ? > I don't think it matters but anyway : the default value '42' is > actually get from sfUser::getAttribute('user_id', null, 'user'); > method. > > -- > Adrien Mogenet --~--~-~--~~~---~--~~ 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] Something I don't understand with form default values
Hi all, there is something - strange ? - that I don't understand. Let say I have a field "updated_by" within the class "user". In the class form : public function configure() { .. $this->setDefault('updated_by', '42'); ... } By this way, it doesn't take effect. But when I put the code in action class : public function executeEdit() { ... $this->form->setDefault('updated_by', '42'); } The default value is set correctly. This is the first time I discover this behaviour... is it really normal ? Is there a way to do what I wanted to write ? I don't think it matters but anyway : the default value '42' is actually get from sfUser::getAttribute('user_id', null, 'user'); method. -- Adrien Mogenet --~--~-~--~~~---~--~~ 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] Managing references between nested forms
Hi all, here is my new issue : Let say I have $organisationForm and $userForm who's nested within $organisationForm. So I display the whole form : organization name : organization website: administrator: name: surname: And then I would like to set "user.organization_id" with the ID of the new organisation that we've just registered. Did anyone play with such behaviour ? -- Adrien Mogenet --~--~-~--~~~---~--~~ 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: Issue with Swift
... But you give me a right way, guy !! php_smtp was disabled, I have just enabled it and I got my message correctly printed ! Thanks for giving me the idea ! -- Adrien On 15 avr, 18:23, Pablo Godel wrote: > Do you have openssl support enabled in PHP? > > On Wed, Apr 15, 2009 at 12:14 PM, Adrien Mogenet > > wrote: > > > My error report configuration is already set to 'E_ALL' :-) > > When I write "new Swift(new Swift_Connection_NativeMail())" the `echo` > > is printed on the screen... but not with new Swift_Connection_SMTP > > () ... > > > -- > > Adrien > > > On 15 avr, 18:07, FÁSI Gábor wrote: > >> Put an `error_reporting(E_ALL);` before the code, and you'll get the > >> error message on the output, not just the error log. > > >> On Wed, Apr 15, 2009 at 17:37, Adrien Mogenet > >> wrote: > > >> > I performed a test using `class_exists()` and Swift class seems to be > >> > correctly loaded... > > >> > -- > >> > Adrien > > >> > On 15 avr, 17:34, Pablo Godel wrote: > >> >> did you try another connection method? It is possible that PHP is not > >> >> finding the class. > > >> >> On Wed, Apr 15, 2009 at 11:31 AM, Adrien Mogenet > > >> >> wrote: > > >> >> > I tried to move the `echo`, and the error occurs just after the new > >> >> > Swift() line... > >> >> > I'll checked my error log, it's still empty :-X > >> >> > I also tried to use ENC_TLS instead of using ENC_SSL > > >> >> > -- > >> >> > Adrien > > >> >> > On 15 avr, 17:24, Pablo Godel wrote: > >> >> >> did you check your PHP error log ? It seems to me you are getting a > >> >> >> PHP fatal error before echo. > > >> >> >> If for some reason you can't see the error log, try to move the echo > >> >> >> line up until you find it, then you will know on what line the error > >> >> >> is. > > >> >> >> Pablo > > >> >> >> On Wed, Apr 15, 2009 at 11:20 AM, Adrien Mogenet > > >> >> >> wrote: > > >> >> >> > Hi all, > > >> >> >> > I'm trying to use Symfony 1.2 with Swift and I got a strange > >> >> >> > issue.. > > >> >> >> > $methodObject = new Swift_Connection_SMTP('smtp.gmail.com', 465, > >> >> >> > Swift_Connection_SMTP::ENC_SSL); > >> >> >> > $methodObject->setUsername('un...@gmail.com'); > >> >> >> > $methodObject->setPassword('PWD'); > >> >> >> > $mailer = new Swift($methodObject); > >> >> >> > echo "foo"; > > >> >> >> > and `foo` doesn't appear, and I'm not able to send emails... I > >> >> >> > don't > >> >> >> > know why :-( > >> >> >> > Does someone got a similar problem ? > > >> >> >> > -- > >> >> >> > Adrien --~--~-~--~~~---~--~~ 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: Issue with Swift
Yes I do !! And I wish I would get an error if it was disabled ! -- Adrien On 15 avr, 18:23, Pablo Godel wrote: > Do you have openssl support enabled in PHP? > > On Wed, Apr 15, 2009 at 12:14 PM, Adrien Mogenet > > wrote: > > > My error report configuration is already set to 'E_ALL' :-) > > When I write "new Swift(new Swift_Connection_NativeMail())" the `echo` > > is printed on the screen... but not with new Swift_Connection_SMTP > > () ... > > > -- > > Adrien > > > On 15 avr, 18:07, FÁSI Gábor wrote: > >> Put an `error_reporting(E_ALL);` before the code, and you'll get the > >> error message on the output, not just the error log. > > >> On Wed, Apr 15, 2009 at 17:37, Adrien Mogenet > >> wrote: > > >> > I performed a test using `class_exists()` and Swift class seems to be > >> > correctly loaded... > > >> > -- > >> > Adrien > > >> > On 15 avr, 17:34, Pablo Godel wrote: > >> >> did you try another connection method? It is possible that PHP is not > >> >> finding the class. > > >> >> On Wed, Apr 15, 2009 at 11:31 AM, Adrien Mogenet > > >> >> wrote: > > >> >> > I tried to move the `echo`, and the error occurs just after the new > >> >> > Swift() line... > >> >> > I'll checked my error log, it's still empty :-X > >> >> > I also tried to use ENC_TLS instead of using ENC_SSL > > >> >> > -- > >> >> > Adrien > > >> >> > On 15 avr, 17:24, Pablo Godel wrote: > >> >> >> did you check your PHP error log ? It seems to me you are getting a > >> >> >> PHP fatal error before echo. > > >> >> >> If for some reason you can't see the error log, try to move the echo > >> >> >> line up until you find it, then you will know on what line the error > >> >> >> is. > > >> >> >> Pablo > > >> >> >> On Wed, Apr 15, 2009 at 11:20 AM, Adrien Mogenet > > >> >> >> wrote: > > >> >> >> > Hi all, > > >> >> >> > I'm trying to use Symfony 1.2 with Swift and I got a strange > >> >> >> > issue.. > > >> >> >> > $methodObject = new Swift_Connection_SMTP('smtp.gmail.com', 465, > >> >> >> > Swift_Connection_SMTP::ENC_SSL); > >> >> >> > $methodObject->setUsername('un...@gmail.com'); > >> >> >> > $methodObject->setPassword('PWD'); > >> >> >> > $mailer = new Swift($methodObject); > >> >> >> > echo "foo"; > > >> >> >> > and `foo` doesn't appear, and I'm not able to send emails... I > >> >> >> > don't > >> >> >> > know why :-( > >> >> >> > Does someone got a similar problem ? > > >> >> >> > -- > >> >> >> > Adrien --~--~-~--~~~---~--~~ 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: Issue with Swift
My error report configuration is already set to 'E_ALL' :-) When I write "new Swift(new Swift_Connection_NativeMail())" the `echo` is printed on the screen... but not with new Swift_Connection_SMTP () ... -- Adrien On 15 avr, 18:07, FÁSI Gábor wrote: > Put an `error_reporting(E_ALL);` before the code, and you'll get the > error message on the output, not just the error log. > > On Wed, Apr 15, 2009 at 17:37, Adrien Mogenet > wrote: > > > I performed a test using `class_exists()` and Swift class seems to be > > correctly loaded... > > > -- > > Adrien > > > On 15 avr, 17:34, Pablo Godel wrote: > >> did you try another connection method? It is possible that PHP is not > >> finding the class. > > >> On Wed, Apr 15, 2009 at 11:31 AM, Adrien Mogenet > > >> wrote: > > >> > I tried to move the `echo`, and the error occurs just after the new > >> > Swift() line... > >> > I'll checked my error log, it's still empty :-X > >> > I also tried to use ENC_TLS instead of using ENC_SSL > > >> > -- > >> > Adrien > > >> > On 15 avr, 17:24, Pablo Godel wrote: > >> >> did you check your PHP error log ? It seems to me you are getting a > >> >> PHP fatal error before echo. > > >> >> If for some reason you can't see the error log, try to move the echo > >> >> line up until you find it, then you will know on what line the error > >> >> is. > > >> >> Pablo > > >> >> On Wed, Apr 15, 2009 at 11:20 AM, Adrien Mogenet > > >> >> wrote: > > >> >> > Hi all, > > >> >> > I'm trying to use Symfony 1.2 with Swift and I got a strange issue.. > > >> >> > $methodObject = new Swift_Connection_SMTP('smtp.gmail.com', 465, > >> >> > Swift_Connection_SMTP::ENC_SSL); > >> >> > $methodObject->setUsername('un...@gmail.com'); > >> >> > $methodObject->setPassword('PWD'); > >> >> > $mailer = new Swift($methodObject); > >> >> > echo "foo"; > > >> >> > and `foo` doesn't appear, and I'm not able to send emails... I don't > >> >> > know why :-( > >> >> > Does someone got a similar problem ? > > >> >> > -- > >> >> > Adrien --~--~-~--~~~---~--~~ 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: Issue with Swift
I performed a test using `class_exists()` and Swift class seems to be correctly loaded... -- Adrien On 15 avr, 17:34, Pablo Godel wrote: > did you try another connection method? It is possible that PHP is not > finding the class. > > On Wed, Apr 15, 2009 at 11:31 AM, Adrien Mogenet > > wrote: > > > I tried to move the `echo`, and the error occurs just after the new > > Swift() line... > > I'll checked my error log, it's still empty :-X > > I also tried to use ENC_TLS instead of using ENC_SSL > > > -- > > Adrien > > > On 15 avr, 17:24, Pablo Godel wrote: > >> did you check your PHP error log ? It seems to me you are getting a > >> PHP fatal error before echo. > > >> If for some reason you can't see the error log, try to move the echo > >> line up until you find it, then you will know on what line the error > >> is. > > >> Pablo > > >> On Wed, Apr 15, 2009 at 11:20 AM, Adrien Mogenet > > >> wrote: > > >> > Hi all, > > >> > I'm trying to use Symfony 1.2 with Swift and I got a strange issue.. > > >> > $methodObject = new Swift_Connection_SMTP('smtp.gmail.com', 465, > >> > Swift_Connection_SMTP::ENC_SSL); > >> > $methodObject->setUsername('un...@gmail.com'); > >> > $methodObject->setPassword('PWD'); > >> > $mailer = new Swift($methodObject); > >> > echo "foo"; > > >> > and `foo` doesn't appear, and I'm not able to send emails... I don't > >> > know why :-( > >> > Does someone got a similar problem ? > > >> > -- > >> > Adrien --~--~-~--~~~---~--~~ 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: Issue with Swift
I tried to move the `echo`, and the error occurs just after the new Swift() line... I'll checked my error log, it's still empty :-X I also tried to use ENC_TLS instead of using ENC_SSL -- Adrien On 15 avr, 17:24, Pablo Godel wrote: > did you check your PHP error log ? It seems to me you are getting a > PHP fatal error before echo. > > If for some reason you can't see the error log, try to move the echo > line up until you find it, then you will know on what line the error > is. > > Pablo > > On Wed, Apr 15, 2009 at 11:20 AM, Adrien Mogenet > > wrote: > > > Hi all, > > > I'm trying to use Symfony 1.2 with Swift and I got a strange issue.. > > > $methodObject = new Swift_Connection_SMTP('smtp.gmail.com', 465, > > Swift_Connection_SMTP::ENC_SSL); > > $methodObject->setUsername('un...@gmail.com'); > > $methodObject->setPassword('PWD'); > > $mailer = new Swift($methodObject); > > echo "foo"; > > > and `foo` doesn't appear, and I'm not able to send emails... I don't > > know why :-( > > Does someone got a similar problem ? > > > -- > > Adrien --~--~-~--~~~---~--~~ 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] Issue with Swift
Hi all, I'm trying to use Symfony 1.2 with Swift and I got a strange issue.. $methodObject = new Swift_Connection_SMTP('smtp.gmail.com', 465, Swift_Connection_SMTP::ENC_SSL); $methodObject->setUsername('un...@gmail.com'); $methodObject->setPassword('PWD'); $mailer = new Swift($methodObject); echo "foo"; and `foo` doesn't appear, and I'm not able to send emails... I don't know why :-( Does someone got a similar problem ? -- Adrien --~--~-~--~~~---~--~~ 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: Issue when removing created_at form's field
Finally I found my mistake... I just forgot to add the following line unset($this['created_at'], $this['updated_at']); in the form class. Thanks for the help -- Adrien On 5 avr, 14:27, Adrien Mogenet wrote: > Unfortunately, it didn't work :-( > Don't know what I should try... > > -- > Adrien > > On 3 avr, 23:22, Arnold Ispan wrote: > > > Hello, > > > Maybe the solution is to rebuild forms and filters with *propel:build-forms > > *and *propel:build-filters* > > > On Fri, Apr 3, 2009 at 11:41 PM, Adrien Mogenet > > wrote: > > > > Hi all, > > > > I have a classical entity, let say `member`, with `created_at` and > > > `updated_at` fields. > > > I performed a propel:build-model, I generated CRUD module, and when I > > > removed created_at and updated_at fields from the form's template, > > > their values are set to empty once I submit the form... > > > > How can I avoid this behaviour easily ? > > > > -- > > > Adrien --~--~-~--~~~---~--~~ 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: Issue when removing created_at form's field
Unfortunately, it didn't work :-( Don't know what I should try... -- Adrien On 3 avr, 23:22, Arnold Ispan wrote: > Hello, > > Maybe the solution is to rebuild forms and filters with *propel:build-forms > *and *propel:build-filters* > > On Fri, Apr 3, 2009 at 11:41 PM, Adrien Mogenet > wrote: > > > > > Hi all, > > > I have a classical entity, let say `member`, with `created_at` and > > `updated_at` fields. > > I performed a propel:build-model, I generated CRUD module, and when I > > removed created_at and updated_at fields from the form's template, > > their values are set to empty once I submit the form... > > > How can I avoid this behaviour easily ? > > > -- > > Adrien --~--~-~--~~~---~--~~ 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: Issue when removing created_at form's field
I tried but I will retry from scratch... [ I don't understand why the topic changed so suddenly ;-) ] -- Adrien On 3 avr, 23:22, Arnold Ispan wrote: > Hello, > > Maybe the solution is to rebuild forms and filters with *propel:build-forms > *and *propel:build-filters* > > On Fri, Apr 3, 2009 at 11:41 PM, Adrien Mogenet > wrote: > > > > > Hi all, > > > I have a classical entity, let say `member`, with `created_at` and > > `updated_at` fields. > > I performed a propel:build-model, I generated CRUD module, and when I > > removed created_at and updated_at fields from the form's template, > > their values are set to empty once I submit the form... > > > How can I avoid this behaviour easily ? > > > -- > > Adrien --~--~-~--~~~---~--~~ 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] Issue when removing created_at form's field
Hi all, I have a classical entity, let say `member`, with `created_at` and `updated_at` fields. I performed a propel:build-model, I generated CRUD module, and when I removed created_at and updated_at fields from the form's template, their values are set to empty once I submit the form... How can I avoid this behaviour easily ? -- Adrien --~--~-~--~~~---~--~~ 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: symfony in shared servers
What do you mean exactly ? There are a lot of different scenarii for a such architecture... Do you want to perform load balancing ? high availability platform ? -- Adrien Mogenet On 14 fév, 12:33, Harinath Mallepally wrote: > Hi, > > What is the best way to install and use symfony in shared server > scenario. > > Thanks > Harinath --~--~-~--~~~---~--~~ 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: Search form and paging system.
Thank you all. I didn't think that using the user session would be the best way to do, for me the concept of query is not linked to the concept of user, but I see it may be a good way to do what I want... -- Adrien Mogenet http://www.tekover.net On 7 nov, 23:09, "Kiril Angov" <[EMAIL PROTECTED]> wrote: > The way this is usually done is to not pass the whole $request object > but only the search criteria. I usually build $search array with all > the filters and save it in the users session like: > > $this->getUser()->setAttribute('search', $search); > > Then when you get a request with ?page=2 you just do $search = > $this->getUser()->getAttribute('search', array()); and you pass that > again to you buildCriteria() > > That's the general logic. > > On Thu, Nov 6, 2008 at 1:19 PM, Adrien Mogenet <[EMAIL PROTECTED]> wrote: > > > Hi everyone. > > > I developped a "complex" search form (with about 30 criteria) and I > > would like to be able to use a sfPropelPager object to get a powerful > > paging system. > > > My problem is that I build the query once the form has been sent, so > > the paging system works from this first page I display, but if I click > > on "goto page #2", the filters from the search form are not in the > > sfRequest anymore, so no filter is applied. > > > in actions.class.php, I have sthg like that : > > > public function executeIndex($request) > > { > > $this->pager = new sfPropelPager('User', 10); > > $c = new Criteria(); > > $c = $this->buildQuery($c, $request); > > $this->pager->setCriteria($c); > > } > > > So, it's ok for the first page, but if I go to the user/page/2 link, > > $request is empty, and that is why no criteria is applied. > > > How can I fix this issue ? > > > -- > > Adrien M. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Search form and paging system.
Hi everyone. I developped a "complex" search form (with about 30 criteria) and I would like to be able to use a sfPropelPager object to get a powerful paging system. My problem is that I build the query once the form has been sent, so the paging system works from this first page I display, but if I click on "goto page #2", the filters from the search form are not in the sfRequest anymore, so no filter is applied. in actions.class.php, I have sthg like that : public function executeIndex($request) { $this->pager = new sfPropelPager('User', 10); $c = new Criteria(); $c = $this->buildQuery($c, $request); $this->pager->setCriteria($c); } So, it's ok for the first page, but if I go to the user/page/2 link, $request is empty, and that is why no criteria is applied. How can I fix this issue ? -- Adrien M. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---