cadot.eu / make
maker de bundle
Requires
- php: >=8.2
- symfony/config: ^6.4|^7.0|^8.0
- symfony/dependency-injection: ^6.4|^7.0|^8.0
- symfony/event-dispatcher: ^6.4|^7.0|^8.0
- symfony/event-dispatcher-contracts: ^2.5|^3.0
- symfony/filesystem: ^8.1
- symfony/http-foundation: ^6.4|^7.0|^8.0
- symfony/http-kernel: ^6.4|^7.0|^8.0
- symfony/routing: ^6.4|^7.0|^8.0
README
✨ Rédigé par un humain · Relu & structuré par IA
MakeBundle est un bundle Symfony qui automatise la création (et la suppression) de bundles personnalisés dans votre projet. Fini le scaffolding manuel : une simple commande interactive pose les fondations, enregistre le bundle dans bundles.php, l'ajoute à composer.json et génère une structure prête à l'emploi.
🚀 Fonctionnement
- Une commande console
make:bundleest mise à disposition. - Vous répondez à quelques questions (nom, description).
- Le bundle :
- Copie et rend les templates Twig (sources, config, tests, composer.json…) dans
bundles/<Nom>/. - Renomme
MakeBundle.phpen<Nom>Bundle.php. - Ajoute la ligne correspondante dans
config/bundles.php. - Configure le repository Composer local et exécute
composer require.
- Copie et rend les templates Twig (sources, config, tests, composer.json…) dans
En mode suppression (--rm), le bundle retire proprement les références de composer.json et bundles.php, et supprime le dossier.
📦 Installation
🔗 Dépôt : github.com/cadot-eu/bundle-make
Méthode 1 — Via Packagist (recommandé)
Une fois le package publié sur Packagist :
composer require cadot.eu/make
Méthode 2 — Directement depuis GitHub
Ajoutez le repository VCS puis require :
composer config repositories.bundle-make vcs https://github.com/cadot-eu/bundle-make.git composer require cadot.eu/make:dev-main
Ajoutez manuellement dans config/bundles.php si le recipe ne le fait pas :
CadotEu\Make\MakeBundle::class => ['all' => true],
🛠 Utilisation
# Créer un nouveau bundle php bin/console make:bundle # Supprimer un bundle existant php bin/console make:bundle --rm
Le dialogue interactif vous guidera.
🧱 Structure générée
bundles/<Nom>/
├── composer.json
├── phpunit.xml.dist
├── tests.sh
├── config/
│ └── services.yaml
├── src/
│ ├── <Nom>Bundle.php
│ ├── Command/
│ │ └── <Nom>BundleCommand.php
│ ├── Controller/
│ │ └── ExampleController.php
│ ├── Event/
│ │ └── MakeExampleEvent.php
│ └── Service/
│ └── MakeNotifier.php
└── tests/
└── DemoTest.php
✅ Compatibilité
| Composant / Outil | Versions supportées |
|---|---|
| PHP | ≥ 8.2 |
| Symfony HttpKernel | ^6.4 | ^7.0 | ^8.0 |
| Symfony Routing | ^6.4 | ^7.0 | ^8.0 |
| Symfony DI / Config | ^6.4 | ^7.0 | ^8.0 |
| Symfony EventDispatcher | ^6.4 | ^7.0 | ^8.0 |
| Symfony Filesystem | ^8.1 |
| Twig | ✓ (intégré via les templates) |
📄 Licence
MIT — voir le fichier LICENSE.
MakeBundle — Symfony Scaffolder
✨ Human-written · AI-reviewed & structured
MakeBundle is a Symfony bundle that automates the creation (and deletion) of custom bundles inside your project. A single interactive command sets everything up: bundle registration, Composer wiring, and a ready-to-use folder structure.
🚀 How it works
- Run the
make:bundleconsole command. - Answer a few prompts (name, description).
- The bundle will:
- Render Twig templates (sources, config, tests,
composer.json…) intobundles/<Name>/. - Rename
MakeBundle.php→<Name>Bundle.php. - Insert the required line in
config/bundles.php. - Set up a local Composer repository and run
composer require.
- Render Twig templates (sources, config, tests,
Use --rm to cleanly unregister and delete an existing bundle.
📦 Installation
🔗 Repository: github.com/cadot-eu/bundle-make
Method 1 — Via Packagist (recommended)
Once the package is published on Packagist:
composer require cadot.eu/make
Method 2 — Directly from GitHub
Add the VCS repository first, then require:
composer config repositories.bundle-make vcs https://github.com/cadot-eu/bundle-make.git composer require cadot.eu/make:dev-main
If the recipe doesn't handle it, register manually in config/bundles.php:
CadotEu\Make\MakeBundle::class => ['all' => true],
🛠 Usage
# Create a new bundle php bin/console make:bundle # Delete an existing bundle php bin/console make:bundle --rm
Follow the interactive prompts.
🧱 Generated structure
bundles/<Name>/
├── composer.json
├── phpunit.xml.dist
├── tests.sh
├── config/
│ └── services.yaml
├── src/
│ ├── <Name>Bundle.php
│ ├── Command/
│ │ └── <Name>BundleCommand.php
│ ├── Controller/
│ │ └── ExampleController.php
│ ├── Event/
│ │ └── MakeExampleEvent.php
│ └── Service/
│ └── MakeNotifier.php
└── tests/
└── DemoTest.php
✅ Compatibility
| Component / Tool | Supported versions |
|---|---|
| PHP | ≥ 8.2 |
| Symfony HttpKernel | ^6.4 | ^7.0 | ^8.0 |
| Symfony Routing | ^6.4 | ^7.0 | ^8.0 |
| Symfony DI / Config | ^6.4 | ^7.0 | ^8.0 |
| Symfony EventDispatcher | ^6.4 | ^7.0 | ^8.0 |
| Symfony Filesystem | ^8.1 |
| Twig | ✓ (used for templates) |
📄 License
MIT — see LICENSE.