定制 draw/console 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

draw/console

最新稳定版本:0.36.0

Composer 安装命令:

composer require draw/console

包简介

This component allow to command execution in the database.

README 文档

README

This bundle allows triggering command from the sonata admin. It also logs every command execution in the database even if they have been started from the command line.

Configuration

The configuration lists the commands available from Sonata to be selected and executed:

draw_command:
    sonata:
        commands:
            clearCache:
                commandName: "redis:flushdb"
                label: "Clear Cache"
                icon: "fa-ban"
            reIndexSearch:
                commandName: "fos:elastica:populate"
                label: "Re-Index Search"
                icon: "fa-search-plus"

Logging command execution

All command execution are log in the databases. They also log the output, so you can debug them in case an error happen.

If you want to proper log the output from command line interface you must use the BufferedConsoleOutput for you output in bin/console:

$application->run($input, new \Draw\Component\Console\Output\BufferedConsoleOutput());

Some predefined command are ignored by the command logging. This is a predefined list:

  • help
  • doctrine:database:drop
  • doctrine:database:create
  • cache:clear

Todo

  • Allow to configure the list of command that are ignored form the logger
  • Allow to have argument on the command execution, could be predefined from the configuration, an input in the admin, or a more complex input done by reverse engineering the arguments of a command

统计信息

  • 总下载量: 16.43k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-05-05