How to change CSRF attack message in Symfony 1.2
I wanted to change the symfony 1.2 CSRF attack message from “CSRF attack detected.” to “This session has expired. Please return to the home page and try again.”.

I wanted to change the symfony 1.2 CSRF attack message from “CSRF attack detected.” to “This session has expired. Please return to the home page and try again.”.

This is for Symfony 1.2 and sfGuardPlugin, but may be relevant for newer versions (1.3, 1.4, etc).
Setting timeout to false in factories.yml should’ve worked, e.g. like this:
all:
user:
class: myUser
param:
# this should have worked, but did not
timeout: falseBut it didn’t work because I think ‘false’ did not get parsed as literal false.
Read more…
Symfony Framework has a preview release (not stable yet) of Symfony version 2 (Symfony Reloaded).
At a glance, by reading the ‘read and learn‘ section, this new version will be quite different than the previous versions in terms of file and directory structure, components, etc.
Some highlights:
Interesting comparison with other frameworks showing how fast Symfony 2 is, Symfony team claimed it is arguably the fastest!
I look forward to spend sometime to get familiar with this new version.
Happy coding!
I haven’t watched these videos yet, but here they are! I hope they are in English :P
Thanks to Ben Haine for uploading those videos :)
APC (Alternative PHP Cache) is an open source code PHP code cache and optimizer (or code accelerator). It is a necessary companion to any Symfony project. Read more…
I wanted a Symfony doctrine behavior / template to add a column that contains unique random string. I searched around but found nothing, so I developed these doctrine behavior / template for generating unique random string. Read more…
The following is a form formatter class I developed to automatically add stars * on required fields. Feel free to use it and let me know if it can be improved.
You might ask, why not just use setLabels?
Firstly, if you already set required fields to true/false in setValidators, why do you have to add the stars manually again in setLabels? It just doesn’t make sense!
Secondly, using setLabels to add stars is interfering with language translation.
Thirdly, this is I believe a proper (or proper-ish?) way to do this kind of things with sfForm.
I have not read a lot of articles on this but I did a quick Google search and found that all of the few articles I read seems to suggest redirect over forward. But I have a different opinion here, I would suggest that forward is better than redirect in most (if not all) cases. Read more…
Symfonynerds’ 2009 Symfony Developers Survey Results is out! If you are a Symfony Developer and have not completed this survey, you could still do that, click here.
Most developers went straight from Symfony 1.0 to 1.2 and skipped 1.1 Propel is the dominant ORM framework, which is interesting in light of the recent announcement that Doctrine will be the default ORM framework in Symfony 1.3 and moving forward. Ubuntu is by far the most popular platfrom Symfony developers choose to run their applications on The question with the most evenly spread results is “How long have you been developing Symfony applications for” (see question 6). Indicating the community has a wide range of experience with lots of people under one year experience and many over two years experience. Most Symfony developers have never developed in another web application framework jQuery is by far the most popular library used with Symfony Eclipse PDT is the most popular IDE for Symfony developers No surprises here: Most Symfony developers are from Europe (which saddens us Aussies – we need more Aussie Symfony developers!) There were no developers that took the survey indicated they run Symfony applications on Oracle and MSSQL. MySQL was the most popular database used by far.
In regards to location of Symfony developers, there are few of us here in New Zealand! Too bad the survey did not have option for New Zealand or South pacific. I can’t remember what I selected, could be Australia or Asia.
Recent Comments