atom-beautify 格式化PHP出错解决方法

报错文本:

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.
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值