开发者工具

安装

  1. composer require hyperf/devtool

支持的命令

  1. php bin/hyperf.php

通过执行上面的命令可获得 Command 所支持的所有命令,其中返回结果 gen 系列命令和 vendor:publish 命令主要为 devtool 组件提供支持

  1. gen
  2. gen:amqp-consumer Create a new amqp consumer class
  3. gen:amqp-producer Create a new amqp producer class
  4. gen:aspect Create a new aspect class
  5. gen:command Create a new command class
  6. gen:controller Create a new controller class
  7. gen:job Create a new job class
  8. gen:listener Create a new listener class
  9. gen:middleware Create a new middleware class
  10. gen:process Create a new process class
  11. vendor
  12. vendor:publish Publish any publishable configs from vendor packages.

快速打开

增加了一个非常简单的功能,用内置的 gen 命令快速打开创建的文件,支持 sublimetextmateemacsmacvimphpstormideavscodevscode-insidersvscode-remotevscode-insiders-remoteatomnovanetbeansxdebug

还需要在 config/autoload/devtool.php 上添加这个配置块:

  1. return [
  2. /**
  3. * Supported IDEs: "sublime", "textmate", "emacs", "macvim", "phpstorm", "idea",
  4. * "vscode", "vscode-insiders", "vscode-remote", "vscode-insiders-remote",
  5. * "atom", "nova", "netbeans", "xdebug"
  6. */
  7. 'ide' => env('DEVTOOL_IDE', ''),
  8. //...
  9. ];