设置Sublime Text 3下的PHP开发环境

• Approximately 155 words, 1 min read • Dev Notes, Tips

需要做一些PHP的开发工作,工欲善其事,必先利其器.

brew tap homebrew/homebrew-php
brew install curl
brew install php56 --with-homebrew-curl
brew install phpmd php-code-sniffer  php-cs-fixer

在Sublime Text 3里cmd+shift+p中install package,安装如下插件

Update: 2015-10-22 19:13更新一下,配置一下可以让代码清晰一些了呢

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
{
  "phpcs_path": "/usr/local/bin/phpcs",
  "phpcs_show_errors_on_save": false,
  "phpcs_show_gutter_marks": true,
  "phpcs_outline_for_errors": false,
  "php_cs_fixer_on_save": true,
  "php_cs_fixer_executable_path":"/usr/local/bin/php-cs-fixer",
  "php_cs_fixer_additional_args": {
    "--level=psr2":"",
    "--fixers=operators_spaces,align_equals,align_double_arrow,remove_lines_between_uses":""
  },
  "phpcbf_path": "/usr/local/bin/phpcbf",
  "phpcbf_on_save": true,
  "phpcbf_show_quick_panel": true,
  "phpcbf_executable_path": "/usr/local/bin/phpcbf"
}