Thank you for your interest in contributing to Utopia Emails! This document provides guidelines and information for contributors.
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/emails.git - Create a new branch:
git checkout -b feature/your-feature-name - Make your changes
- Run tests:
composer test - Run linting:
composer lint - Run static analysis:
composer check - Commit your changes:
git commit -m "Add your feature" - Push to your fork:
git push origin feature/your-feature-name - Create a Pull Request
- PHP 8.0 or later
- Composer
git clone https://github.com/utopia-php/emails.git
cd emails
composer installcomposer testWe use Laravel Pint for code formatting. Run the following commands:
# Check code style
composer lint
# Fix code style issues
composer formatWe use PHPStan for static analysis:
composer check- Follow PSR-12 coding standards
- Use type hints for all parameters and return types
- Write comprehensive PHPDoc comments
- Use meaningful variable and method names
- Keep methods small and focused
- Write unit tests for all new functionality
- Write unit tests for all new features
- Aim for high test coverage
- Use descriptive test method names
- Test both positive and negative cases
- Test edge cases and error conditions
- Update README.md for new features
- Add PHPDoc comments for all public methods
- Include usage examples in documentation
- Keep documentation up to date with code changes
- Ensure all tests pass
- Run code style checks and fix any issues
- Run static analysis and fix any issues
- Update documentation if needed
- Add tests for new functionality
When creating a pull request, please include:
- A clear description of the changes
- Reference to any related issues
- Screenshots or examples if applicable
- Testing instructions if needed
- All pull requests require review
- Address feedback promptly
- Keep pull requests focused and small
- Rebase on main branch if needed
When reporting bugs, please include:
- PHP version
- Library version
- Steps to reproduce
- Expected behavior
- Actual behavior
- Error messages or logs
When requesting features, please include:
- Use case description
- Proposed solution
- Alternative solutions considered
- Additional context
feature/description- New featuresbugfix/description- Bug fixeshotfix/description- Critical fixesdocs/description- Documentation updatesrefactor/description- Code refactoring
Use clear, descriptive commit messages:
- Use imperative mood ("Add feature" not "Added feature")
- Keep the first line under 50 characters
- Add more details in the body if needed
- Reference issues when applicable
- Update version in composer.json
- Update CHANGELOG.md
- Create a release tag
- Publish to Packagist
- Be respectful and inclusive
- Help others learn and grow
- Provide constructive feedback
- Follow the Code of Conduct
- Be patient with newcomers
- Check existing issues and discussions
- Ask questions in GitHub Discussions
- Join our Discord community
- Contact maintainers directly
By contributing to Utopia Emails, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to Utopia Emails! Your contributions help make this project better for everyone.