|
|
@ -2,27 +2,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
namespace App\Controller;
|
|
|
|
namespace App\Controller;
|
|
|
|
|
|
|
|
|
|
|
|
use App\Composant\User\Infrastructure\DoctrineUser;
|
|
|
|
use App\Composant\User\Infrastructure\UserDatabaseAdapter;
|
|
|
|
use Doctrine\Persistence\ManagerRegistry;
|
|
|
|
use Doctrine\Persistence\ManagerRegistry;
|
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
|
|
|
|
use Symfony\Component\Routing\Annotation\Route;
|
|
|
|
use function dd;
|
|
|
|
use function dd;
|
|
|
|
|
|
|
|
|
|
|
|
class test extends AbstractController
|
|
|
|
class TestController extends AbstractController
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[Route('/foo', name: 'contact')]
|
|
|
|
#[Route('/foo')]
|
|
|
|
public function index(ManagerRegistry $registry): Response
|
|
|
|
public function index(ManagerRegistry $registry): Response
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$DoctrineUser = new DoctrineUser($registry);
|
|
|
|
$DoctrineUser = new UserDatabaseAdapter($registry);
|
|
|
|
$User = $DoctrineUser->findById(1);
|
|
|
|
$user = $DoctrineUser->findById(1);
|
|
|
|
dd($User);
|
|
|
|
|
|
|
|
return new Response(
|
|
|
|
return new Response(
|
|
|
|
"",
|
|
|
|
$user->getId(). " " .$user->getLastname(),
|
|
|
|
Response::HTTP_OK,
|
|
|
|
Response::HTTP_OK,
|
|
|
|
['content-type' => 'text/html']
|
|
|
|
['content-type' => 'text/html']
|
|
|
|
);
|
|
|
|
);
|