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
45
votes
2 answers

Symfony calls the PHP garbage collector on Ubuntu 14.04 even when session.gc_probability is set to 0

As the title state for some reason my Symfony 2.5 Application is calling the php garbage collector even when all of my php.ini files have: session.gc_probability = 0 Does anyone know how to prevent this from happening? Error message im…
Chase
  • 9,289
  • 5
  • 51
  • 77
14
votes
4 answers

How to dynamically control the validation of a form?

I've got some issues with Symfony's form validation handling. I'd like to validate a form bound to an entity based on its data. There are quite a bunch of information how to dynamically modify the form fields using FormEvents. What I'm missing on…
althaus
  • 2,009
  • 2
  • 25
  • 33
11
votes
1 answer

Doctrine 2 Native Query select from joined entity

NOTE: This is Native Query specific I have 2 related entites "CrmBusinessPartner" and "RefCountry" and "CrmBusinessPartnerRepository" repository. CrmBusinessPartner entity /** * CrmBusinessPartner * * @ORM\Table(name="crm_business_partner") *…
Diablo
  • 3,378
  • 1
  • 22
  • 28
9
votes
1 answer

Prevent simultaneous user sessions in Symfony2

The goal We are providing a client with a solution for a multiple-choice practice system where students pay for a monthly membership in order to test their knowledge and prepare for medical-related examinations. A major issue with providing this…
sjagr
  • 15,983
  • 5
  • 40
  • 67
8
votes
1 answer

Symfony 2.5.3 and PHP 5.6.0: incompatibility issues?

I don't know if this is a Symfony issue or a FOSUserBundle issue so I'll report here and hope get some help. I have two development instances: CentOS 6.5, PHP 5.5.16, MySQL 5.5.37 CentOS 7, PHP 5.6.0, MariaDB 5.5.37 I tried the same project in both…
ReynierPM
  • 17,594
  • 53
  • 193
  • 363
8
votes
3 answers

How to split validation yaml files in Symfony 2.5?

This code worked for Symfony 2.4.5 but it is not working for Symfony 2.5: This is my HRAPI Extension class that was working in Symfony 2.4.5 but not in Symfony 2.5
Caslav Sabani
  • 421
  • 6
  • 20
7
votes
1 answer

Symfony2.5 slow Initialization time compared to Symfony2.4

I just installed both Symfony2.4.4 and Symfony2.5.1 and set up a hello world page + some basic things I use (assetic js/css management etc). Configuration and setup for both projects are exactly the same. I noticed that in app_dev the Symfony2.5.1…
Jones03
  • 1,207
  • 2
  • 12
  • 30
5
votes
3 answers

Login with facebook or google using Oauth2 library in symfony2

I am using fosuserbundle for login and registration in my symfony 2.6 project. Now I want to allow user to login via facebook or google account. I want to use Oauth2 library of friendsofsymfony getting from here…
Maya Shah
  • 950
  • 7
  • 17
5
votes
1 answer

Symfony2 validator wants to be an instance of ValidatorInterface

I want to create a form in Symfony2, so I followed the tutorial on this site namespace Project\Foo\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Project\Foo\Entity\Anfrage; use…
Nitaco
  • 51
  • 3
5
votes
2 answers

Symfony 2 Transformer on entity form type

I'm trying to create a new form type in Symfony 2. It is based on entity type, it uses select2 on frontend and I need the user to be able to select existing entity or create the new one. My idea was to send entity's id and let it to be converted by…
Lukas Kral
  • 987
  • 13
  • 22
5
votes
1 answer

Symfony2 $user must be an instanceof UserInterface

I am having some trouble with login and authentication in Symfony2. The exception is "$user must be an instanceof UserInterface, an object implementing a __toString method, or a primitive string." Debugging my code I could notice that the user I am…
Víctor M
  • 307
  • 4
  • 16
5
votes
1 answer

You have requested a non-existent service "user_service"

Iam trying to implement service for encoding password but it seems it doesn't work cause I get "You have requested a non-existent service user_service " error. Here is my code : Vendor/BundleNameBundle/Resources/config/services.yml services: …
harisK92
  • 67
  • 1
  • 1
  • 6
4
votes
4 answers

Many dependencies in service

I have trouble with dependencies in my application in service layer. I have following class:
4
votes
2 answers

How to define a Symfony2 form (without entity) with at least 1 of 2 fields required?

I have a search form with 2 fields, not linked to an entity. Let's say it's built like this: $builder ->add('orderNumber', 'text', array('required' => false)) ->add('customerNumber', 'text', array('required' => false)) ; I want the…
Gregoire
  • 3,735
  • 3
  • 25
  • 37
4
votes
3 answers

Russian to English transliteration in symfony2

What are the native tools for string transliteration from Russian to English in Simfony2? UPD i need transliteration, not translation, example б => b, ю => yu привет => privet I need to convert any string of Russian language in the English alphabet
Stiig
  • 1,265
  • 13
  • 19
1
2 3
10 11