atournayre / maker-bundle
This bundle extend Symfony Maker Bundle and helps you create lots of files so you can forget about writing boilerplate code and it also provide minimal files to start a project.
Installs: 74
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.1
- symfony/config: 6.2.*
- symfony/console: 6.2.*
- symfony/dependency-injection: 6.2.*
- symfony/flex: ^2.2
- symfony/http-kernel: 6.2.*
- symfony/maker-bundle: ^1.48
This package is auto-updated.
Last update: 2024-10-25 06:53:08 UTC
README
Installation
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
composer require atournayre/maker-bundle --dev
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the config/bundles.php
file of your project:
// config/bundles.php return [ // ... Atournayre\Bundle\MakerBundle\AtournayreMakerBundle::class => ['dev' => true], ];
Step 3: Configure the Bundle
# config/packages/atournayre_maker.yaml atournayre_maker: root_namespace: 'App'
Debug configuration
- default configuration
php bin/console config:dump atournayre_maker
. - current configuration
php bin/console debug:config atournayre_maker
.
Documentation
Commands
Legend:
- ⚠️: Experimental command.
- 🚧: Command to be implemented.
- ✅: Command implemented.
Create a new Maker
Step 1: Create the Configuration class
- Create a new class in the
Config
directory. - Extend the
MakerConfiguration
class. - If you need extra configuration, create as many properties, getters and withers as needed.
- If you want to add suffixes to the class name, override the
classNameSuffix
method.
Step 2: Create the Builder class
- Create a new class in the
Builder
directory. - Extend the
AbstractBuilder
class. - Implement the methods.
- Add the
#[AutoconfigureTag('atournayre_maker.php_file_builder')]
attribute to the class.
Step 3: Create the Maker class
- Create a new class in the
Maker
directory. - Extend the
AbstractMaker
class. - Implement the methods.
- Add the
#[AutoconfigureTag('maker.command')]
attribute to the class.