Thank you for your interest in contributing to the GL WordPress PHPUnit Testing Framework! This document provides guidelines and instructions for contributing to this project.
- Code of Conduct
- Getting Started
- Development Workflow
- Coding Standards
- Testing
- Documentation
- Pull Request Process
This project adheres to a Code of Conduct that all contributors are expected to follow. By participating, you are expected to uphold this code.
- Fork the repository on GitHub
- Clone your fork locally
- Install dependencies using Composer:
composer install
- Create a branch for your feature or bug fix:
git checkout -b feature/your-feature-name
- Make your changes in your feature branch
- Add or update tests as necessary
- Ensure all tests pass
- Update documentation if needed
- Submit a pull request
This project follows PSR-12 coding standards and WordPress coding standards where appropriate.
- Use strict typing with
declare(strict_types=1); - Follow PSR-4 autoloading standards
- Use proper namespacing
- Include comprehensive PHPDoc comments
- Use type hints and return type declarations
We use PHP_CodeSniffer to enforce coding standards. You can check and fix coding standards issues with:
# Check coding standards
composer run-script phpcs
# Fix coding standards issues automatically where possible
composer run-script phpcbfCommon issues to watch for:
- Indentation (4 spaces, not tabs)
- Line length (generally 100 characters max)
- Proper spacing around operators
- Proper docblock formatting
- Naming conventions
All new code should include appropriate tests:
# Run all tests
composer run-script test
# Run only unit tests
composer run-script test:unit
# Run only integration tests
composer run-script test:integrationPlease update documentation when adding or modifying features:
- Update relevant sections in
/docs/guides/ - Add examples where appropriate
- Ensure PHPDoc comments are comprehensive and accurate
- Update the README.md or documentation with details of changes if appropriate
- Update the CHANGELOG.md file with details of changes
- The PR should work on PHP 7.4 and above
- Ensure all tests pass and coding standards are met
- Your PR will be reviewed by maintainers, who may request changes
If you have any questions about contributing, please open an issue or reach out to the maintainers.
Thank you for contributing to the GL WordPress PHPUnit Testing Framework!