-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't locate phpcs on macOS #24
Comments
@Swift-R me too. I has searched solution with Google since yesterday. But nothing help to resolve this problem. And there is not enough detail in the author's docs |
From what I've read, the issue is with VSCode itself. It doesn't allow extensions to use anything externally anymore. |
I was having this same issue. There are two ways I was able to fix:
What I mean to fix phpcs installation is that for some reason installing with pear (via this other method) was causing an issue to not load on VSCode, and also break on console. I installed it globally with composer, and also this installation should be the only one to be pointed on your PATH: $ where phpcs
> /Users/gabrieloliveira/.composer/vendor/bin/phpcs Before this, I had the pear installation and two of composer linked to phpcs, for some reason still didn't work. After I removed the pear and composer duplicated entry, VSCode worked successfully. |
|
@Swift-R @oknixus @gwagroves @gabrielboliveira Can you please check whether 0.7.0 fixes your issues? |
@ikappas looks like it's working now. I've switched back to Atom in the meanwhile for various reasons and it seems that it's working differently. For example, with the exact same code, Atom reports one line having more than 120 characters and a missing namespace while VSCode reports a missing doc comment for a class and a missing blank line before the tags in a doc comment in a method. Edit: Never mind, I forgot to set the standard to PSR2. It's still not showing the line too long warning though. Another configuration? |
@Swift-R Are you using global phpcs or project specific with composer? |
Global |
@Swift-R I have switched to using stdIn instead of file parsing and setup utf8 encoding similarly to Atom in v.0.8.0. So I am closing this issue and feel free to test 0.8.0 until it is released! |
This is also an issue for me by the way. I'm running I tried something akin to @gwagroves' fix, so that it now looks like this: But unfortunately I still get this error. |
@ikappas I'm having the same problem. How can we help test 0.8.0 before it's oficially released with VSCode? |
ok it needs to be globally installed via composer for the current versions of VSCode to see it. Just run:
|
So I installed VSCode, the phpcs extension and then phpcs using PEAR:
sudo pear install phpcs
(does not work without sudo: No releases available for package "pear.php.net/phpcs")After restarting VSCode I get the message:
which phpcs
returns/usr/local/bin/phpcs
Anyone?
The text was updated successfully, but these errors were encountered: