[symfony-users] Re: [Symfony2] FOS\UserBundle and role hierarchies

2011-04-15 Thread Carl
Alright, well, it looks like I misunderstood how roles are actually used by this bundle. Now that I've looked into it while not half asleep and I've more closely examined the code, it actually makes a lot more sense why it's done this way, and it's far easier than I was making it. Now I just fee

[symfony-users] notice: serialize() __sleep

2011-04-15 Thread Luis Cordova
I am getting a notice: Notice: serialize(): "sessionverses" returned as member variable from __sleep() but does not exist in /home/cordoval/sites-2/memorizescripture/vendor/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php on line 136 Notice: serialize(): "chapter"

[symfony-users] Re: help how to get current user object while using UserBundle

2011-04-15 Thread Luis Cordova
solved it I had to do $this->container and not $this->$container or just $container ... the problem is that my IDE phpstorm in this case can't track the php dependencies so i am unaware what variables are there... Thanks though On Fri, Apr 15, 2011 at 8:36 PM, Luis Cordova wrote: > I found :

[symfony-users] Re: help how to get current user object while using UserBundle

2011-04-15 Thread Luis Cordova
I found : $user = $container->get('security.context')->getToken()->getUser(); however it does not work within my controller which is extending Controller should I also extend my controller class with ContainerAware ??? Please hint me Thanks Luis On Fri, Apr 15, 2011 at 8:06 PM, Luis Cordova

[symfony-users] help how to get current user object while using UserBundle

2011-04-15 Thread Luis Cordova
Hi I am trying to get the user object within my controller action but i am having a hard time finding the method to fetch current user If I use findUserByConfirmationToken($token) then where do I get the $token from? I don't want to bypass ACL checks so I need to find the correct way to fetch cur

Re: [symfony-users] how can login to forum?

2011-04-15 Thread Gareth McCumskey
http://forum.symfony-project.org/ucp.php?mode=register&sid=8c78ea17e7252f15144da3c0d509ec55 On Fri, Apr 15, 2011 at 4:42 PM, libero wrote: > How can i access the forum? (http://forum.symfony-project.org) > I can't get the password and username: > I compile the form to ask for the data but it a

Re: [symfony-users] Re: Symfony2 ACL Performance Question

2011-04-15 Thread Tim Nagel
Normally we'll expect the developer to implement their own controllers/views if they need anything more advanced than what we're providing at the moment, but I'm considering making it easier for developers to get what they need without doing so. I am also experimenting with HTTP caching, but as ev

[symfony-users] Re: Symfony2 dir conventions for forms

2011-04-15 Thread Carl
In all of the third party bundles I've looked at, all forms for the bundle seem to go in SomeVendor\Bundle\BundleName\Form. That's how I've been organizing my own forms as well since it makes them easy to find and the namespace makes sense. Personally, I tend to organize classes based on their

[symfony-users] Symfony2 dir conventions for forms

2011-04-15 Thread JC
I was following the example of the Contact Form/Request objects online and got confused by the implied directories where these files reside. They currently point (per the documentation) to // src/Acme/HelloBundle/Contact/ContactForm.php // src/Acme/HelloBundle/Controller/HelloController.php // src

[symfony-users] R: How to read additional dsn info from databases.yml

2011-04-15 Thread ftassi
> Does anyone know how I can read in the connection info rather than > setting it manually? I have tried $conn = > DoctrineManager::connection('name of connection') but I get a parsing > error. > > This should work Doctrine_Manager::getInstance()->getConnection('connection-name') Cheers Fr

[symfony-users] Re: Aw: riddle me this

2011-04-15 Thread Carl
If you're planning on using Symfony2 for a project, I definitely recommend trying to keep your project up-to-date with the latest preview releases. That way when it does become stable, you won't have to change as much in your project. There have been quite a few changes between PR6 and PR11. --

Re: [symfony-users] Re: Aw: riddle me this

2011-04-15 Thread Gábor Fási
It is yet to be released as stable. On Apr 15, 2011 10:28 PM, "violyn" wrote: > I am using PR6 now... a thanks I see what you are saying. I thought > though that Symfony 2 was released -- was that retracted? > > -- > If you want to report a vulnerability issue on symfony, please send it to sec

[symfony-users] Re: Aw: riddle me this

2011-04-15 Thread violyn
I am using PR6 now... a thanks I see what you are saying. I thought though that Symfony 2 was released -- was that retracted? -- 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

Re: [symfony-users] Problem with sfWidgetFormI18nChoiceCurrency

