PHP Extension Superpack!
Included extensions:
Install
To install this you just need to copy this line and then run it on the Quick Open menu (Ctrl + P):
ext install chez14.php-superpack
Additional Setup
phpcs
You need to install squizlabs/php_codesniffer
Composer Package to make this extension work as expected. There's two way on how to install this.
System-wide:
use Composer:
$ composer global require squizlabs/php_codesniffer
Project-wide:
$ composer require squizlabs/php_codesniffer
For more information please see:
https://marketplace.visualstudio.com/items?itemName=ikappas.phpcs#linter-installation.
PHP Sniffer (wongjn)
This extension requires you to set up your vscode formatter settings. You can do that in two ways:
System-wide
- Open the Settings page (Ctrl + ,).
- Make sure you're in User tab.
- Search
defaultFormatter
.
- Change to
wongjn.php-sniffer
.
- You can also edit the
settings.json
file for user-wide settings.
Project-wide
- via Settings page (Ctrl + ,).
- Open the Settings page, make sure you're in the Workspace Tab.
- Search
defaultFormatter
.
- Change to
wongjn.php-sniffer
.
- via
settings.json
file
- Create a file on
.vscode/settings.json
.
- Add following snippets to set the default formatter to this extensions:
{
"[php]": {
"editor.defaultFormatter": "wongjn.php-sniffer"
}
}
... and then to setup your extension settings, you need to add the following piece on the settings.json
, either on your User or Workspace.
{
"phpSniffer.autoDetect": true
}
For more information please see:
https://marketplace.visualstudio.com/items?itemName=wongjn.php-sniffer#extension-settings
Please send suggestions on the repo: https://gitlab.com/chez14/php-superpack.