Php-cs-fixer Atom-Package install instructions for brew are wrong


Weirdly, the instructions to install php-cs-fixer into atom using brew are written very dumbly.

For instance, " Cat the script". What the hell does this even mean?



They are talking about the command line, which is a tool to issue commands to your computer without a GUI (Graphical User Interface). cat is a builtin command that prints the contents of a file to the terminal screen.


Well, not really.

Do you know what “Cat the script” means in this context?


If you look at the preformatted block immediately after that header, you will see that it tells you what it means. If you are unfamiliar with any standard GNU programs, you can look them up with the man command (ie, man cat) or online (if you search Google for “man cat”, it will pull up that exact result, along with a bunch of interesting pictures). Most/all of the GNU coreutils are mirrored on OS X.


If you think a package’s documentation is incorrect, you can go to the package’s repo and discuss it with the author, but I would refrain from using language that expresses your frustration through denigrating the intelligence of the author. It may be, as in this case, that you just aren’t sufficiently fluent in *nix commands.


Dumb answer.

Instead of saying “Cat the script”. It should say go get the path from in the script file.


Trust me when I say that if you maintain this level of hostility, you will find no friends and nobody will want to help you. You’re lucky that the people here are exceptionally kind and patient. I understand that you’re frustrated that you didn’t understand the language being used, but you cannot take that frustration out on people who are trying to help you.

Instead of saying “Cat the script”. It should say go get the path from in the script file.

It’s telling you to cat the script file because that’s the fastest way to get the path.


/usr/local/bin/php-cs-fixer is a binary file.

You dont “Cat the script” with a binary.


Have you tried? What was the result?


Why is there a hash bang there?


That’s where the documentation is poorly written. That code block should be presented as

$ cat /usr/local/bin/php-cs-fixer

/usr/bin/env php -d allow_url_fopen=On -d detect_unicode=Off /usr/local/Cellar/php-cs-fixer/1.8.1/libexec/php-cs-fixer.phar $*

In this convention, the first line is the command you enter at the prompt (commonly represented as $ or >), and what follows is the expected output. The shebang line is the first line of the script. You can see that the block with which follows that convention.


That is not even the right output.

The actually output of cat is a huge output, too much for the terminal, and that is not the best way to get the path.

It should be something like: cat /usr/local/bin/php-cs-fixer | grep ‘path’

But what is path here?


The actual output is different when using the actual file installed by Brew.

Further, how come comments on here cant be edited?


Someone with a Mac, like @Aerijo, will have to help you troubleshoot the Homebrew steps.

Your account is too new. Once you’ve posted a certain number of comments (I don’t know how many), you will have the ability to edit.


Basically, those install instructions are very dumbly written, and there is no good way to get the path out of the actual file that is currently installed by “brew install php-cs-fixer”.

“Cat the file” is dumb, because it is a binary file and the file is way too big.

The instructions need to include a good way to get the path with the current brew install.


Actually, “no good” way should be “no good way in these instructions”.


There are questions all over the internet on how to get php-cs-fixer working on atom for mac.

It is weird that the instructions just need to be updated and more clearly written.


I still cant find the path in that file.

What is the actual path supposed to be?


Dude. What did I tell you about disparaging others’ intellect? The instructions might be obsolete. They might be wrong. They might be misleading. We don’t know yet, and won’t until someone tests the Homebrew instructions on their Mac to verify that the issue is with the instructions and not your environment. Until then, you need to chill out.

If /usr/local/bin/php-cs-fixer is a binary file, then that might be the actual path. Have you tried using that? Alternatively, you can search for a file called php-cs-fixer.phar.