4

Доброго времени суток, уважаемые. Подскажите, как подружить замечательный плагин Beautify и PHP? Бился я вчера, бился, но так и не смог. В соответствии с рекомендациями на сайте, в настройках php-cs-fixer прописывал путь до исполняемого файла

.atom\packages\php-cs-fixer\php-cs-fixer.phar

прописывал последний в PATH, но не помогло, всё равно выдаёт вот такую ошибку

Could not find 'php-cs-fixer'. The program may not be installed.

See здесь ссылка for program installation instructions. You can configure Atom Beautify with the absolute path to 'php-cs-fixer.phar' by setting 'PHP - CS Fixer Path' in the Atom Beautify package settings. Your program is properly installed if running 'where.exe php-cs-fixer' in your CMD prompt returns an absolute path to the executable. If this does not work then you have not installed the program correctly and so Atom Beautify will not find the program. Atom Beautify requires that the program be found in your PATH environment variable. Note that this is not an Atom Beautify issue if beautification does not work and the above command also does not work: this is expected behaviour, since you have not properly installed your program. Please properly setup the program and search through existing Atom Beautify issues before creating a new issue. See здесь ссылка for related Issues and здесь ссылка for documentation. If you are still unable to resolve this issue on your own then please create a new issue and ask for help.

0

1 ответ 1

3

Проверенный способ - установить php-cs-fixer глобально.

Globally (manual)

You can run these commands to easily access php-cs-fixer from anywhere on your system:

$ wget http://get.sensiolabs.org/php-cs-fixer.phar -O php-cs-fixer

or with curl:

$ curl http://get.sensiolabs.org/php-cs-fixer.phar -o php-cs-fixer

then:

$ sudo chmod a+x php-cs-fixer
$ sudo mv php-cs-fixer /usr/local/bin/php-cs-fixer

https://github.com/FriendsOfPHP/PHP-CS-Fixer

4
  • Забыл уточнить, Windows же 13 дек 2015 в 8:48
  • php как установлен? 13 дек 2015 в 14:12
  • В составе OpenServer 17 дек 2015 в 16:42
  • 1
    В PATH прописать путь к php, это для работы php в консоли. Путь к фиксеру от корня. Проверить работу фиксера в консоли, только потом настраивать atom 18 дек 2015 в 17:53

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.