Страницы

Поиск по вопросам

воскресенье, 12 января 2020 г.

Как подружить Atom Beautify и PHP?

#php #atom


Доброго времени суток, уважаемые. Подскажите, как подружить замечательный плагин
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.

    


Ответы

Ответ 1



Проверенный способ - установить 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

Комментариев нет:

Отправить комментарий