Open
Description
Hello. I have a problem with two diffents copy of em
<?php
namespace App\Listener;
use Doctrine\ORM\EntityManagerInterface;
class FirstListener
{
public function __construct(EntityManagerInterface $entityManager)
{
dump('create FirstListener');
dump($entityManager);
}
}
<?php
namespace App\Controller;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\Response;
class LuckyController
{
public function number(EntityManagerInterface $entityManager)
{
dump('number action invoke');
dump($entityManager);
return new Response(
'<html><body>hello</body></html>'
);
}
}
service.yaml:
App\Listener\FirstListener:
tags:
- { name: doctrine.orm.entity_listener }
why ?
for investigation I use:
composer create-project symfony/skeleton blog