Re: [symfony-users] [Symfony2] Deleting default security.yml file

2011-05-30 Thread oscar balladares
What I'm doing is to override the defaults, this is quicker/easier (for me at least) than option 2: Remove from appKernel any reference to security: SecurityBundle, and SecurityExtraBundle, Also, comment out/remove reference to JMS in config.yml (The lasts lines of the file) and of course

Re: [symfony-users] Re: Highlighting menu based on controller called

2011-05-30 Thread oscar balladares
What I'm doing is to get the actual route in template, and if a route matchs a category (lets say), then print an id='current' for example: lia {% if app.request.attributes.get('_route') == 'homepage' %} class='current' {% endif %} href={{ path('homepage')

Re: [symfony-users] Re: Highlighting menu based on controller called

2011-05-30 Thread oscar balladares
Oh! I forgot. For your actual request, yes, you can do the same for the controller, just toggle _route with _controller instead. app.request.attributes.get('_controller') I actually post a question about this, it was because '_controller' was not available when you call the 'render' helper to

[symfony-users] Re: how to update between 2.0 versions

2011-05-30 Thread Stephan Petzl
Maybe this is not the most elegant way of doing it (let me know if there is a better way), but it works, so here we go: Our whole project lives in a git repo on our server. We have defined some ignores in .gitignore (such as vendor/) To work on the project we clone it from the server (git clone

Re: [symfony-users] [SF2] Question on security password encoding

2011-05-30 Thread Vincent Lechemin
Hi, you could use doctrine events such as preUpdate and prePersist. Then adding the encoder service in the constructor could be a way to enforce the encryption. For the fixtures, you have access to the container so it should not be a problem. -- Vincent -- If you want to report a vulnerability

Re: [symfony-users] [SF2] Question on security password encoding

2011-05-30 Thread Vincent Lechemin
Ops, the forced parameter in the constructor is not a good idea for an entity :p -- Vincent On May 30, 2011 9:29 AM, Vincent Lechemin vincent.leche...@gmail.com wrote: Hi, you could use doctrine events such as preUpdate and prePersist. Then adding the encoder service in the constructor could

Re: [symfony-users] Develop an app as an API

2011-05-30 Thread Gareth McCumskey
Web services are considered stateless requests. There is no client side browser to manage storing a cookie to allow for stateful sessions. A better solution is to include the authentication with every request made and then verify the credentials on the server side with each request. With a REST

Re: [symfony-users] [symfony2] which is the correct way to deliver binary content?

2011-05-30 Thread Gareth McCumskey
Your last option is what would be considered best practice. Set the headers correctly and return the content of the binary as your response. On Wed, May 11, 2011 at 11:24 AM, David Buchmann david.buchm...@liip.chwrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi, i have binary content

[symfony-users] Re: embedded forms, collection

2011-05-30 Thread Michael Holm
Hi, Stupid.. made a typo in my annotations.. could not map to a undefined property: profile_id, the name was profile. Best regards, Michael Holm On Fri, May 27, 2011 at 2:02 PM, Michael Holm ho...@hollo.dk wrote: Hi, I have a problem with embedded forms.. i get a notice: undefined index

[symfony-users] getting a fatal error using swiftmailer

2011-05-30 Thread Diego Henrique Oliveira
Hey guys, I'm getting a fatal error when i try to use swiftmailer. Take a look: Fatal error: Call to a member function clearAll() on a non-object in /home/diegoholiveira/projects/brasilrepublicas/vendor/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php on line 822 Does anyone know

[symfony-users] Re: SF2 WebServiceBundle

2011-05-30 Thread Maarten De Schrijver
Have you configured your web service in app/config/config.yml ? -- 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,

[symfony-users] [SF2] form and OneToMany relationship

2011-05-30 Thread Michael Holm
Hi, I have a problem with a OneToMany relationship in a form, when i save an entity without any related elements i get a warnings: Warning: spl_object_hash() expects parameter 1 to be object, array given in /var/www/clubmaster_v2/vendor/doctrine/lib/Doctrine/ORM/UnitOfWork.php line 1219 I have

[symfony-users] Re: Develop an app as an API

2011-05-30 Thread iturri.cf
You can use an API key instead a username-password, and send it with every request as a custom HTTP header. You can read an example from http://www.symfony-project.org/more-with-symfony/1_4/en/10-Symfony-Internals: Using the request.filter_parameter event Let's say you're operating a website

Re: [symfony-users] Strange routing

2011-05-30 Thread Gábor Fási
Enable mod_rewrite. -- mrl On Sun, May 29, 2011 at 12:11, Michele Pierri michele442-symf...@yahoo.it wrote: Hi, I have this routing file: # You can find more information about this file on the symfony website: # http://www.symfony-project.org/reference/1_4/en/10-Routing # default rules

Re: [symfony-users] Doctrine build-model problem

2011-05-30 Thread Gábor Fási
Show us your schema.yml. -- mrl On Sun, May 29, 2011 at 02:11, Nabil Karous karous1na...@gmail.com wrote: Hi I have problem with symfony Doctrine : build-model  help please -message ERREUR doctrine  generating model classes file+    

Re: [symfony-users] Assetic twig grouping assets and filters

2011-05-30 Thread David Buchmann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi everybody, any updates on this one? the apply_to: annotations work fine, really like them. i do not get any errors for assetic:dump, neither with the - --watch parameter nor otherwise. i would love to use the assetic.assets notation for a named

Re: [symfony-users] [SF2] Question on security password encoding

2011-05-30 Thread oscar balladares
[?] Ok, I got your point. Of course, it is up to the developer to remember everything, and debug any issue during the life cicle of the app. If not then he/she wouldn't be a developer. But I'm pretty sure that you mean that you want more abstraction. You could: ?php namespace bla\bla\Entity;

Re: [symfony-users] [SF2] Question on security password encoding

2011-05-30 Thread oscar balladares
Sorry This story has to be continued Class User { public function setPassword($password) { $this-salt = md5(time()); $encoder = new MessageDigestPasswordEncoder('sha512', true, 10); $this-password = $encoder-encodePassword($password, $this-getSalt()); } } That should work [?]

Re: [symfony-users] [SF2] Question on security password encoding

2011-05-30 Thread Christophe COEVOET
Le 30/05/2011 19:11, oscar balladares a écrit : Sorry This story has to be continued Class User { public function setPassword($password) { $this-salt = md5(time()); $encoder = new MessageDigestPasswordEncoder('sha512', true, 10); $this-password = $encoder-encodePassword($password,

Re: [symfony-users] [SF2] Question on security password encoding

2011-05-30 Thread oscar balladares
And it will work again when you remember to refactor the code because you are a good dev and have a well documented project. How many time you will be updating/changing the iterations? No flame war intented :D I was just trying to help IMHO. [?] 2011/5/30 Christophe COEVOET s...@notk.org It

[symfony-users] Long loading

2011-05-30 Thread Dark
I installed symfony on my virtual ubuntu, but there is a problem with speed. app_dev.php need a very long time to boot, this is 3-10 sec to load a page. Although on my windows it takes only 300 seconds. What it may be? -- If you want to report a vulnerability issue on symfony, please send it to

[symfony-users] Re: Long loading

2011-05-30 Thread Dark
ubuntu-server 10.10 apache 2.2.16 mysql 5.1.49 php 5.3.3 php-exts: curl, eAccelerator, gd, imagick, imap, mcrypt, memcache, mysql, SQLite, tidy, xsl On May 31, 1:00 am, Dark d46...@gmail.com wrote: I installed symfony on my virtual ubuntu, but there is a problem with speed. app_dev.php need a

[symfony-users] Re: Generate proxies in Test mode ?

2011-05-30 Thread spike3111
No ideas? Someone writing tests and have proxies generated in cache? On 29 mai, 15:35, spike3111 gilles.gauthie...@gmail.com wrote: Hello, I try to know how to generate proxies in test mode ? In dev and prod, proxies are generated in the cache folder. In config.yml I have this option for

[symfony-users] Re: Long loading

2011-05-30 Thread chafik
Hi Dark, Is it a fresh install of Symfony, or a project that you've already developed ? Check the logs with the sf toolbar (number of requests done by Doctrine for example). For example, by removing a bidirectionnal association, I saved 7000 queries, and 12s loading my page ;) -- If you

Re: [symfony-users] Re: Develop an app as an API

2011-05-30 Thread Gareth McCumskey
One problem you have with that is an API key can be intercepted very easily over the wire and used. Combined with an n-once setup makes that far far harder. Basically all an an n-once is is a salt. You generate a random string ( something like md5(microtime()) for example), then use that to salt