framework:make:invalide
Génère classe Invalide (exceptions métier)
Best use case
framework:make:invalide is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Génère classe Invalide (exceptions métier)
Teams using framework:make:invalide should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/make-invalide/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How framework:make:invalide Compares
| Feature / Agent | framework:make:invalide | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Génère classe Invalide (exceptions métier)
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Framework Make Invalide Skill
## Instructions à Exécuter
**IMPORTANT : Exécute ce workflow étape par étape :**
## Description
Génère une classe Invalide pour gérer les exceptions métier d'une entité avec factory methods.
## Usage
```
Use skill framework:make:invalide
```
## Variables requises
- **{EntityName}** - Nom de l'entité en PascalCase (ex: Product)
- **{entityName}** - Nom de l'entité en camelCase (ex: product)
- **{namespace}** - Namespace du projet (défaut: App)
## Dépendances
- Entité dans `src/Entity/{EntityName}.php`
## Outputs
- `src/Invalide/{EntityName}Invalide.php`
## Workflow
1. Demander le nom de l'entité (EntityName)
2. Vérifier que l'entité existe dans `src/Entity/{EntityName}.php`
- Si non : arrêter et demander de créer l'entité d'abord
3. Générer la classe Invalide depuis le template `templates/Invalide/`
4. Afficher le fichier créé
## Patterns appliqués
- Classe `final`
- Constructeur privé
- Factory statique `new()` pour instanciation
- Propriété privée de type entité
- Méthodes factory statiques pour exceptions (préfixe `car`)
## References
- [Usage](references/usage.md) - Exemples d'implémentation et enrichissement
## Notes
- Les méthodes factory d'exceptions commencent par `car` (convention)
- Messages d'exception sans point final
- Messages avec maximum de contexte
- Exceptions standard PHP (\InvalidArgumentException, \DomainException)
- Principe "fail fast"Related Skills
symfony-framework
Comprehensive Symfony 6.4 development skill for web applications, APIs, and microservices.
symfony:make
Cherche si il existe un maker Symfony pour faire la tache demandée et l'utilise si il existe. Si aucun maker n'existe alors utilise la slash command "/prepare"
framework:make:urls
Génère classe Urls + Message CQRS + Handler
framework:make:story
Génère Story Foundry pour fixtures de tests
framework:make:out
Génère classe Out (DTO immuable pour output)
framework:make:factory
Génère Factory Foundry pour tests
framework:make:entity
Génère une entité Doctrine avec repository selon principes Elegant Objects
framework:make:contracts
Génère les interfaces de contrats pour une architecture Elegant Objects
framework:make:collection
Génère classe Collection typée avec traits Atournayre
framework:make:all
Génère tous les fichiers pour une entité complète (orchestrateur)
fix-grammar
Fix grammar and spelling errors in one or multiple files while preserving formatting
phpstan-resolver
Résout automatiquement les erreurs PHPStan en analysant et corrigeant les problèmes de types. Boucle jusqu'à zéro erreur ou stagnation.