Top "Symfony-2.8" questions

This is the Symfony 2.8.x specific tag.

How to get the root dir of the Symfony2 application?

What is the best way to get the root app directory from inside the controller? Is it possible to get …

php symfony symfony-2.8 symfony-config-component
How to get the current logged User in a service

In Symfony 2.8/3.0, with our fancy new security components, how do I get the currently logged User (i.e. FOSUser) object …

symfony symfony-2.8
Symfony 2 - fetch the last inserted row from table

How can I rewrite this code in order to get last inserted record from the table? $repository = $entityManager->getRepository(…

php symfony symfony-2.8
Symfony 2.7 / 3 - Doctrine: You have requested a non-existent service "fos_user.doctrine_registry"

Doing a composer update today suddenly getting the following error: [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException] You have requested a non-existent …

doctrine fosuserbundle symfony symfony-2.7 symfony-2.8
Symfony Update 2.8 to 3.4

I wanted to upgrade my old Symfony project from 2.8 to 4.0 but I stacked at upgrade from 2.8 to 3.4. I used this …

php symfony upgrade symfony-2.8 symfony-3.4
Symfony 2.8 dynamic ChoiceType options

in my project I have some forms with choice types with a lot of options. So I decided to build …

symfony symfony-2.8
PHP Fatal PHP Fatal error: __clone method called on non-object

So, I am working on a project and I am having an issue as I keep getting both errors and …

php symfony symfony-2.8
How to customize form field based on user roles in Symfony2/3?

Is there a correct way to customize a form depending on the role of the user that requests it? My …

symfony formbuilder symfony-2.8