atournayre/maker-bundle
Composer 安装命令:
composer require --dev 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.
README 文档
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.
| Status | Command | Description and documentation |
|---|---|---|
| ✅️ | make:add:events-to-entities |
Add events to entities |
| ✅️ | make:new:command |
Create a new Command |
| ⚠️ | make:new:controller |
Create a new Controller |
| ✅️ | make:new:collection |
Create a new Collection |
| ✅ | make:new:dto |
Create a new DTO |
| ✅ | make:new:enum |
Create a new Enum |
| ✅ | make:new:event |
Create a new Event and Listener |
| ✅ | make:new:exception |
Create a new Exception |
| ✅ | make:new:interface |
Create a new Interface |
| ✅ | make:new:logger |
Create a new Logger |
| ✅ | make:new:service |
Create a new Service |
| ✅ | make:new:trait |
Create a new Trait |
| ✅ | make:new:vo |
Create a new VO |
| ✅ | project:getting-started |
Add minimal files to start a project |
Create a new Maker
Step 1: Create the Configuration class
- Create a new class in the
Configdirectory. - Extend the
MakerConfigurationclass. - 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
classNameSuffixmethod.
Step 2: Create the Builder class
- Create a new class in the
Builderdirectory. - Extend the
AbstractBuilderclass. - 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
Makerdirectory. - Extend the
AbstractMakerclass. - Implement the methods.
- Add the
#[AutoconfigureTag('maker.command')]attribute to the class.
统计信息
- 总下载量: 131
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-01-05