Skip to content
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

Step by step guide for Windows users #6

Open
Nirvanatin opened this issue Jun 16, 2017 · 1 comment
Open

Step by step guide for Windows users #6

Nirvanatin opened this issue Jun 16, 2017 · 1 comment

Comments

@Nirvanatin
Copy link

Nirvanatin commented Jun 16, 2017

Please guide me to use this package in windows 10. I have read the issues and solutions for more than 6hrs and I tried them but all fails. is there anyone who can explain every single step to bring this to work. Please explain how to set the path properly, etc.

The below code is the steps that I have done but it fails at the end:

Install phpcs (PHP Code Sniffer) || phpmd || php-cs-fixer by composer for Sublime Text 3 Windows 10

You must have installed PHP and PHP path in System Evironment to install phpcs,phpmd,php-cs-fixer

Install composer:
- Go to c:\ and create a folder
named bin
- Download composer.phar and put
it in this folder.
- Open cmd, go to c:\bin and run
this code: echo @php "%~dp0composer.phar" %*>composer.bat
- Add c:\bin to invironment
variable.

Install phpcs:
run this code:
composer require "squizlabs/php_codesniffer=*"
ok. phpcs installed.

Install phpmd:
run this code:
composer require "phpmd/phpmd"

Install php-cs-fixer:
open cmd, run this code
composer require friendsofphp/php-cs-fixer

Final, add this folder: C:\bin\vendor\bin to
System Environment.


Add php-cs-fixer & phpcbf for Sublime Text 3 phpcs:
Open Sublime Text 3 -> Preferences -> Package Settings -> PHP Code Sniffer -> Settings --User, add this code:
{
"phpcbf_executable_path": "C:/bin/vendor/bin/phpcbf.bat",
"phpcs_executable_path":"C:/bin/vendor/bin/phpcs.bat",
"phpmd_executable_path":"C:/bin/vendor/bin/phpmd.bat",
"php_cs_fixer_executable_path":"C:/bin/vendor/bin/php-cs-fixer.bat",
}

@Nirvanatin Nirvanatin changed the title Step by step guide for windows users Step by step guide for Windows users Jun 16, 2017
@notrealdev
Copy link

Hi, how to install PHP_CodeSniffer without Composer?
Use Git Clone instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants