This repository provides a simple and fast env setup for WHMCS or WordPress
Use this to develop your WHMCS module or gateway.
Use this to code your WordPress plugin.
- PHP linting and formatting with Intelephense and php-cs-fixer
- JavaScript linting and formatting with ESlint and Standard style
- WordPress autocompletion with Intelephense
First, you need to install the following items:
- Dev Container extension in VS Code.
- Docker Desktop
-
In devcontainer.json, change the key
php-cs-fixer.config
to.php-cs-fixer-wp.php
and then delete the filephp-cs-fixer.php
. -
Make sure that in
devcontainer.json
the keyintelephense.stubs
has "WordPress" in its value. -
Remove unecessary configs for WordPress development such as:
aswinkumar863.smarty-template-support
in devcontainer.json
-
Delete
.git
and start your own repository. -
Place your files in
/src
. -
Press CTRL + Shift + P and select Rebuild Container Without.
-
Finally, start coding.
- In devcontainer.json, change the key
php-cs-fixer.config
to.php-cs-fixer.php
and then delete the filephp-cs-fixer-wp.php
. - Remove "WordPres" stub from
devcontainer.json
->intelephense.stubs
. - Place your files in
/src
. - Press CTRL + Shift + P and select Rebuild Container Without.
- Finally, start coding.
Take a look at extensions.json
and search these extensions in VS Code markteplace.
-
In
.devcontainer/devcontainer.json
, theimage:
key refers to the PHP image version. You must change this to change the PHP version of the container. -
Also in
devcontainer.json
, set the PHP version for the Intelephense suggestions in theintelephense.environment.phpVersion
key.