We use GitHub actions to run automated actions on any merge into the default branch (main).
When your work includes writing some PHP, make sure to run these tests manually; at least before merging you working branch into 'main'.
Config: .github/workflows/php.yml
Tests the project across different versions of PHP. The workflow runs:
- PHP linting - is the code syntax valid?
- Code formatting - does the PHP code meet our coding standards?
You can run PHPUnit by using the command: ./bin/phpunit tests/
PHPLint tests PHP files for syntax errors.
Config: .phplint.yml
We exclude the vendor folder and test all other PHP files in the project.
You can run Phplint manually by using the command vendor/bin/phplint
PHP_CodeSniffer (PHPCS) tests PHP files to ensure they meet coding standards.
Config: .phpcs.xml.dist
Coding standard enforced:
- PSR-12
You can run PHPCS manually by using the command vendor/bin/phpcs
Use PHP Code Beautifier and Fixer (phpcbf) to automatically fix code issues.
Run it manually by using the command vendor/bin/phpcbf