soderlind / vscode-phpcbf

PHP Code Beautifier and Fixer for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=persoderlind.vscode-phpcbf
GNU General Public License v3.0
28 stars 10 forks source link

Doesn't fire the executable #8

Open ethanteague opened 6 years ago

ethanteague commented 6 years ago

Sorry to leave a really generic "it doesn't work" bug report, but this extension doesn't do anything for me. It's not reporting errors or any messages in the Problems window. I do have phpcbf installed, and can execute it successfully on files via command line. I've tried to hardcode the path to the phpcbf executable in my user settings file, but no joy.

soderlind commented 6 years ago

OS? phpcbf version? Run phpcbf --version to get the version And please post your phpcbf settings.

ethanteague commented 6 years ago

Ubuntu, PHP_CodeSniffer version 2.9.2 (stable)

soderlind commented 6 years ago

You should upgrade phpcs/phpcbf to the latest release (3.2.2)

ethanteague commented 6 years ago

That doesn't work for the Drupal folks, @soderlind : ```- drupal/coder 8.2.12 requires squizlabs/php_codesniffer >=2.8.1 <3.0 -> satisfiable by squizlabs/php_codesniffer[2.9.x-dev].

ethanteague commented 6 years ago

I take that back - I don't need coder to use the Drupal standard. That said, I upgraded, and the result is the same.

soderlind commented 6 years ago

what's your phpcbf.executablePath ?

ethanteague commented 6 years ago

I've tried using the default provided by the plugin, as well as changing to the executable path revealed by which phpcbf: "phpcbf.executablePath": "/home/ethan/.config/composer/vendor/bin/phpcbf"

soderlind commented 6 years ago

Did you try "phpcbf.debug":true ? It yes, what's the output in the console ?

ethanteague commented 6 years ago

I did, and it doesn't output anything.

soderlind commented 6 years ago

Nothing at all ? Strange. What's the vs code version you're running ?

ethanteague commented 6 years ago

Latest release - just upgraded when prompted this am.

soderlind commented 6 years ago

ok. I'll get back to you. I have to install ubuntu an test it myself. I on macOS now.

ADmad commented 6 years ago

I am having the same problem as @ethanteague using linux mint (which is based on ubuntu 16.04 LTS).

ADmad commented 6 years ago

My apologies, my problem was due to incorrect phpcs configuration due to which my custom standard wasn't being found. Checking the console (Help -> Toggle Developer Tools) I was able to fix my issue.

ethanteague commented 6 years ago

I am still experiencing this issue, @soderlind. Phpcs is integrated via https://github.com/ikappas/vscode-phpcs and working on my machine. I have checked all perms, paths, etc. for the phpcbf binary, and they all line up with my phpcs binary being used by the ikappas plugin.

telmen commented 6 years ago

👍

ahmadawais commented 6 years ago

I have the same issue on MacOS. No debug nada.

tarikhamilton commented 6 years ago

Worked for me up until a week or so ago. Same issue. No debug/logging. phpcs and phpcbf up to date.

gauravgoyal commented 5 years ago

I'm also facing the same issue. Nothing in debug information.