Thank you for considering contributing to php-ymap! This document provides guidelines for contributing to the project.
- Fork the repository on GitHub
- Clone your fork locally
- Create a new branch for your feature or bugfix
- Make your changes
- Push to your fork and submit a pull request
- PHP 8.1 or higher
- Composer
- IMAP extension enabled
- Extensions: iconv, json, mbstring
- PHP 8.1+ syntax and features
- Strict typing:
declare(strict_types=1)in all files - Type hints for all parameters and return values
- PHPStan level 8 compliance (run
vendor/bin/phpstan analyse)
When adding new features or fixing bugs:
- Add tests if a test suite exists
- Manually test with real IMAP servers when possible
- Test edge cases (multipart messages, different encodings, inline attachments)
- One feature/fix per PR - Keep pull requests focused
- Update CHANGELOG.md - Document your changes under
[Unreleased] - Write clear commit messages - Explain what and why, not just what
- Test your changes - Ensure PHPStan passes and functionality works
- Update documentation - Update README.md if adding new features
Brief summary (50 chars or less)
More detailed explanation if needed. Explain what changed
and why, not just what was done.
- Bullet points for multiple changes
- Keep lines under 72 characters
We welcome:
- Bug fixes - Especially MIME parsing edge cases
- Documentation improvements - Examples, clarifications, fixes
- Performance optimizations - With benchmarks/profiling data
- Test coverage - Unit tests for message parsing, attachments, encodings
- Security improvements - TLS handling, input validation
Please open an issue first for:
- Major architectural changes
- New features that expand scope significantly
- Breaking API changes
- Maintainer will review your PR within a few days
- Address any feedback or requested changes
- Once approved, maintainer will merge
By contributing, you agree that your contributions will be licensed under the MIT License.