Local testing
Start routine
Open a WSL instance in your Plugin folder. Provided you have set up your plugin to include all the necessary files (DevTools does this automatically), you'll be able to start the route.
Start a docker instance
We currently have two "disposable" Docker-Container - one for PHP 7.4 and one for PHP 8.0.
PHP 7.4:
docker run -it --rm "-v`pwd`:/project" -u`id -u`:`id -g` registry.econsor.net/container-images/compose-stack/php_fpm:7.4 /bin/bash
PHP 8.0:
docker run -it --rm "-v`pwd`:/project" -u`id -u`:`id -g` registry.econsor.net/container-images/compose-stack/php_fpm:8.0 /bin/bash
If you don't want to run XDEBUG, you can add another flag (after --rm) - -e'XDEBUG_MODE=off''
First time setup
You'll be directly booted to the interactive Container Bash. You'll now need to install the requirements. You do this by running:
composer install
Then, you'll have to install PHPcq:
./vendor/bin/phpcq install -v
Start the routine
Now you can start the Codestyle-Check (and you'll be able to run this command repeatedly):
./vendor/bin/phpcq run -o default -vvv
Run Fixer
To run the integrated Fixer, which - among other things - automatically normalises the composer.json file, use this Command:
vendor/bin/phpcq -v run fix
Update composer.json after changes
If there's changes to your composer.json, run the command composer update