How to get current logged user in Symfony service

Inject 'security.token_storage' service as a dependency into your service. And get current user through the Token.

Inject Twig as a service in other service

In cases when you are going to render some html or other text content you have to get twig as a service. This issue have simple solution - just inject twig as a dependecy in your service.

How to fix non-autowiriable argument to service

Symfony service autowiring is awesome, but sometimes you must explicitly some dependencies. Such as, scalar value or environment variables. Symfony provides elegans solution for this issue.

Symfony GraphQL API. Part 1

Create you web application with CraphQL API. Fast and simple with Symfony framework.