Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
/ phpcompat Public archive
forked from wpengine/phpcompat

WordPress Plugin: PHP Compatibility Checker

Notifications You must be signed in to change notification settings

10up/phpcompat

 
 

Repository files navigation

PHP Compatibility Checker

An easy way to check your site for PHP Compatibility.

Setup Development Environment

Before starting your workstation will need the following:

  1. Clone the repository

git@github.com:wpengine/phpcompat.git

  1. 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. :)

Build and Testing

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

Preparing for release

To generate a .zip that can be uploaded through any normal WordPress plugin installation workflow, simply run the following:

make release

Packages

No packages published

Languages

  • PHP 51.2%
  • JavaScript 33.4%
  • Makefile 9.0%
  • SCSS 6.4%