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
0 answers

Choice list field is not showing in getData function. how to get it?

I don't know what causing problem. I have a form with two field call name and category. ->add('name', 'text') ->add('category','choice', array( 'choices' => $options['categories'] )) this categroy is a choice list. So here i…
Code
  • 1,574
  • 2
  • 23
  • 37
0
votes
1 answer

Exception: DateTime::__construct(): Failed to parse time string (17/06/2014) at position 0 (1): Unexpected character +

Plz take my issue - An exception has been thrown during the rendering of a template ("DateTime::__construct(): Failed to parse time string (17/06/2014) at position 0 (1): Unexpected character") in …
Jecintha
  • 15
  • 1
  • 1
  • 5
0
votes
1 answer

FatalErrorException: Call to a member function getFirstName() on null

Please help me in C:\xampp\htdocs\project_sms\src\Com\AkSolutions\Sms\UserBundle\Form\Type\UserSendMessageType.php at line 55 $form =…
Jecintha
  • 15
  • 1
  • 1
  • 5
0
votes
0 answers

Manually authenticate a user in symfony2

i need to manually authenticate a user, it works but i have a problem.I got 2 firewalls, and when i login in one firewall, symfony consider i'm logged in the other firewall too. Here are my firewalls: firewalls: admin: pattern:…
0
votes
0 answers

symfony2 ajax simple request

Im learning programming with Symfony2 and I have some problems with AJAX request, but I dont know which are the errors. I try refresh 2 combobox Combobox1 has one list of name of some courses Combobox2 has to refresh according to ComboBox1 id…
0
votes
1 answer

symfony2: page always redirected to login page eventhough I logged-in

This is my security.yml file login: pattern: ^/login anonymous: ~ security: true main: pattern: ^/ anonymous: ~ security: true form_login: login_path: login …
Suba
  • 69
  • 1
  • 11
0
votes
3 answers

Using opcache on PHP 5.6 with Symfony 2.5.*

We would like to 'migrate' our project to use opcache, instead of apc. How can we do this? On our VPS, we have php 5.6 installed with opcache.enable => On, however, our assets won't load and Doctrine shows several errors in the logfile. (Because…
Ruben
  • 796
  • 3
  • 9
  • 21
0
votes
1 answer

Symfony2: How to protect uploaded media?

I have uploaded files located at /web/uploads and I need give access only to specific users. My users are not in security context (I know that is bad solution). I think I must move files away from /web folder (like /uploads) and create controller…
Oleksandr Savchenko
  • 642
  • 3
  • 10
  • 35
0
votes
1 answer

Doctrine EntityManager not injected into Custom Validator

I have created a custom validator to check if an email is not present across 2 database tables. namespace AgriHealth\AhpBundle\Validator\Constraints; use Symfony\Component\Validator\Constraint; /** * @Annotation */ class UniqueEmailAll extends…
jdog
  • 2,465
  • 6
  • 40
  • 74
0
votes
2 answers

Count login attempts

I am looking for a bundle or a way on how to count login attempts of a user- (Im using FosUserBundle) I was trying CCDN SecurityBundle, but it is already deprecated (Symfony 2.4 required). Are there other stable bundles or ways to handle my problem…
nova.cp
  • 455
  • 1
  • 9
  • 22
0
votes
1 answer

"Undefined class Security" in Symfony2

I have created a simple login system with Symfony2. I have followed the instruction given in -- http://symfony.com/doc/current/book/security.html#using-a-traditional-login-form I have created everything told in the tutorial. This is my error, I am…
Shahjalal
  • 1,163
  • 7
  • 21
  • 38
0
votes
1 answer

Umlauts not beeing displayed properly in symfony2

Im having the following problem. If I try to use this code $form = $this->createFormBuilder() ->add('code', 'integer', array( 'attr' => array('class' => 'login-input') )) ->add('einlösen', 'submit', array( …
Chaos
  • 385
  • 1
  • 4
  • 11
0
votes
1 answer

How can I set the newline separator for Doctrine-generated code?

I am working on a Symfony 2 project which uses Doctrine. Development is mainly happening on Windows which is why all files have \r\n as newline separator. However, when adding new properties to my entity classes and then running app/console…
Chris
  • 6,914
  • 5
  • 54
  • 80
0
votes
1 answer

Symfony DI injects an empty array instead of entity manager object

I am trying to inject an entity manager object intro my validation class however Symfony DI injects a empty array(tested with var_dump). I can't understand why this is not working. Here goes some of my code. app/config.yml services: …
dextervip
  • 4,999
  • 16
  • 65
  • 93
0
votes
1 answer

Compare Value to String IF/FOR Statement

I'm currently trying to compare the value of each saved Entity and organize the results into certain sections. I can't for the life of me find how to compare a variable to a string using twig. Everything I've tried error's except for the following…
Doug
  • 1,850
  • 23
  • 50