From php
Génère une entité Doctrine avec repository selon principes Elegant Objects
How this skill is triggered — by the user, by Claude, or both
Slash command
/php:make-entitysonnetThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Génère une entité Doctrine complète avec son repository selon les principes Elegant Objects.
Génère une entité Doctrine complète avec son repository selon les principes Elegant Objects.
src/Entity/{EntityName}.phpsrc/Repository/{EntityName}Repository.phpsrc/Repository/{EntityName}RepositoryInterface.phpIMPORTANT : Exécute ce workflow étape par étape :
Question: "Quel est le nom de l'entité à créer ?"
Header: "Entité"
Question: "Quelles sont les propriétés de l'entité ? Format: name:type,email:string,age:int"
Header: "Propriétés"
ls src/Contracts/ avec Bash⚠️ Contracts manquants - Génération automatiquephp:make-contractscomposer.json avec Readautoload.psr-4App par défautsrc/Entity/{EntityName}.php avec Writenamespace {namespace}\Entity;
use Doctrine\ORM\Mapping as ORM;
use {namespace}\Repository\{EntityName}Repository;
#[ORM\Entity(repositoryClass: {EntityName}Repository::class)]
final class {EntityName}
{
#[ORM\Id]
#[ORM\Column(type: 'uuid', unique: true)]
private string $id;
// Propriétés générées depuis la liste
private function __construct() {}
public static function create({params}): self
{
$self = new self();
$self->id = Uuid::v7();
// Affectations des propriétés
return $self;
}
// Getters pour chaque propriété
}
src/Repository/{EntityName}RepositoryInterface.php avec Writenamespace {namespace}\Repository;
interface {EntityName}RepositoryInterface
{
public function find(string $id): ?{EntityName};
public function findAll(): array;
}
src/Repository/{EntityName}Repository.php avec Writenamespace {namespace}\Repository;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
use {namespace}\Entity\{EntityName};
final class {EntityName}Repository extends ServiceEntityRepository implements {EntityName}RepositoryInterface
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, {EntityName}::class);
}
}
Affiche :
✅ Entité {EntityName} générée avec succès
Fichiers créés :
- src/Entity/{EntityName}.php
- src/Repository/{EntityName}Repository.php
- src/Repository/{EntityName}RepositoryInterface.php
Propriétés :
{liste des propriétés}
Prochaines étapes :
- Créer la migration : php bin/console make:migration
- Générer la factory : /php:make-factory {EntityName}
- Générer la collection : /php:make-collection {EntityName}
final, constructeur privé, factory statique create()final, extends ServiceEntityRepositorytoLog() inclut toutes les propriétésnpx claudepluginhub atournayre/claude-personas --plugin phpGenerates DDD-compliant entities for PHP 8.4 with identity, behavior, state transitions, invariants, status enums, exceptions, and unit tests.
Generates .NET domain entities following DDD principles with factory methods, private setters, domain events, and proper encapsulation. Supports aggregate roots, child entities, and value objects.
Builds PHP 8.3+ applications with Laravel/Symfony, strict typing, PHPStan level 9, and PSR standards. Creates typed DTOs, controllers, migrations, tests, and REST/GraphQL APIs.