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

learn more… | top users | synonyms

0
votes
0answers
5 views

How can I dynamically validate form with collection depending on other field value?

Lets say I have Post document, it can be regular post with collection of paragraphs, or link-post with URL to original post. Post can be made as link, but later can be filled with original paragraphs ...
2
votes
2answers
25 views

No cache header with annotation

In order to set the response without the cache in the controller you can do this: $response = new Response(); $result = $this->renderView( 'AcmeDemoBundle:Default:index.html.twig', ...
2
votes
0answers
9 views

IntlDateFormatter::format(): datefmt_format: takes either an array or an integer timestamp value or a DateTime object (SonataSanBox)

I have installed SonataAdmin Bundle. All is working fine but, when I add any user from dashboard, it throws a warning: Warning: IntlDateFormatter::format(): datefmt_format: takes either an array or ...
1
vote
1answer
19 views

“Remember me” test fails when using custom user provider, user entity, etc

I have a custom user provider and user entity that I have used successfully in Symfony 2.2. But now I upgraded to 2.3, and I realized the "remember me" functionality is broken. So I created a new sf2 ...
3
votes
0answers
11 views

JMSI18nRoutingBundle Detect preferred language

Is there a way to detect the user's locale for the strategy "prefix_except_default"? eg default locale: en if I go on www.example.com and the user's locale is set to "fr" it redirects me to ...
0
votes
1answer
19 views

Symfony ESI break Varnish cache if cookies are enabled

I don't know what I am doing anymore. I had so many issue I don't where to start. Here is my configuration: varnishd (varnish-3.0.3 revision 9e6a70f) Server version: Apache/2.2.22 (Unix) Symfony ...
0
votes
2answers
19 views

Put underscore in class names of Symfony2 entity

I have actually finished a project using Symfony2, but my boss want that I change names of tables in the database. He wants to put underscore in the name of my tables, that means underscore in class ...
0
votes
0answers
19 views

How to create a test for the remember_me functionallity?

I can't seem to make the default remember_me functionallity work, so I want to write a test for debugging this faster. Any idea on how I can do this? It guess it should be something like login with ...
0
votes
1answer
32 views

Strange behavior route

I'm trying to get this setup but I'm having problems: use lunetics locale bundle. the user accesses the site www.example.com, the bundle takes the user's locale and displays the page with its local, ...
0
votes
1answer
32 views

Detect the user's locale automatically

My goal is to recognize the local user's browser and automatically set the language. Then allow the user to change language and keep it on other pages. At the time I set the routes in this way: # ...
0
votes
0answers
15 views

jenkins error after build successfull

I hae a problem with jenkins. It reports that the build of my symfony2 project ist successfull, but directly after that it crashes with ERROR: Publisher hudson.plugins.violations.ViolationsPublisher ...
0
votes
1answer
24 views

Symfony2 set default language when you run url

I'm trying to set the local automatically if none is specified in the url. What I want to to realize is: if the user enters the site www.example.com is automatically set to the English language. I ...
0
votes
3answers
56 views

Symfony2 - how to display content and secure access to it

I'm developing an application that displays books as interactive flash content with Symfony2. Each book has one index.html file that carries all those flash things embedded in html code and some ...
0
votes
1answer
22 views

Symfony2 multi-level dynamic router

I have a current project that has to displays both defined pages with specific entities, what is very easy to manage with Symfony2, and content pages on different layouts, what is - I guess - a bit ...
0
votes
1answer
23 views

Inheritance Mapping: use case

I find myself in a scenario: a soundtrack can have multiple instruments. Of that soundtrack there can be some versions with a different tone and versions without any instruments, or with a different ...
1
vote
1answer
24 views

Dynamic object validation with Symfony2

I'm looking for a way to validate an object without using the basic validation.yml file which is too static for me. I dynamically instance my objects with a factory, based on database values. That is ...
1
vote
0answers
36 views

Overriding doctrine entity manager at runtime

I'm trying to create a demo system in my Symfony2 project to allow creation of a temporary sqlite demo database for each 'demo' user that logs into a system I'm working on so that each user has access ...
0
votes
1answer
31 views

Text fields are not displayed

Im updating my app from symfony2 to symfony2.3 Im having troubles with form. In twig template, text fields are not displayed. Other fields are displayed normally(checkbox, choice, etc) This is my ...
0
votes
0answers
7 views

How can I pass entity ID into a FormType?

I have a custom FormType class in Symfony 2.3 and I want to get editing entity`s ID. But i can`t pass entity directly to options. I can edit only this class and no one more. In result a want to ...
1
vote
1answer
49 views

Uploading a file in Symfony2.3

I've been having a problem trying to upload a single file with Symfony2.3. When I try to upload the file I get the following error: FatalErrorException: Error: Call to a member function move() on a ...
0
votes
0answers
36 views

Sitewide http auth interfering with Symfony2 app authentication

I have a site under development with the following structure: public_html/ index.php symfony_app/ other_app/ Currently I have the root of the site behind Basic HTTP authentication ...
0
votes
1answer
24 views

Get Symfony2's kernel in config

how can I get the AppKernel obj in the php-version of the Symfony2 configuration? I need a parameter who's set in app.php/app_dev.php Thanks for helping!
0
votes
0answers
18 views

smarty bundle installation and assetic.use_controller

I'm using Symfony version 2.3.1 and SmartyBundle version 1.2.0. I followed the steps 2.3 and 2.4 at https://smartybundle.readthedocs.org/en/latest/installation.html. But as soon as I enable ...
0
votes
1answer
29 views

Change label in submitted form - finishView function?

How could i change the label of a form field after a submit of them? Example form class TestType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) ...
0
votes
1answer
19 views

