Questions tagged [symfony-2.0]

This is the Symfony 2.0.x specific tag. Use it in addition to the symfony2 tag if your question is specific to Symfony 2.0.x — not just 2.x.

Symfony is a PHP full-stack web framework developed and maintained by Sensio Labs.

As of March 2013, 2.0 is deprecated in favor of the newer versions.

Information

This tag is specific for the 2.0 version of Symfony, which has been released on the 28 July 2011. See the tag for general Symfony 2.x questions.

Symfony 2.0 code is hosted and versioned on github.

As of 20 March 2013, the latest stable release of Symfony 2.0 is version 2.0.23.

Useful links

52 questions
25
votes
2 answers

JMSSerializerBundle. no control over third party meta data

I have two entities I wish to serialize with the JMSSerializerBundle. The Music Entity has a mapping-file with exclusion_policy: NONE. The Music entity has a field of the entity User from FOSUserBundle. The User entity has a mapping-file with…
tolgap
  • 9,629
  • 10
  • 51
  • 65
17
votes
5 answers

Disable CSRF token on login form

I am using Symfony2.0 and FOSUserBundle, and would like to disable the csrf token on my login form. I have disabled the csrf protection globally on my website in my config.yml: framework: csrf_protection: enabled: false This is…
fkoessler
  • 6,932
  • 11
  • 60
  • 92
15
votes
3 answers

How to disable profiler in Symfony2 in production?

How to disable profiler in Symfony2 in production? I do not mean the toolbar - I mean the profiler. I want to disable it in production, I use it extensively for development so the solution with removing its bundle is a no-go. I have tried setting…
pinkeen
  • 690
  • 3
  • 10
  • 21
12
votes
1 answer

Doctrine2 LEFT JOIN with 2 conditions

I'm trying to find a 'Product' by ID, and to left join all it's 'Photo' on two conditions: the locale AND the active state. Here's my QueryBuilder : $queryBuilder = $this->createQueryBuilder('p') ->select('p, photos, photoTranslation') …
Tiois
  • 1,519
  • 1
  • 15
  • 32
11
votes
1 answer

DoctrineMongoDBBundle getting a fatal error in Symfony2

I'm following the directions here: http://symfony.com/doc/2.0/bundles/DoctrineMongoDBBundle/index.html I have installed deps: #deps [doctrine-mongodb] git=http://github.com/doctrine/mongodb.git [doctrine-mongodb-odm] …
ed209
  • 11,075
  • 19
  • 66
  • 82
6
votes
1 answer

Symfony2 add reCaptcha field to registration form

I'm trying to add EWZRecaptcha to my registration form. My registration form builder looks something like this: public function buildForm(FormBuilder $builder, array $options) { $builder->add('username', 'text') ->add('password') …
tamir
  • 3,207
  • 2
  • 33
  • 51
6
votes
1 answer

Symfony2 bin/vendors

When i try to run the following command from my Symfony2 project root php bin/vendors install I get the following error: Could not open input file: bin/vendors I'm completely new to git and composer and I can't find a way to get this working I…
VuesomeDev
  • 4,095
  • 2
  • 34
  • 44
5
votes
1 answer

Updating symfony2 libs?

I have tested symfony and started with 2.0 now the new 2.0.1 version it out and I want to update. Is there an easy way to update the sources? In Zend it is basically replacing the Zend folder with new libs. Maybe I can use an script like php…
lony
  • 6,733
  • 11
  • 60
  • 92
4
votes
1 answer

Using composer.json in Symfony 2.0

I have a Symfony 2.0 project; however, I'd like to switch from deps to composer.json without going up to 2.1+. Has anyone done this, or is there anything that would prevent this from working?
jlb
  • 19,090
  • 8
  • 34
  • 65
4
votes
1 answer

Edit multiple Entity Objects in one form

I have table with this fields: id, ch1, ch2, .., ch15 and 62 lines (id = 1 upto 62, and other fields = 0 by default). I need to create single form, where i can edit (not insert nor delete) all ch1-ch15 fields in all lines. I've seen articles about…
Neka
  • 1,574
  • 4
  • 22
  • 36
3
votes
1 answer

Add phpexcel to my project

I need to generate Excel files, I did a search and phpexcel seems to be good and stable. I'd like to know: * how to integrate it into my project given that it's a symfony2.0 project * if I can do all what I do normally on excel file through this php…
smarber
  • 4,829
  • 7
  • 37
  • 78
3
votes
1 answer

symfony2.0.0 get locale in security.yml

I'm using symfony2.0.0. I don't have a chance to update symfony. This is my security.yml firewalls: main: logout: true pattern: .* http_basic: true anonymous: true form_login: …
Anton G
  • 129
  • 1
  • 12
3
votes
3 answers

Symfony2: How to deploy in subdirectory (Apache)

What is the best way to deploy symfony2 application in a subdirectory or an alias ? Lets say that my application will run under: http://domain/symfonytest symfonytest is an alias to some directory in my filesystem. Is there some CLI operation that I…
Sebastian Dusza
  • 2,470
  • 2
  • 30
  • 54
2
votes
2 answers

Symfony 2 form prototypes within prototypes - double $$name field

I need some help with prototypes that are within prototypes. Symfony is very clever with generating form prototypes, but once you are one layer down (i.e. prototypes within prototypes), it reuses $$name$$ for both prototypes. This is what a…
mogoman
  • 2,286
  • 24
  • 28
2
votes
1 answer

Migrate Symfoy 2.0.15 app to newest release, the right way

I have a project (developed by others) running on Symfony 2.0.15 and I need to upgrade it to newest Symfony2 version cause I need to add some new code and it's been hard to get it done. I can't find enough information for this, can any give me some…
ReynierPM
  • 17,594
  • 53
  • 193
  • 363
1
2 3 4