[symfony-users] Cascade: persist not working with Forms

2011-06-13 Thread Ruben de Vries
I've created a small demobundle with the case, since that's a lot easier then pasting a lot of code in here: https://github.com/rubensayshi/DemoBundle The bundle has two entities (DemoUser and DemoComment) which are linked by a oneToMany relation which has the `casecard [persist]` set on the one

[symfony-users] Configuring the From header for emails

2011-06-13 Thread thesaint
In the How to send emails the From address is configured statically. What is the best way in Symfony 2 to make the address configurable? In Symfony 1.4 I'd just put some values in app.yml. With Symfony 2 I don't know what's the best way to do that. -- If you want to report a vulnerability

[symfony-users] The easy way to install PHPUnit on windows 7 without pear

2011-06-13 Thread keymaster
I'm hoping this post will save someone some time. Like every other good developer, I wanted to install phpUnit to get some automated testing going on Symfony2. The phpUnit documentation tells you to use PEAR to download and install phpUnit with all it's dependant packages. Unfortunately, I

[symfony-users] Re: [1.4] sfDoctrineActAsKeyValueStorePlugin with form values

2011-06-13 Thread John Kary
Here's the solution I came up with to allow sfDoctrineActAsKeyValueStorePlugin to hydrate default values when injecting objects with the KeyValueStore behavior, and also to save form values to the key/value store after the form is submitted and validated. It should be fairly easy to add

[symfony-users] [sf2] Html Escaping

2011-06-13 Thread Thomas
I all, i've a problem when rendering a news in a twing template. My html isn't escaped : public function showAction($permalink){ $news = $this-get('doctrine') -getEntityManager() -getRepository('CompanySiteBundle:News') -findOneByPermalink($permalink); if (!$news) { throw

Re: [symfony-users] Re: [S2-Doctrine2] Get custom set of associated objects in lazy loading, not all related object (how to implement a filter ).

2011-06-13 Thread oscar balladares
Hi again to everybody, and specially thanks to Winou for your big patience, without your help I would have been stucked in a huge performance hole in my application. I must remark, though, that Doctrine's dql doesn't support the clause 'ON' directly, it uses the 'WITH' clause instead. And this is

Re: [symfony-users] [sf2] Html Escaping

2011-06-13 Thread Christophe COEVOET
Le 13/06/2011 18:21, Thomas a écrit : I all, i've a problem when rendering a news in a twing template. My html isn't escaped : public function showAction($permalink){ $news = $this-get('doctrine') -getEntityManager() -getRepository('CompanySiteBundle:News') -findOneByPermalink($permalink); if

Re: [symfony-users] [sf2] Html Escaping

2011-06-13 Thread oscar balladares
Hi, if have worked with Twig or Symfony 1.4 way to pass variables from controllers to views, it is the same for all cases. In a controller you will return a view response like: return $this-render('YourBundle:Folder:view.html.php', array('viewBar' = $controllerBar, 'viewFoo' = $controllerFoo));

Re : Re: [symfony-users] [sf2] Html Escaping

2011-06-13 Thread Thomas
Hello Christophe, In my showNews.html.twig i have : {% block content %} h2{{ news.titre }}/h2 div id=date_news iPublished on {{ news.dateCreation.format('d F Y') }}./i /div {{ news.contenu }} {% endblock %} and in my head i've the meta : meta http-equiv=Content-Type content=text/html;

[symfony-users] Aw: Re: Security Component: how to authenticate a user manually?

2011-06-13 Thread thesaint
I have put the following code in my controller and it works: $providerKey = $this-container-getParameter('fos_user.firewall_name'); $token = new PreAuthenticatedToken($user, null, $providerKey, $user-getRoles()); $this-get('security.context')-setToken($token); -- If you want to report a

[symfony-users] Aw: Configuring the From header for emails

2011-06-13 Thread thesaint
Ok, nevermind, found the docs with my example: http://symfony.com/doc/current/book/bundles.html#configuration -- 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

Re: [symfony-users] Aw: Re: Security Component: how to authenticate a user manually?

2011-06-13 Thread Christophe COEVOET
Le 13/06/2011 20:19, thesaint a écrit : I have put the following code in my controller and it works: $providerKey = $this-container-getParameter('fos_user.firewall_name'); $token = new PreAuthenticatedToken($user, null, $providerKey, $user-getRoles());

[symfony-users] sfGuard permissions not working with sfPDOSessionStorage

2011-06-13 Thread tigana . fluens
Hi all. When I changed my session storage class to sfPDOSessionStorage, permissions didn't work anymore. Do I need to do something other than creating the table and configuring factories.yml for these to go back to normal? The app just recognizes everyone as a regular user, I can't even see

Re: [symfony-users] [symfony2] file upload example?

2011-06-13 Thread Fabien Potencier
On 6/11/11 12:24 PM, Ruben de Vries wrote: Are there any bundles on github that demonstrate a fileupload? I'm trying to implement handling the fileupload but I'm not really sure how to do it 'the symfony way' So some source code to dig through on github would be really helpfull (A)