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 startWhen 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 buildNote, assets will also build during the install phase.
You can run all testing (all lints and unit tests) together with the following:
make testThe project uses the Brain Monkey library for unit testing. Once setup run the following for unit tests:
make test-unitThe project uses the WordPress e2e tests. Run the following for e2e tests:
make test-e2eWe 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-lintor, to run an individual lint (php or javascript), use one of the following:
make test-lint-phpmake test-lint-javascriptScrew 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 resetTo generate a .zip that can be uploaded through any normal WordPress plugin installation workflow, simply run the following:
make release