feat : first commit

This commit is contained in:
2026-02-03 18:04:06 +01:00
parent 43b0364a5a
commit a5dcd5e3e9
101 changed files with 29976 additions and 96 deletions

View File

@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace App\State;
use ApiPlatform\Metadata\Operation;
use ApiPlatform\State\ProviderInterface;
use App\Entity\User;
use Symfony\Bundle\SecurityBundle\Security;
final class CurrentUserProvider implements ProviderInterface
{
public function __construct(private readonly Security $security) {}
public function provide(Operation $operation, array $uriVariables = [], array $context = []): ?User
{
$user = $this->security->getUser();
return $user instanceof User ? $user : null;
}
}