参考:https://www.cnblogs.com/g825482785/p/symfony.html

格式:$ php bin/console 命令,如 $ php bin/console server:run

辅助命令
    help 命令                              显示命令的帮助信息
    list                                        显示命令列表

命令选项
    --help -h            显示本帮助信息
    --quiet -q           不输出任何信息
    --verbose -v         增加信息的详细程度
    --version -V         显示本程序的版本号
    --ansi               强制ANSI输出
    --no-ansi            禁止ANSI输出
    --no-interaction -n  不进行任何交互问题的询问
    --shell -s           启动shell
    --process-isolation  用shell作为一个单独的进程启动命令
    --env -e             环境名
    --no-debug           关闭调试模式

server命令
    server:run                             运行PHP内置的Web服务器
    server:start                           在后台开始PHP内置的Web服务器
    server:status                        输出给定地址的内置Web服务器的状态
    server:stop                           从服务器的启动命令停止PHP内置的Web服务器

debug命令
    debug:router                          显示当前应用程序的所有路由
     debug:autowiring                  为当前应用程序开启服务自动装配
    debug:translation                   显示消息信息的翻译

maker命令                                 composer require symfony/maker-bundle --dev #安装命令
    $ php bin/console list make
        make:command                Creates a new console command class
        make:controller                 Creates a new controller class
        make:entity                       Creates a new Doctrine entity class
        [...]
        make:validator                 Creates a new validator and constraint class
        make:voter                      Creates a new security voter class
    $ php bin/console make:controller --help

assets命令
    assets:install                        在公用网站目录中安装各Bundle插件的asset资源文件
    assets:install target [--symlink]     copies (or symlinks) files into the correct location
                                          (target is by default the "public/" directory)

config命令
    config:dump-reference framework       显示框架可用的配置选项

 

Logo

这里是“一人公司”的成长家园。我们提供从产品曝光、技术变现到法律财税的全栈内容,并连接云服务、办公空间等稀缺资源,助你专注创造,无忧运营。

更多推荐