proklung/symfony-maker-bundle

Symfony扩展,用于生成扩展骨架。

1.0.4 2021-04-20 06:33 UTC

This package is auto-updated.

Last update: 2024-09-20 14:09:55 UTC


README

专门针对与Symfony以外的结构(如Bitrix或WordPress)的集成,而不是针对原始的Symfony应用程序。

安装

  1. composer require proklung/symfony-maker-bundle

  2. 在应用中初始化扩展。

配置

在文件 maker_bundle.yaml 中,键 bundle_dir 是将生成的扩展放入的目录。默认为 /local/classes/Bundles/,命名空间为 Local\Bundles

  • config_file_dir - 存放扩展配置文件(在Symfony中为bundles.php)的文件夹路径。默认为 /local/configs/
  • config_file - 扩展配置文件的名称(默认为 standalone_bundles.php
  • namespace - 扩展的命名空间。默认为 Local\Bundles

使用

php bin/console maker:make-bundle TestBundle

其中 TestBundle 是扩展的名称。

命令完成后,将在 /local/configs/standalone_bundles.php 中注册创建的扩展。如果不需要这样做,则需要带 --init=false 标志运行命令。