Questions tagged [symfony-2.2]

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

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

Information

This tag is specific for the 2.2 version of Symfony, which has been released on the 1 March 2013. See the tag for general Symfony 2.x questions.

As of 19 June 2013, the latest stable release of Symfony 2.2 is version 2.2.3.

Living on the edge

There are a set of interesting links on the symfony blog about what's new in this version:

Useful links

190 questions
4
votes
1 answer

How to redirect without GET parameters using the routing?

My routing is defined like this : # New URLs article_show: pattern: /article/{id} defaults: { _controller: AcmeDemoBundle:Article:show } # Old URLs article_show_legacy: path: /article-{id}-{param}.html requirements: …
iamdto
  • 1,372
  • 11
  • 23
4
votes
1 answer

Service (uses service factory) to return objects of different types

I need to create a service, which uses another factory service, and return objects of different types. Here's a definitions of my services: services: games.search_factory: class: %games.search_factory.class% calls: - […
Vitalii Lebediev
  • 632
  • 2
  • 10
  • 19
4
votes
1 answer

URL gives Internal server error in production, but works in development?

I'm relatively new to symfony2 and doctrine2 and am puzzled by something... When accessing a certain page in the dev environment, I get the content of the page as expected, but when I try to open the exact same page using the prod environment, all I…
The Rookie
  • 307
  • 4
  • 11
4
votes
2 answers

symfony2 form is not displaying

I am learning symfony2 and i have created one form in controller which is as bellow. the controller file as DefaultController.php namespace Banner\TestBundle\Controller; use Banner\TestBundle\Entity\Contact; use…
Viraj.S
  • 305
  • 1
  • 8
  • 18
3
votes
2 answers

How to overwrite all symfony2 form types and add some property (in version 2.2)?

I want all form types to have width property, and to use it like this: public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('product_name', 'text', array('width' => "small")); } public function…
George V.
  • 43
  • 5
3
votes
1 answer

symfony2 unable to send email via gmail

I have been trying to send email using swiftmailer, however I am not able to do so, I am getting following exception request.CRITICAL: Uncaught PHP Exception Swift_TransportException: "Failed to authenticate on SMTP server with username…
Rahul
  • 2,189
  • 7
  • 40
  • 60
3
votes
0 answers

Column Order by causes undefined index

I have three Entities, which have a relation to each other: Entity 1: /** @ORM\OneToMany(targetEntity="ArticleOrderReference", mappedBy="purchaseOrder") */ protected $purchaseOrders; Entity 2: /** @ORM\ManyToOne(targetEntity="PurchaseOrder",…
ChrisS
  • 736
  • 2
  • 8
  • 21
3
votes
0 answers

'Bad credentials' error with a custom authentication provider in Symfony 2

I'm working on a web application with Symfony 2. More specifically, I'm trying to make a Custom Authentication Provider thanks to the instructions of the Symfony Cookbook. I have to make custom authentication provider because I must not check the…
Unda
  • 1,827
  • 3
  • 23
  • 35
3
votes
1 answer

Aggregate SUM with Doctrine2 and QueryBuilder

in my repository class I have this, but the query is not working. public function getResultsByName($page, $resultsCount, array $request_arr){ $qb = $this->createQueryBuilder('xx'); $qb->addSelect('SUM(xx.quantity) as total') …
jsf
  • 68
  • 3
  • 13
3
votes
1 answer

Authentication not working in functional test

I'm new to testing and I'm facing a major problem trying to write functional tests for the admin area (behind firewall). On my first iteration I used the way described in http://symfony.com/doc/2.2/cookbook/testing/http_authentication.html and it…
Michi
  • 2,480
  • 3
  • 28
  • 38
3
votes
2 answers

symfony 2.2 getChild deprecated

I'm trying to install a bundle for locations JulLocationBundle. And I came across some problems, which I managed to solve; then an error came up call undefined function getChild. Some research revealed that this is caused by deprecation of the…
Hussein Nazzal
  • 2,557
  • 18
  • 35
3
votes
2 answers

symfony2 form bindRequest returns 500 error

so i have a form type "PictureType":
Rachid O
  • 13,013
  • 15
  • 66
  • 92
3
votes
0 answers

Add Alfresco Php SDK library into Symfony 2.2 project

I know that there are similar topics on the website. But I couldn't find a solution for my problem. I'm searching to add a Alfresco Php SDK library to my symfony project. I'm using Symfony 2.2. I tried several methods of integration but no one…
ReiRoku
  • 31
  • 5
3
votes
5 answers

Invalid update of symlink static files with nginx

I have got a Symfony2.2.1 project which run with a nginx/1.2.6 (Ubuntu 13.04 VirtualBox). The render of assets are ok with hard link. With symlink, it works only on the first initialisation. When I update a symlink source, the browser render…
webda2l
  • 6,686
  • 2
  • 26
  • 28
3
votes
2 answers

How to use Repository custom functions in a FormType

The problem I'm facing is I have to create a selectbox in a form that holds all the parent entities (Category Entity). Now i managed to do this with: $builder->add('parent', 'entity', array( 'class' =>…
StrikoMirko
  • 415
  • 4
  • 17
1 2
3
12 13