Skip to content

Instantly share code, notes, and snippets.

@realrashid
Last active August 12, 2025 09:57
Show Gist options
  • Select an option

  • Save realrashid/59d0f99ed31103ae44291f3c752240b6 to your computer and use it in GitHub Desktop.

Select an option

Save realrashid/59d0f99ed31103ae44291f3c752240b6 to your computer and use it in GitHub Desktop.
How to Install PHP-CS-Fixer on Windows

Installing PHP-CS-Fixer for VsCode on Windows

Install PHP-CS-FIXER Using Composer

composer global require friendsofphp/php-cs-fixer

after successfully installation of PHP-CS-FIXER

now install PHP-CS-FIXER VSCODE Extension

PHP-CS-Fixer

Configuration

in VSCODE User Settings press Ctrl+, to get VSCODE User Settings

"php-cs-fixer.executablePath": "php-cs-fixer.bat",
"php-cs-fixer.executablePathWindows": "php-cs-fixer.bat",
"php-cs-fixer.onsave": true,
//If you want to create a custom config for php-cs-fixer
//create a .php_cs file in this C:\Users\username\.vscode directory
"php-cs-fixer.config": "C:\\Users\\username\\.vscode\\.php_cs",

That's all! Hope this will help you!

Regard's

Rashid Ali

@realrashid
Copy link
Copy Markdown
Author

realrashid commented Mar 27, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment