Это старая версия документа!


User / UserRepository

<?php
 
namespace App\Entity;
 
use ApiPlatform\Metadata\ApiResource;
use App\Repository\UserRepository;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface;
 
#[ORM\Entity(repositoryClass: UserRepository::class)]
#[ApiResource]
class User implements UserInterface, PasswordAuthenticatedUserInterface
{
}
<?php
 
namespace App\Repository;
 
class UserRepository extends ServiceEntityRepository implements PasswordUpgraderInterface
{
}

Symfony / API Platform