WordPress CMS to manage the Crown Commercial public website at https://www.crowncommercial.gov.uk/
Please see further web documentation (this is a private repo).
- Test in a feature branch.
- Merge to
development
branch to test in Development environment. - Merge to
preprod
branch to test in PreProd (UAT) environment. - Get client to test and approve change.
- Create Pull Request to merge changes into
master
, ensure you add details of tickets you are fixing in the PR. - Code must pass automatic tests & be approved by one other person.
- Email internal-it@crowncommercial.gov.uk to ask approval of this PR.
- Once approved, merge into master. This deploys to Production.
See details on Environments (private docs).
Post launch, we will have a number of deployment checks before merging new code into production, notably:
- Code must pass static code analysis tests & automated tests (Travis).
- Manual review by CCS TechOps to approve Pull Request.
A step-by-step guide to get a development environment running on your machine.
- PHP 7.3+
- MySQL 5.7+
You will need to import an up-to-date version of the database into your local environment.
This repository contains an example ENV file named .env.example
. You need to copy this file and rename it to just .env
.
Within this .env
file you will need to configure the various empty environment variables from the example file, these include the site URL (WP_SITEURL
) which will need to match the domain defined in your local hosting setup. This file also includes the database and other WordPress configuration.
For the Salesforce import to work locally, you will also need to specify the correct connection details in this file (these environment variables are specified at the top of the file, and separated from the rest by clear comments)
We use Travis CI to run automated tests on all merges into development, preprod and master.
Application code (in the src/
folder) must meet the (PSR12) coding standard.
Please note WordPress code is not checked for coding standards at present. We currently ignore
long line lengths, though we can fix this in the future if desired. PHPCS configuration can be found
in phpcs.xml.dist
.
You can test for this via:
# Summary report
vendor/bin/phpcs --report=summary
# Full details
vendor/bin/phpcs
Where possible you can auto-fix code via:
vendor/bin/phpcbf