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
3
votes
1 answer

Symfony child entity only being validated as Type, skipping it's own validation

I'm using the Symfony Validator on it's own, without the forms component. I have an entity which contains a child entity, currently I can validate that that field is an instance of the child entity, but I need it to also validate the child for it's…
greg
  • 6,853
  • 15
  • 58
  • 71
3
votes
1 answer

Adding a form error in an EventListener

I have a Symfony 2.2 based application with a form that has a field that is only required based on another field in the form. I bound an EventListener to catch when the form is submitted so I can verify if the 'required' field is actually not needed…
lifo
  • 2,791
  • 1
  • 25
  • 32
3
votes
1 answer

Parameters - Best practice for this service

After reading a lot about Symfony2 DIC and Semantic Configuration, I've asked myself: "So, now how do have I to procede for reach what I'm trying to reach!?" Scenario Imagine you want to create a service that is pretty like a "admin dashboard…
DonCallisto
  • 29,419
  • 9
  • 72
  • 100
3
votes
2 answers

JMSSerializer + forms/arrays

I'm rather newcomer into SF2 community, so please, take it easy ;) I've faced an issue with JMSSerializerBundle and forms/arrays. I've spent two days trying to figure it out myself, without any success and I've decided to post this to the Group. I'm…
user1854344
  • 321
  • 4
  • 14
2
votes
2 answers

Symfony - Inject and access DIC service in Doctrine EntityRepository

This is relevant to legacy project written in Symfony 2.2.1, doctrine 2.3.3. I need to access DIC @service in one of EntityRepository classes. Am i able to inject this service, or container into it via some event listeners or somehow else? I dont…
palmic
  • 1,846
  • 2
  • 20
  • 30
2
votes
2 answers

Symfony2 embedded forms + dynamic form update

I have a dropdown menu in my form and the form structure depends on its value. I have managed to solve the "form-update-issue" with event subscriber/listener class, where i am trying to update the main form according to dropdown's value. The main…
nothingam
  • 165
  • 1
  • 12
2
votes
1 answer

How can I validate Symfony2 filenames?

The following code will only validates the temporary filename (something like /tmp/phpsABCD) of an uploaded file use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\Validator\Constraints as Assert; /** *…
Xover
  • 588
  • 5
  • 10
2
votes
0 answers

Class is not a valid document or mapped super class

So I use my fork of CalendarBundle (http://github.com/permanaj/CalendarBundle), I install it, configure it, and extend it, because it usually the way to use a bundle. But when I try to run command it return error: …
Permana
  • 1,972
  • 2
  • 33
  • 51
2
votes
2 answers

call console command from controller and read the output in Symfony 2.2

i faced a problem when upgrade from 2.1 to 2.2 in my action controller i am calling a console command and get the output from the command like this. $input = new ArgvInput(array( 'object_id' => $object_id, …
user1112057
  • 180
  • 3
  • 11
2
votes
1 answer

Country list not displaying in sylius

Below is the configuration I use: apache 2.2.22 php 5.4.3 intl extension enable How do I show the countries in a drop-down list?
vitts
  • 127
  • 7
2
votes
2 answers

SonataAdminBundle show dashboard blocks depending on user

I'm using SonataAdminBundle with Symfony 2.2 and want to display the dashboard blocks depending on what user is logged in. e.g. Users with Group Superadmin will see blocks 'UserManagement' and 'Messages' Users with Group Staff will see only…
cb0
  • 8,415
  • 9
  • 52
  • 80
2
votes
1 answer

Resource Bundle 0.2* installation failed in sylius?

I want to install resource bundle in sylius i used below command using cmd composer require sylius/resource-bundle:0.2.* when i ran above command i get below error composer.json has been updated Loading composer repositories with package…
vitts
  • 127
  • 7
2
votes
2 answers

Separate DB connection for each forked child process using Doctrine

I have a Symfony 2.2 application that has a Command that forks children to process entities in the DB. I'm having a hard time figuring out the proper way to force Doctrine to reconnect in each forked child process. I finally got one solution working…
lifo
  • 2,791
  • 1
  • 25
  • 32
2
votes
1 answer

Use custom value on symfony2 choice form type using choice_list

I'm trying to use custom values in a choice form type which gets its data from a database query that needs post-processing. For this reason I opted to use the choice_list option and extending…
Michi
  • 2,480
  • 3
  • 28
  • 38
2
votes
1 answer

Embedded forms of inherited doctrine's entities

I'm building a form generator using Symfony 2.2 with Doctrine. The base principle is that the user create a new form by filling its name and selecting the widgets he'd likes to have in a select menu. We can think of WidgetInputText, WidgetSelect,…