Contributing to PHP Feed
July 29, 2025 ยท View on GitHub
Thank you for considering contributing to PHP Feed! We welcome contributions from the community.
Development Environment
Prerequisites
- PHP 8.3+
- Composer
- Git
Setup
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/php-feed.git cd php-feed -
Install dependencies:
composer install -
Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
Development Guidelines
Code Style
- Follow PSR-12 coding standards
- Use strict typing (
declare(strict_types=1)) where appropriate - All classes and methods should have proper docblocks
- Use meaningful variable and method names
Testing
-
All new features must include tests
-
Aim for 100% code coverage
-
Run tests before submitting:
composer test -
Run tests with coverage:
composer test:coverage -
Run tests with HTML coverage report:
composer test:coverage-html -
Watch tests during development:
composer test:watch
Code Quality
Run static analysis with PHPStan:
composer analyse
Check code style (PSR-12):
composer style
Fix code style automatically:
composer style:fix
Run all quality checks:
composer check
Run CI checks (used in GitHub Actions):
composer ci
Architecture
- The package follows a dependency injection pattern
- Adapters implement framework-specific interfaces
- The core
Feedclass is framework-agnostic - All properties should be private with public getters/setters
Types of Contributions
Bug Reports
When reporting bugs, please include:
- PHP version
- Framework version (if applicable)
- Steps to reproduce
- Expected vs actual behavior
- Code examples
Feature Requests
Before submitting a feature request:
- Check if it already exists in issues
- Explain the use case and benefits
- Consider if it fits the package's scope
- Be willing to help implement it
Pull Requests
- Create an issue first for significant changes
- Write tests for new functionality
- Update documentation if needed
- Follow the existing code style
- Keep commits focused and write clear commit messages
Pull Request Process
- Ensure all tests pass
- Update the README.md if needed
- Add your changes to any relevant documentation
- Submit the pull request with a clear description
- Be responsive to feedback and requested changes
Framework Integration
Adding New Framework Support
If you want to add support for a new framework:
-
Create adapters implementing the four core interfaces:
FeedCacheInterfaceFeedConfigInterfaceFeedResponseInterfaceFeedViewInterface
-
Place adapters in
src/Rumenx/Feed/YourFramework/ -
Add comprehensive unit tests
-
Update documentation with usage examples
-
Consider adding integration tests
Adapter Guidelines
- Keep adapters lightweight and focused
- Handle framework-specific error cases
- Follow the framework's conventions
- Document any special requirements
Documentation
- Keep the README.md up to date
- Add docblocks to all public methods
- Include usage examples for new features
- Update CHANGELOG.md for significant changes
Community Guidelines
- Be respectful and constructive
- Help others learn and contribute
- Follow our community standards
- Ask questions if something is unclear
Security
If you discover any security vulnerabilities, please follow our Security Policy.
Getting Help
- Open an issue for questions
- Check existing issues and documentation first
- Be specific about your problem or question
- Review our README for usage examples
Recognition
Contributors will be recognized in:
- GitHub contributors list
- Release notes for significant contributions
- README.md acknowledgments section
Useful Links
- README.md - Main documentation
- SECURITY.md - Security policy
- LICENSE.md - License information
- GitHub Issues - Bug reports and feature requests
- GitHub Actions - CI/CD pipeline
Thank you for helping make PHP Feed better!