Visual Studio Code: Unable to locate phpcs

后端 未结 15 1989
梦毁少年i
梦毁少年i 2021-02-01 01:56

I am facing this issue in Visual Studio Code. I have already tried reinstalling the phpcs extension but still facing this issue.

Unable to locat

15条回答
  •  星月不相逢
    2021-02-01 02:07

    I had the same problem and i did this to fix it in my windows:

    1. You will Download the Composer (From here)

    2. Go to Vs code and open your terminal and run this command

      composer global require squizlabs/php_codesniffer
      
    3. Go to (settings--> User Settings), then search PHP CodeSniffer

    4. Scroll to Executatble Path and type

      \Users\{user_name}\AppData\Roaming\Composer\vendor\bin\phpcs
      

      and restart VS code.

    This works For me, I hope it Works for you too :D

提交回复
热议问题