2011-04-15 Thread Gábor Fási
Starting from 1.3, all content passed from the action to the view gets automatically escaped - including that field of your. Gets wrapped in an sfOutputEscaperObjectDecorator instance. I believe it works just like when doctrine objects get passed to the view, you can get the unescaped data with `$

[symfony-users] Re: [symfony2] How to use bundles?

2011-04-15 Thread Sebastian Göttschkes
Hi Carl, thanks for your fast reply. It's very appreciated! The link on dependency injection by fabien potencier is really great. For the first time, I think I got it... And I talked to a lot of people trying to explain it to me :-) With this in mind I think I get a bit of the idea of bundles.

[symfony-users] Problem with sfWidgetFormI18nChoiceCurrency

2011-04-15 Thread Fernando Grassi de Oliveira
Hi there people ;) So... im getting something weird here. If I wrote the code in the IndexSuccess.php like this $w = new sfWidgetFormI18nChoiceCurrency(array('culture' => 'pt_BR')); echo $w->render('foo'); works fine! But if I put the part of code on the actions.class.php like this $this

[symfony-users] Re: [symfony2] How to use bundles?

2011-04-15 Thread Carl
Typically, bundles perform tasks that are all related. For example, your blog would be a bundle. You'd include everything needed to manage your blog in that bundle. Default views, services, configuration, routing, etc. Depending on how big the rest of your site is and on the functionality you n

[symfony-users] [symfony2] How to use bundles?

2011-04-15 Thread Sebastian Göttschkes
Hi, to get straight to the point: I don't get the idea of bundles! symfony1.4 was really straightforward: applications, modules, actions - Got it. But bundles leaving me clueless. Maybe we could do an example: I have a website with news on the homepage, some information on some sites and a "su

[symfony-users] How to read additional dsn info from databases.yml

2011-04-15 Thread codecowboy
Hi, I need to connect to a second database from my Symfony (1.4/Doctrine) application but don't want to use the ORM to connect to the other db. I can connect like this: $dsn = 'mysql:host=test;dbname=test'; $user = 'user'; $password = 'pass'; $dbh = new PDO($dsn, $user, $password); $conn = Doctr

[symfony-users] Aw: riddle me this

2011-04-15 Thread Sebastian Göttschkes
Hi there, yue seemed confused by the versioning. There is a stable symfony 1.4[1] as well as an unstable Symfony 2. The Preview Release are just unstable releases of symfony2 to test and play around. As far as "real" consumers are concerned, there is no symfony2 at the moment. As soon as symfo

[symfony-users] how can login to forum?

2011-04-15 Thread libero
How can i access the forum? (http://forum.symfony-project.org ) I can't get the password and username: I compile the form to ask for the data but it always replies "The e-mail/username information submitted could not be found." Thank you in advance for your hel

[symfony-users] Re: ajax in symfony 2

2011-04-15 Thread symfonyMan
Hello, thanks for all this responses. the controller must return a template ? Me, I need ajax just for validate email, and print "ok" next to the email field... sorry i have a bad english :) thnaks On 15 avr, 00:12, oscar balladares wrote: > The controller should return a template response,

[symfony-users] Re: Symfony2 ACL Performance Question

2011-04-15 Thread Marc MacLeod
Hi Tim, thanks very much. I'm sure taking a look at that will be very helpful! Any chance you'll be making use of the HttpCache and/or Doctrine cache? Working examples of how to best utilize these systems would be extremely helpful as well, and are very applicable to a comment system. Btw I plan

[symfony-users] riddle me this

2011-04-15 Thread violyn
why is symfony still in PR (now 11) AND version 2? -- 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 s

Re: [symfony-users] Re: Error in Insert

2011-04-15 Thread Alvaro Touzon
thanks Carl 2011/4/15 Carl > Hmm, I'll have to think about this some more then. Hopefully someone who's > more familiar with Doctrine will post something that works. Sorry I couldn't > be more helpful. > > -- > If you want to report a vulnerability issue on symfony, please send it to > security

Re: [symfony-users] Re: Error in Insert

2011-04-15 Thread Carl
Hmm, I'll have to think about this some more then. Hopefully someone who's more familiar with Doctrine will post something that works. Sorry I couldn't be more helpful. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received th

Re: [symfony-users] Re: Error in Insert

2011-04-15 Thread Alvaro Touzon
Hi Carl, The throw of getId returns the good value and if i put into the BD the user_id as can be NULL, the didn't insert the last insert id Thanks 2011/4/15 Carl > That error can still happen even if it's only an integer though. If it > doesn't contain a default value in the database and/or it

Re: [symfony-users] Re: Error in Insert

2011-04-15 Thread Carl
That error can still happen even if it's only an integer though. If it doesn't contain a default value in the database and/or it has a NOT NULL constraint, then when you do an insert without assigning it a value, the insert will fail. It looks you're assigning it a value properly. So the former

Re: [symfony-users] Re: Error in Insert

2011-04-15 Thread Alvaro Touzon
the user_id, is not the primary key. It only a integer, Thanks Carl Sorry for my poor english 2011/4/15 Carl > What do you have set as the default value for user_id in your database > schema (i.e., in your actual database)? It sounds like your user_id column > might not be set to AUTO_INCREMENT

[symfony-users] Re: Error in Insert

2011-04-15 Thread Carl
What do you have set as the default value for user_id in your database schema (i.e., in your actual database)? It sounds like your user_id column might not be set to AUTO_INCREMENT or it has a NOT NULL constraint. So when you try to add a new user, it expects a value for user_id other than NULL.

[symfony-users] [Symfony2] FOS\UserBundle and role hierarchies

2011-04-15 Thread Carl
I'm currently working on configuring the FOSUserBundle to work with my access control rules and I seem to have run into an issue with role hierarchies. Here's the relevant portion of my security.yml file: == role_hierarchy: ROLE_MEMBER

Re: [symfony-users] Re: Problem with authentication on cluster

2011-04-15 Thread Alvaro Touzon
Hi, i've worked under cluster, and will be have the session into another cluster, will be? 2011/4/14 smontes > I am using the sandbox of the PR8. I happen the same issue when I use > entities on the authentication. the problem (as someone told me) could > be related with the property username, b

[symfony-users] Error in Insert

2011-04-15 Thread Alvaro Touzon
hi i had that error when make an insert, the two tables has a relation OneToOne bidirectional: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'user_id' cannot be null The code used is resumed here: http://pastebin.com/tqBXVhKk -- Álvaro, Senior Web Developer -- If you want to r