Top "Symfony" questions

Symfony refers to both a PHP framework for building web applications as well as a set of components on which the framework is built.

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

I have php7.3 and symfony2.8 When I try to create the classes with the console I get this error: [Symfony\…

php symfony
How to check if an user is logged in Symfony2 inside a controller?

I read here how to check the login status of an user by inside a twig template for a Symfony2…

symfony login symfony-security
Accessing session from TWIG template

I've searched a lot on the net how to access the global $_SESSION array from TWIG template and found this: {{…

php session symfony twig
Symfony2 and date_default_timezone_get() - It is not safe to rely on the system's timezone settings

I have a Symfony2 project. I updated my php to 5.5.7 today and since then, I am getting the Warning: date_…

php symfony timezone
How to select distinct query using symfony2 doctrine query builder?

I have this symfony code where it retrieves all the categories related to a blog section on my project: $category = $…

php doctrine-orm symfony query-builder
How to encode Doctrine entities to JSON in Symfony 2.0 AJAX application?

I'm developing game app and using Symfony 2.0. I have many AJAX requests to the backend. And more responses is converting …

ajax doctrine doctrine-orm symfony
symfony 2 twig limit the length of the text and put three dots

How can I limit the length of the text, e.g., 50, and put three dots in the display? {% if myentity.…

symfony twig
Symfony 2 EntityManager injection in service

I've created my own service and I need to inject doctrine EntityManager, but I don't see that __construct() is called …

php symfony dependency-injection
The CSRF token is invalid. Please try to resubmit the form

I'm getting this error message every time I try to submit the form: The CSRF token is invalid. Please try …

php symfony twig
How to include CSS file in Symfony 2 and Twig?

I'm playing around with Symfony2, and I have problems including CSS and JS files in Twig template. I have a …

symfony twig