Author: akio

Symfony 3.4 : Cannot autowire service : argument of method "__construct()" has no type-hint, you should configure its value explicitly

I’m trying to define service using Symfony 3.4 DI but I got the following error : Cannot autowire service “AppBundleServiceSelectionWeb”: argument “$config” of method “__construct()” has no type-hint, you should configure its value explicitly. ..But I did configure its value….

Symfony 3 – Serve image within twig extension

I want to serve several images wich are not avaibles in public folder (web) using php for example path/to/myphp/script.php?image=imagereference&some=parameter To improve performances and not using this approach I made a twig extension to do that. <?php #src/MyBundle/Service/DisplayImage.php namespace MyBundleService; #https://symfony.com/blog/new-in-symfony-2-4-the-request-stack…