Questions tagged [symfony-2.3]

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.

Symfony is a PHP full-stack web framework developed and maintained by Sensio Labs.

Information

This tag is specific for the 2.3 version of Symfony, which was released on the 3 June 2013 as the first LTS version of Symfony. See the tag for general Symfony 2.x questions.

As of 11 June 2013, the latest stable release of Symfony 2.3 is version 2.3.1.

Living on the edge

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

Useful links

771 questions
3
votes
1 answer

Type hinting json object in Symfony

In my Symfony 2.3 project, I have a curl function that receives JSON data from an API and passes this data as a parameter to another function. Currently, the function that accepts the JSON object looks like this: public function…
yvoloshin
  • 378
  • 6
  • 18
3
votes
2 answers

Is anyone aware of two-factor authentication APIs for Symfony 3 built applications?

Is anyone aware of implementation two-factor authentication for Symfony 3? I looked at some soft tokens from Google-Authenticators or Authy, hard tokens Yubico or sms verifications but struggling to find answer if those are compatible with Symfony…
3
votes
2 answers

How to secure Data IonicV1 services

Hi I have implemented an app in Ionic v1 with Symfony2 as server side. the communication between app and server is being made by post ajax request. I want to make secure the request services data in network which is posted from app to…
Sunil Rawat
  • 709
  • 10
  • 41
3
votes
0 answers

Controller syntax in PHP symfony

The demo application I downloaded from php symfony site, has following syntax for controller: _controller: Symfony\Bundle\FrameworkBundle\Controller\Template::hello and _controller:…
user1578026
3
votes
2 answers

Doctrine/Symfony "translates" empty string into a NULL

So there is a form, and non-required fields, like say "first_name". When I leave this field empty, I got an error that "Column 'first_name' cannot be null", because indeed it can't. But why does Doctrine converts empty string to NULL? But I have to…
konrad_firm
  • 859
  • 1
  • 11
  • 28
3
votes
1 answer

Making entire form readonly in Symfony

Is this possible to make the whole form readonly with only one (or two) lines of code, as it is in PEAR/QuickForm? I have the following code: $form = $this->createFormBuilder($user) ->add('username',…
konrad_firm
  • 859
  • 1
  • 11
  • 28
3
votes
2 answers

Access to debug (profiler) information before redirection in Symfony

After submitting a form I usually redirect a user to another page (other than the form itself). Therefore I lose the Profile (debug information, like log). I mean after clicking the Debug Toolbar I get information about the request after…
konrad_firm
  • 859
  • 1
  • 11
  • 28
3
votes
0 answers

How to disable SonataAdminBundle translations

I'm using Symfony 2.3 (LTS). I've developed a multi-locales website keeping in session the locale selected by the user ( the special parameter _locale ) This is the same parameter used by SonataAdminBundle to translate its labels, call-to-actions…
3
votes
1 answer

symfony2.3, persist related entity with foregin key

i'm looking for nice way to persist 2 objects to db via doctrine in symfony 2.3 class CatController extends Controller { /** * Creates a new Cat entity. * */ public function createAction(Request $request) { $entity = new Cat(); $form =…
Viszman
  • 1,378
  • 1
  • 17
  • 47
3
votes
0 answers

FOSUserBundle with multiple database

I have one system. In that one entity with clients. From this system I want to sent authentication to that clients for another website/system and dump/insert this client as fos_user in that system. In Both system i have used FOSUserBundle for user…
herr
  • 837
  • 1
  • 8
  • 21
3
votes
1 answer

Update session in symfony2 for shoppingg cart

I have the following code : public function addAction(Request $request){ //Get submited data // Get Value from session $sessionVal = $this->get('session')->get('aBasket'); // Append value to retrieved array. $aBasket =…
TanGio
  • 766
  • 2
  • 12
  • 34
3
votes
1 answer

How to change message for validation constraint in Symfony globally?

Is there a way to change the basic validation error message to one I need for all entities at once? Currently using Yaml config for every entity, but it's not a way. CF\MyBundle\Entity\User: properties: email: - Email: message:…
Vit Kos
  • 5,535
  • 5
  • 44
  • 58
3
votes
1 answer

Verify if user is authenticated in symfony2

I tried to create a simple login application in symfony2 and I don't understand a thing. My routing file : shop_show_login_page: path: /login defaults: { _controller: ShopDesktopBundle:User:loginPage } shop_login_user: path: /loginUser defaults: {…
TanGio
  • 766
  • 2
  • 12
  • 34
3
votes
1 answer

Have a FormType data_class with a DI constructor (Symfony 2.3)

here is my class working with Symfony DI : class Car { protected $wheel; public function __construct(Wheel $wheel) // We inject the service { $this->wheel = $wheel; } } I want it to work as data_class for a Sf2 FormType…
grena
  • 1,011
  • 1
  • 10
  • 25
3
votes
2 answers

Symfony2 UrlGenerator in tests

I'm trying to achieve generated routes in my functional tests. I want them to be generated dynamically,preferably by name, but I cannot find a proper way how to do it. Point me please. A simple test: public function testIndex() { // I…
Vit Kos
  • 5,535
  • 5
  • 44
  • 58