atom-beautify & php-cs-fixer

Muhammed Al-Awami picture Muhammed Al-Awami · Sep 3, 2017 · Viewed 13.2k times · Source

I am a new programmer and I need your help. I'm pretty much new to Atom editor, but setup some nice packages like Atom Beautify. After using it in a html / php file I'm getting the error "Could not find 'php-cs-fixer' . The program may not be installed. The strange thing is, I did install the package php-cs-fixer but nothing happens.

My system is Windows.

Anyone got an idea how I can fix this?

Answer

Jéssica Román Largo picture Jéssica Román Largo · Oct 4, 2018
  1. You must have installed "php" usually when installing the Wamp or Xampp servers are installed by default.     

  2. Download the file "php-cs-fixer.phar" https://github.com/FriendsOfPHP/PHP-CS-Fixer

  3. In the CMD execute this command: php where.exe

  4. You get a path, that path copy in: Open Atom Packages / Atom Beautify / Settings / Executables / PHP

  1. In the same folder where the php.exe is located copy the file "php-cs-fixer.phar"

  2. Redo the previous process with the CMD and the Atom in PHP-CS-Fixer "