An easy way to check your site for PHP Compatibility.
Before starting your workstation will need the following:
- Clone the repository
git@github.com:wpengine/phpcompat.git
- Setup WP-Env
make setup && make start
When finished, a local WordPress will be configured at http://localhost:8888/wp-admin.
WordPress Credentials:
URL: http://localhost:8888/wp-admin
Admin User: admin
Admin Password: password
If anything goes wrong and you suspect your local is frozen, you can always make choose-violence
to rebuild the local environment and containers. Hopefully you never have to choose violence. :)
make build
Note, assets will also build during the install phase.
You can run all testing (all lints and unit tests) together with the following:
make test
The project uses the Brain Monkey library for unit testing. Once setup run the following for unit tests:
make test-unit
The project uses the WordPress e2e tests. Run the following for e2e tests:
make test-e2e
We also use PHP_CodeSniffer with WordPress Coding Standards and JSHint with WordPress' JS Standards. Linting will automagically be setup for you if you use Visual Studio Code. If you want to run it manually use the following:
make test-lint
or, to run an individual lint (php or javascript), use one of the following:
make test-lint-php
make test-lint-javascript
Screw something up? You can reset your environment with the following. It will stop the environment and cleanup and the build files as well as anything downloaded.
make reset
To generate a .zip that can be uploaded through any normal WordPress plugin installation workflow, simply run the following:
make release