- PHP 7.4+
- Python 3.8+
- Composer
composer installThis installs WordPress Coding Standards (WPCS) for PHP linting.
The helper functions and WordPress.com adapter are covered by a unittest suite in tests/:
python3 -m unittest discover testsBug fixes must include a regression test in tests/.
Lint all PHP files in lib/:
./vendor/bin/phpcsAuto-fix what can be fixed automatically:
./vendor/bin/phpcbfThe ruleset is defined in .phpcs.xml.dist.
Run both checks:
./vendor/bin/phpcs
python3 -m unittest discover testsBoth must pass before submitting a pull request.