Welcome to WordPress VIP! This repository is a starting point for developing an integration and submitting for the Integrations Center.
It contains an example of fully configured VIP local and cloud development environments along with unit tests, end-to-end tests, static analysis and linting.
Utilizing these tools will allow you to submit the new versions of your integrations and us to deploy the code with confidence.
We used tools that we consider the best technology in the industry with convenience in mind. These are the tools we use on a day-to-day basis to ensure code quality on WordPress VIP platform.
We utilize PHPUnit 9 for unit tests. For an example of a test suite please refer to /tests/phpunit folder.
For end-to-end tests we use Playwright. Examples can be found in /tests/e2e.
Psalm is a free & open-source static analysis tool that helps you identify problems in your code.
Please note, for Psalm to work properly you will need to annotate your PHP code. For examples please refer to /plugins/my-integration.
Linting and coding standards are powered by PHP_CodeSniffer (commonly known as PHPCS) along with WordPress VIP and WordPress core rulesets.
For more information please refer to linting doc.
For more information on how our codebase is structured, see https://docs.wpvip.com/technical-references/vip-codebase/.
To fully leverage the starter kit you will need to have the following tools installed: Composer, Node.js, NPM (installed with Node.js), Docker, VIP-CLI.
📝 While we usually recommend Docker Desktop we understand that it may be not possible to utilize it for your organization. The Starter Kit is compatible with alternative container runtimes like Colima and Rancher Desktop. For details please refer to our documentation.
Assuming you have prerequisites installed, follow these steps to set up the local environment.
- Clone the repository and make it your own.
- Change the working directory to your repository.
- Install Composer dependencies
composer require
- Install Node.js dependencies
npm i
- Create and start a WPVIP local development instance:
vip dev-env create
vip dev-env start
- Write code, write tests. Or the other way around!
📝 For convenience, this repository contains a special configuration file vip-dev-env.yml, feel free to tweak it to your needs. For more in-depth guide to VIP Local Development Environments please refer to our documentation site.
We leverage GitHub Codespaces. There are no set up steps. On the first start of the codespace it will take a few minutes to build. Once the build runs you'll have a working environment. You can use either Web-based editor or local VSCode.
Once you're confident your code is ready for the prime time, please contact your Technology Partner Manager for the next steps.