Thank you for considering contributing to this project! This document outlines the process and guidelines for contributing.
Before creating bug reports, please check existing issues to avoid duplicates. When creating a bug report, include:
- Clear title and description
- Steps to reproduce the behavior
- Expected vs actual behavior
- PHP version and operating system
- Sample file that reproduces the issue (if applicable)
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, include:
- Clear title and description
- Use case explaining why this would be useful
- Proposed implementation (if you have ideas)
- Alternative solutions you've considered
- Fork the repository and create your branch from
main - Make your changes following the code style guidelines
- Add tests for any new functionality
- Ensure all tests pass:
composer test - Run static analysis:
composer phpstan - Check code style:
composer cs-check(fix withcomposer cs-fix) - Update documentation if needed
- Commit with clear messages following conventional commits format
# Clone your fork
git clone https://github.com/YOUR-USERNAME/binary-compound-file-reader.git
cd binary-compound-file-reader
# Install dependencies
composer install
# Run tests
composer test
# Run static analysis
composer phpstan
# Check code style
composer cs-checkThis project follows PSR-12 coding standards. Code style is automatically checked in CI and can be fixed locally:
# Check for style issues
composer cs-check
# Automatically fix style issues
composer cs-fix- Write tests for all new features and bug fixes
- Unit tests go in
tests/Unit/ - Integration tests go in
tests/Integration/ - Tests should be clear and descriptive
- Aim for high code coverage
# Run all tests
composer test
# Run with coverage report
composer test-coverageAll code must pass PHPStan level 8:
composer phpstanFollow the Conventional Commits specification:
feat:New featurefix:Bug fixdocs:Documentation changesstyle:Code style changes (formatting, etc.)refactor:Code refactoringtest:Adding or updating testschore:Maintenance tasks
Example:
feat: add support for version 5 compound files
- Implement new sector size calculation
- Add tests for v5 files
- Update documentation
- All submissions require review
- Changes may be requested by maintainers
- Once approved, maintainers will merge the PR
- CI must pass before merging
Releases follow Semantic Versioning:
- MAJOR: Breaking changes
- MINOR: New features (backwards compatible)
- PATCH: Bug fixes (backwards compatible)
Feel free to open an issue with the question label if you need clarification on anything.
By contributing, you agree that your contributions will be licensed under the GPL-3.0-or-later License.