Contributing
Thank you for considering contributing to IsoFlags! This guide will help you get started.
Code of Conduct
Be respectful, constructive, and professional in all interactions.
How to Contribute
Reporting Bugs
Found a bug? Please open an issue with:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- PHP version and environment details
Suggesting Features
Have an idea? Open an issue with:
- Clear description of the feature
- Use cases and benefits
- Proposed implementation (optional)
Pull Requests
- Fork the repository
-
Create a feature branch
-
Make your changes
- Follow existing code style
- Add tests for new features
-
Update documentation
-
Run QA checks
-
Commit your changes
-
Push and create PR
Then open a Pull Request on GitHub
Development Setup
Requirements
- PHP 8.4 or higher
- Composer
Installation
# Clone your fork
git clone https://github.com/YOUR_USERNAME/isoflags.git
cd isoflags
# Install dependencies
composer install
Running Tests
Code Quality
# Run all QA checks
make qa
# Individual checks
make test # PHPUnit tests
make psalm # Static analysis
make cs-check # Code style check
make phpcs # PSR-12 compliance
# Fix code style issues
make cs-fix
Coding Standards
PHP Standards
- PSR-12 code style
- Strict types - All files must have
declare(strict_types=1) - Type hints - Use type hints for all parameters and return types
- Enums - Use PHP 8.4 enums where appropriate
Testing
- All new features must have tests
- Maintain 100% code coverage
- Tests must pass before merging
Documentation
- Update documentation for new features
- Add code examples
- Keep README.md concise (detailed docs go in
docs/)
Commit Messages
Follow conventional commits:
feat: add new feature
fix: correct typo in README
docs: update API documentation
test: add tests for validation
chore: update dependencies
Release Process
Releases follow the PR-based workflow:
- Create PR with changes
- Update CHANGELOG.md in the PR
- Merge PR to master
- Trigger GitHub Release workflow
- Tag and release created automatically
See RELEASE.md for details.
Questions?
Feel free to ask questions by:
- Opening an issue
- Emailing: mainstreamer@outlook.com
Thank you for contributing!