Why CRUD generator Twig_Error_Loader fails me in symfony2.3?

I'm doing my own Crud Generate in Symfony 2.3. This is my code. namespace Gotakey\BackendBundle\Command; use Sensio\Bundle\GeneratorBundle\Generator\DoctrineCrudGenerator; use ...
0
votes
0answers
33 views

Symfony2 - New Field (Form Type) - Load/Display => Save

I have a problem with a new form type. use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormInterface; use ...
0
votes
1answer
22 views

Twig : Access to variable from outer scope in a form widget customization

I'm trying to customize a specific widget, like in the documentation : http://symfony.com/doc/current/cookbook/form/form_customization.html#how-to-customize-an-individual-field The problem is that in ...
0
votes
2answers
16 views

How to change form field value in symfony 2

I have a form like below: class ItemType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder ... ...
0
votes
1answer
46 views

Losing authenticated token in symfony

I have a problem with authenticating in symfony. Login_check authenticates user in database but after redirection to /dashboard which should be for authenticated user only, it seems that symfony is ...
0
votes
1answer
21 views

Data transformer and length checking

I have this code below to transform a phone number with spaces between 555 555 555 to 555555555. Besides, I want to check if the number has 9 digits. $form = $builder ->add('Nombre', 'text') ...
1
vote
1answer
63 views

display latest tweet using api 1.1 in twig and symfony2

I am trying to use Twitter API 1.1 with symfony2 and twig. So far I have succeed to pass all tweets as an array to the template but I am unable to get the latest tweet ONLY. Everything works ok ...
0
votes
1answer
59 views

Symfony2.3 - How to add a custom vendor

I have a Symfony 2.3 project and I would like to use a custom vendor. I know that on Symfony versions 2.1 and 2.2, you can declare vendors in the deps file. But how can I declare a custom vendor in ...
0
votes
1answer
18 views

Full-text searching in Symfony 2 and Propel 1.6

How can i use full-text filters in symfony 2 using Propel 1.6 (propel bundle 1.2)? It's mentioned on the propel bundle readme, but didn't find any example of how to use it.
0
votes
1answer
65 views

Enable Debug Component in Symfony 2.3

Before opening a ticket in the symfony repository, I just wanted to check if I have missed something obvious. I want to enable the debug component (for having these nice exception screens, etc..). I ...
0
votes
1answer
30 views

