Skip to content

Tag: symfony

Groups Annotations don’t works

Symfony 3.1.7 + FOSRestBundle latest version Then in my Article entity I added this annotation @Groups({“article”}) with the right use statement. Whit default serializer I get : Whit JMS serializer (bundle) I get : (I have two articles in db) it seems like the “article” group is not re…

range Symfony form input

I’m looking for something to make this kind of input in Symfony: I don’t know which kind of input and how to deal with the Symfony controller. Here is a part of my controller but not sure it’s useful. Answer If you want to represent a start date linked to an end date, I’d advise you to…

Allow any option passed to Symfony CLI

The goal is to allow any options to be passed to symfony CLI, rather than limiting to a defined set of allowed options. For instance: In this example, foo is an option which is not explicitly allowed by the symfony application. My console app is proxying to a different application with a number of CLI options…

logged user does not have all fields filled up

I’m using Symfony 2.8 and Doctrine and I have security.yml configured to point to the User class which implements UserInterface. My ORM schema is in YAML. The problem: In database the user has also specified “email” field, Symfony for LOGGED USER is not filling up that field and also “…

Multiple commands in Symfony Process Component

I’m trying to execute multiple commands using Symfony Process Component but second command is not being processed. What am I doing wrong? Answer Process are isolated, the second will not be executed inside the ssh session you open at the top of your code. You must use only one process todo that.