报错文本:
Could not find 'php-cs-fixer'. The program may not be installed.
See php-cs-fixer installation instructions at https://github.com/Glavin001/atom-beautify#beautifiers or go to https://github.com/FriendsOfPHP/PHP-CS-Fixer
Your program is properly installed if running 'where.exe php-cs-fixer' in your CMD prompt returns an absolute path to the executable.
Show Stack Trace
原因:没有 php-cs-fixer
解决方法:
1.下载 php-cs-fixer.phar 文件,并把它放在某个目录中(放哪里都可以,主要是下一步能够引用这个文件即可)
下载地址:https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.8.2/php-cs-fixer.phar
其他版本:https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases
2.给 Atom 配置 php-cs-fixer.phar 路径
注意:如果在这里添加 php-cs-fixer.phar 报错:
file —> Setting —> Packages —> atom-beautify(选择 Settings )—> PHP —> PHP-CS-Fixer Phar
报错文本:
The "PHP - PHP-CS-Fixer Path (cs_fixer_path)" configuration option has been deprecated. Please switch to using the option in section "Executables" (near the top) in subsection "PHP-CS-Fixer" labelled "Path" in Atom-Beautify package settings.