Questions tagged [symfony-2.1]

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

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

As of May 2013, 2.1 is deprecated in favor of the newer versions.

Information

This tag is specific for the 2.1 version of Symfony, which has been released on the 6 September 2012. See the tag for general Symfony 2.x questions.

Symfony 2.1 code is hosted and versioned on github.

As of 2 June 2013, the latest stable release of Symfony 2.1 is version 2.1.11.

Useful links

1094 questions
0
votes
2 answers

Where should I place an ImageManager class in Symfony2?

I have this MongoDB document: MyBundle/Document/Image. It represents an image, its path, width, and other attributes. Now I need to manipulate images, and I think that besides my image manipulation library of choice, I should have an app-specific…
ChocoDeveloper
  • 14,160
  • 26
  • 79
  • 117
0
votes
1 answer

Since I update my Symfony2 project. Each fields became "required"

I found a little solution to my problem. It's to put a 'required' => false, in the field of the formType. But before, it was working without that... so I ask. If there is a problem or it's normal? Yesterday, I upgrated my Sf2.1 project with…
user1574812
0
votes
1 answer

Scripted editing of Symfony 2 YAML file breaks the formatting and produces errors

I'm trying to script out our entire installation process of new Symfony 2.1 projects including adding and configuring all our bundles and their dependencies. The end result should be one command that sets up everything so the developer is both…
Roderik
  • 401
  • 1
  • 7
  • 14
0
votes
2 answers

Domain object design for dynamic organization staff

I have a base entity "Organization" that represents an organization (be it a business entity, a baseball team, or a podcast). It is quite generic. Each of these organizations can have multiple staff, and each staff can be of a different type. We…
0
votes
1 answer

Retrieve parent document with a doctrine2 or mongodb query

I am using Symfony 2.1 and Doctrine - MongoDBBundle. I have three documents. The first is a company, which I call "Institution". The second are contacts inside the institution, and the third are the talks the user had with the contact. Contact and…
Julien Fastré
  • 1,008
  • 13
  • 20
0
votes
1 answer

Remove password checking when using user registration form

I want to create user and generate password automatically. I am using custom form class for displaying first name, lastname and email fields. Username is created based on email and there is no issue with this. However i cannot skip password…
Luke Adamczewski
  • 395
  • 3
  • 14
0
votes
1 answer

JOIN error in Symfony 2.1 with two entities managers

I have a DB with a lot of data and I want to build a simple query in DQL with a JOIN, but I have a "has no association named" error. I have 2 tables in one DB, "main" and "users_main" and one table in the other DB " This is my…
Guille
  • 1
  • 2
0
votes
1 answer

Inheritance of symfony2 translations

I am using SonataUserBundle for extending user managing functionality. Also i use this bundle model file as base for registration form in frontend. On the another hand i want to add some other translations to FOSUserBundle.pl.yml - for example for…
Luke Adamczewski
  • 395
  • 3
  • 14
0
votes
2 answers

Symfony2 Doctrine2 : querybuilder bad query

New to Symfony2 and Doctrine2, i have a function in my entity repository to search entities after form submission. Input is array $get that contain form fields like $get['name'] = 'aname'. My problem is that when i request with an id, or an id and a…
qdelettre
  • 1,873
  • 5
  • 25
  • 36
0
votes
1 answer

form->bind($request) during ajax call outputs an array

I am posting a form with Ajax. I have a surprising response when binding a form within an Ajax call: public function newCartAjaxAction(Request $request) { $form = $this->container->get('new_cart_form.factory')->create(); $formHandler =…
Mick
  • 30,759
  • 16
  • 111
  • 130
0
votes
1 answer

Doctrine2 Base entity class association mapping

I have a Base entity and it's children, for example: news, discounts, gallery, etc.. What I would like to achieve is, that the Base class has an association map to the Image entity, so all it's children are automatically joined with the Image…
Matyas
  • 309
  • 1
  • 2
  • 7
0
votes
1 answer

Symfony 2 - Doctrine - oneToMany : delete from many

I have two entities : Episode and Version. When I tried to delete a version a get an exception: Notice: Undefined index: episode in /var/www/Mendrock/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php line 1561 I already…
manu
  • 208
  • 2
  • 15
0
votes
2 answers

How to setup Symfony-cmf with Sonata Admin on existing Symfony 2 project?

I have been trying to setup Sonata Admin with Symfony-CMF for my project, and i have some errors when i trying to add menu item. How to fix this? Error: The class 'Symfony\Cmf\Bundle\MenuBundle\Document\MenuItem' was not found in the chain…
waj0x
  • 51
  • 5
0
votes
2 answers

Adding and removing elements from doctrine mongodb ODM results - PHP

How do you remove and add elements to results returned by doctrine's odm. For example, I have the query $fruits = $dm->createQueryBuilder('Fruits') ->field('id')->in($fruit_list) ->getQuery()->execute(); $fruits returned…
Bhavya Agarwal
  • 107
  • 1
  • 11
0
votes
1 answer

How to protect APIs under two different firewalls on Symfony2

I'm currently developing a new set of Restfull APIs on Symfony2.1, and they are for the moment under no firewall in my security.yml api: pattern: ^/api security: false I have a RequestListener that "protect" them by checking if…
guillaumepotier
  • 7,369
  • 8
  • 45
  • 72