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 symfony2 tag for general Symfony 2.x questions.
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"})
…
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(
…
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…
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…
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…
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…
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…
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
…
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…
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")
*…
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 =…
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:
…
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"
…
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.…
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…