After updating I have this deprecation:
Since symfony/dependency-injection 5.1: The "Symfony\Component\DependencyInjection\ContainerInterface" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it. It is being referenced by the "App\Service\ImportService" service.
Here is my ImportService:
<?php
namespace App\Service;
use Symfony\Component\DependencyInjection\ContainerInterface;
class ImportService
{
private $doctrine;
private $em;
public function __construct(ContainerInterface $container)
{
$this->doctrine = $container->get('doctrine'); //needed for database queries
$this->em = $this->doctrine->getManager(); //needed for database queries
}
/** more methods here **/
}
So how exactly do I make it explicit? I googled a bit and I think that I have to add it to my services.yml file somehow. But I am unsure how + do I have to do it for every Service class?