Error when attempting to beautify PHP


Hey, guys,

I’m building a website in PHP files and when I try to beautify the editor contents using atom-beautify, I get the “Could not find ‘php-cs-fixer’. The program may not be installed.” error:

I even tried to manually install the package, which worked temporarily until something updated and now I get the error everytime again.

If it helps, most of the content is HTML with some PHP. I’m running Atom 1.2.0 on El Capitan (all packages are up-to-date). Any idea how to fix this?


The program say you dont have php-cs-fixer, Go to the link provided and follow the step how to install it. I really sorry, i dont know what php-cs-fixer it is,


Thanks, but I mentioned that the error appears even when I manually install php-cs-fixer…


try to type which php-cs-fixer on terminal… You should see output path pointing to it…


The error states that it can’t find php-cs-fixer, not that you don’t have it installed necessarily. Most likely what is happening is you have a PATH set when you launch Atom from the command line, but not when you launch it from the Dock. When starting from the Dock on OS X you get the system default environment variables but when starting from within a command line environment you inherit the environment in the shell. See:

There have been some people thinking about built-in solutions, but for now you’ll have to solve it manually. You can subscribe to this Issue for updates: