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
1
vote
1 answer

Locale in route prefix

I'm trying to prefix all routes within single controller with _locale but so far I haven't had any success: /** * @Route("/{_locale}/events", requirements={"_locale": "en"}) * @Route("/{_locale}/evenements", requirements={"_locale": "fr"}) …
Jovan Perovic
  • 19,846
  • 5
  • 44
  • 85
1
vote
1 answer

Creating database schema on the fly

I would like to create database for user when he register. The code for database creation looks like this $connectionFactory = $this->container->get('doctrine.dbal.connection_factory'); $connection = $connectionFactory->createConnection(array( …
debianek
  • 589
  • 1
  • 9
  • 30
1
vote
0 answers

symfony2 addValidator

I have read about how to validate the value of a field depending in the value of another one. But all of these are in symfony2.1 which use the function "isValid()". That is not my case because i am using "validate()" function. Here is my code…
user2288043
  • 241
  • 4
  • 15
1
vote
0 answers

Symfony 2.2 white/blank screen in prod (another one)

I updated a few files on my server, remove the cache-dir and had to recognize, that I receive a white page, after refreshing I was able to login and then got a blank screen. I tried this localhost and got the same. app_dev works well. Googleing…
Sammy
  • 1,178
  • 1
  • 14
  • 27
1
vote
1 answer

Which Symfony2 version do I use? 2.2 or 2.3?

I'm just starting out with Symfony2 and looking to create medium-sized site. I've been learning it over the last two months. I currently have 2.2 installed. The question is: should I create the site now with 2.2 or ditch that and go with 2.3, even…
user2143356
  • 5,467
  • 19
  • 51
  • 95
1
vote
1 answer

Symfony 2: Displaying tables?

I'd like to display some rows of data from a database table. I'm keen to get some advice on how to best achieve this. Let me explain how I do it now and why this question has been raised: I currently have a scheme whereby the controller loads data…
ritter
  • 555
  • 4
  • 13
1
vote
3 answers

How to redisplay a form with previous values when validation fails?

I have a form, which has to be passed by some other validations than unusual (about 4 fields are depending from each other). Thing is, when its failed, I redirect the user back, but then the form loses its values, I dont want it. I know it can be…
John Smitth
  • 121
  • 2
  • 12
1
vote
1 answer

how to Integrates the FOSUserBundle with the SonataAdminBundle in symfony2.2?

I try to Integrates the FOSUserBundle with the SonataAdminBundle in symfony2.2 by sonatauserbundle,but want i open this url http://dev.test.com/app_dev.php/register it says "No mapping found for field 'username' in class …
user1683012
  • 315
  • 1
  • 5
  • 14
1
vote
0 answers

Use case for the form type extension / access from encapsulated JavaScript to generated form IDs

I read the documentation for the form type extension on http://symfony.com/doc/current/cookbook/form/create_form_type_extension.html Form type extensions have 2 main use-cases: You want to add a generic feature to several types (such as adding a…
timaschew
  • 16,254
  • 6
  • 61
  • 78
1
vote
1 answer

How to map user_id field to other tables Symfony FOSUserBundle

How do I map user_id field from user table to other tables. I am using Symfony2 and FOSUserBundle. I have already tried by this way My Contacts Entity /* * @ORM\ManyToOne(targetEntity="User", inversedBy="contacts") *…
chirag7jain
  • 1,485
  • 3
  • 26
  • 43
1
vote
1 answer

Set form DateTime data2 to form data1 + 1 day

I had had a problem to set a Form Field DateTime (named endDate) to the Form Field DateTime (named startDate + 24h) if no data for endDate is typed into the form) The solution (thanks to the answers) was this: $em =…
ChrisS
  • 736
  • 2
  • 8
  • 21
1
vote
2 answers

Login redirect service handle error on constructor parameters

I followed this tutorial to set up a redirect to the last page after login: http://www.reecefowell.com/2011/10/26/redirecting-on-loginlogout-in-symfony2-using-loginhandlers/ My services.yml parameters: …
Ciro Vargas
  • 422
  • 1
  • 5
  • 16
1
vote
0 answers

Symfony2: locale & subdomain host pattern in routing

I seem to have a missunderstanding in some aspects of the locale and subdomain pattern in Symfony2 routing. Why doesn't this work? routing_de: host: "dev.de.example.com" resource: "@AcmeDemoBundle/Resources/config/routing_de.yml" …
ynot
  • 86
  • 1
  • 7
1
vote
1 answer

Error "The user provider must return a UserInterface object" with Symfony2 login

I am trying to modify existing demo login, which comes with symfony, from in_memory to db storage of users. I am still getting: [2013-03-27 19:24:34] security.INFO: Authentication request failed: The user provider must return a UserInterface object.…
martin
  • 15
  • 2
  • 8
1
vote
1 answer

Symfony2 SonataAdminBundle Google Chrome ERR_RESPONSE_HEADERS_TOO_BIG

Using Syfony 2.2 in dev environment, trying to display a list view of the SonataAdminBundle. I'm getting Error 325 / ERR_RESPONSE_HEADERS_TOO_BIG in Google Chrome. No problems in Safari and Firefox. This only happens in the dev environment and on…
virtualize
  • 2,287
  • 2
  • 25
  • 36