How does the login check_path route work without default controller/action?

I am working on symfony 2.3 project having the following routing code just2_frontend_logincheck: pattern: /login_check It doesn't have defaults:{ _controller: testBundle:User:login } But ...
0
votes
1answer
47 views

Processing Query Strings?

Built an API using Symfony2, FOSRest and Doctrine. Given the following route: "GET /api/path/to/product" And the following parameters: [("vendorID", 10), ("destination", "tanzania"), ("type", ...
0
votes
1answer
26 views

How can i add more locales to Symfony/Icu 1.0.x?

Symfony2 Form localization now depends on Symfony/Intl and Symfony/Icu components. If the server you run you application has ICU lib version lower than 4.0 you must use the Symfony/Icu 1.0.x component ...
0
votes
3answers
83 views

symfony 2 number and date format

I am developing a multi country multi language application and one of the issues I have are the decimal point separator and the date format. I am aware of the setLocale method, but the only changes I ...
0
votes
0answers
34 views

Symfony2 Validation Group same error for one field is displayed 12 times

When using a validation group for a specific attribute the error when the validation fails is shown twelve times. Any idea why this happens? In Opportunity.php ... /** * * ...
0
votes
0answers
17 views

Update related entity of detached entity (current user)

i have some misunderstanding of symfony 2.3 behavior. In Symfony 2.3 current user object is detached entity, but it not serialized to session and doctrine perfom query to DB each request to get it. ...
0
votes
1answer
46 views

Symfony2 - Call EmailValidator inside a Custom Validator

I'm creating a custom validator constraint to validate a "Contact", which is something like "John Doe <[email protected]>". Following the Cookbook I've created the Constraint Class: <?php ...
0
votes
0answers
29 views

Where should I locate the independent php file in symfony2.3 which is being used in my contoller?

I am new to symfony 2.3 I have a problem in running an independent php file from my controller. I want to run that file from shell_exec() and to use it's output in my code. But i dont know the right ...
0
votes
0answers
36 views

NelmioApiDocBundle uses FormType parser despite having JMSSerializer Metatags

I am trying to auto generate API documentation using the output parameter pointing to an entity. I have JMSSerializer metadata specified in the entity. However, when I access the API doc, I get the ...
0
votes
0answers
52 views

Knp Paginator doesn't works with Query

I am settting up knp paginator, my composer is set to "knplabs/knp-paginator-bundle": "2.3.*" however It is not working for Query object. Here is my query: public function getCommentariesByUser(User ...
0
votes
0answers
21 views

multiple firewalls and providers in symfony2

I'm working on simple app which handles authentication for two kind of users, User and Admin entities. I want to have two separate firewalls and providers for that so my security.yml file looks like ...
0
votes
1answer
43 views

Symfony2 $request->query->get() returning null value

I'm new to Symfony2.I am understanding the framework. I try to access the get parameters of my request using Symfony2. But it is returning null when I access them like $name = ...
0
votes
0answers
36 views

symfony 2.3 doctrine data type json_array missing

After updating from symfony 2.2 to symfony 2.3 running schema update results in: [Doctrine\DBAL\DBALException] Unknown column type json_array requested. Also when creating a new ...
0
votes
0answers
18 views

Creating custom firewall in Symfony 2.3

Creating custom firewall using WSSE is fine. But now I want to create custom firewall which doesn't contain methods like authenticate(TokenInterface $token) but contain custom methods which contain ...
0
votes
0answers
22 views

Automapping entities when using FriendsOfSymfony / FOSElasticaBundle implementing Elastic Search

Using FriendsOfSymfony / FOSElasticaBundle with Symfony 2, I need to know if there is anyway i can automap all of the entities with indexing. Or manual entries is only way i can map entities for ...
0
votes
0answers
39 views

How to set locale automatically and manually from user interface in symfony2.3

My objective was to set the locale for my website automatically. This is done successefully by creating a LocaleListener class as you can see below (+ a configuration of services.xml file). My ...

1 2