Questions tagged [symfony-2.5]

This is the Symfony 2.5.x specific tag. Use it in addition to the symfony2 tag if your question is specific to Symfony 2.5.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.5 version of Symfony, which was released on the 1st June 2014. See the tag for general Symfony 2.x questions.

As of 1 June 2014, the latest stable release of Symfony 2.5 is version 2.5.0.

Living on the edge

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

Useful links

152 questions
0
votes
1 answer

symfony 2.5 form validation error

I have a form type A with some widgets and mapped to class C1. I need a new widget in this form which is not mapped to this class( i.e mapped to another class C2). So i have created a new form type B. This new form type B is included in form type…
0
votes
1 answer

custom formtype wraps ArrayCollection in ArrayCollection

I have a ManyToMany Relation (AdditionalCostTemplate>Accommodation) and i have a custom formtype extending EntityType to fill the Accommodations in my AdditionalCostTemplate. If i use the default symfony2 EntityType Formtype, it all works well. If i…
Andresch Serj
  • 35,217
  • 15
  • 59
  • 101
0
votes
3 answers

Twig is unable create cache directory

This is the error RuntimeException: Unable to create the cache directory (1/25/20). 1- Changing the cache directory in the appKernel file didn't fix the problem /* public function getCacheDir() { return…
user3531149
  • 1,519
  • 3
  • 30
  • 48
0
votes
2 answers

symfony multilanguage templates

I have the following structure for the css files Public - css -- fr --- style.css -- en --- style.css the css folder include fr and en folders and I'm including CSS stylesheets in my template like so: {% stylesheets…
ghaidaa84
  • 3
  • 1
0
votes
1 answer

Integration of HWIOAuthBundle with FosUserbundle configuration issue

I have followed this article and implemented OAuth2 with Github, After successful authentication, I am getting below error. Unable to find the controller for path "/secure_area/login/check-github". Maybe you forgot to add the matching route in…
amit
  • 63
  • 8
0
votes
1 answer

creating multiple onetoMany relations in Sumfony 2.5

I am really new to Symfony so I apologize in advanced if this sounds stupid and I will really appreciate if anyone to correct my understanding. I am reading about Databases and Doctrine and while reading I thought why not create a dummy blog app to…
Shairyar
  • 3,268
  • 7
  • 46
  • 86
0
votes
1 answer

Invalid message not assoiciated to field

I am in need to displaying an error when two passwords fields are mismatching. I am trying to achieve this through setting invalid_message in my repeated password field, But when I try to call the error as {{form_errors(form.password)}} the error…
Hasitha Shan
  • 2,900
  • 6
  • 42
  • 83
0
votes
2 answers

naming a file after submitting a form in Symfony

I am working on a form which accepts some user input and an image file, the submission part and the data getting entered into the database is working fine but I am stuck at how to name a file once it is uploaded, right now this is what i see as an…
Shairyar
  • 3,268
  • 7
  • 46
  • 86
0
votes
2 answers

Symfony2 Embed form on multiple entities

I have 3 entities User class User extends BaseUser { /** * @ORM\OneToMany(targetEntity="UserPathologie", mappedBy="user") */ protected $userPathologies; } Pathologie class Pathologie { /** * @var string * *…
Mario Radomanana
  • 1,698
  • 1
  • 21
  • 31
0
votes
0 answers

From validation: Check if related entity exists in database for given foreign key (id) value

I have a Book entity with Author relationship: /** * Book * * @ORM\Table() * @ORM\Entity(repositoryClass="App\BookBundle\Entity\BookRepository") */ class Book { /** * @var integer * * @ORM\Column(name="author_id",…
Jakub Matczak
  • 15,341
  • 5
  • 46
  • 64
0
votes
1 answer

Symfony mapping compiler pass

I'm using Symfony 2.5 freshly installed from the top of this page: http://symfony.com/download I'm trying to register a mapping compiler pass following the instructions on this page:…
bob dope
  • 479
  • 1
  • 6
  • 16
0
votes
1 answer

Form validation in Symfony 2.5

I am trying to validate fields on a contact form, the form it self is working fine and is posting the data, however I am stuck at getting the fields validated. According to this documentation it seems pretty straight forward to setup validation but…
Shairyar
  • 3,268
  • 7
  • 46
  • 86
0
votes
1 answer

Cannot get Symfony to work?

This is my first time using Symfony framework. I have installed the framework using Composer. It has installed properly. It didn't give me any errors or even a warning. Then I generated a bundle. Then I ran the server using php app/console…
odbhut.shei.chhele
  • 5,834
  • 16
  • 69
  • 109
0
votes
1 answer

Form edition for a N:M relationship with extra fields is not working

I'm working on a form that handle N:M relationship with an extra parameter (extra field/column). This is what I've done until now: In OrdersType.php form: class OrdersType extends AbstractType { public function buildForm(FormBuilderInterface…
ReynierPM
  • 17,594
  • 53
  • 193
  • 363
0
votes
1 answer

How to set the last assigned value when it is in an intermediate table

I have a form with this field: class OrdersType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { // Others form fields if ($options['curr_action'] !== NULL) { …
ReynierPM
  • 17,594
  • 53
  • 193
  • 363