Thank you for your interest in contributing to the Four Fritz HTTP Client! This document provides guidelines for contributing to the project.
This project follows a code of conduct that ensures a welcoming environment for everyone. Please be respectful and constructive in all interactions.
- Fork the repository on GitHub
- Clone your fork locally
- Install dependencies:
composer install - Create a branch for your feature:
git checkout -b feature/amazing-feature
# Install dependencies
composer install
# Run tests
composer test
# Check code style
composer style
# Run static analysis
composer analyse- Follow PSR-12 coding standards
- Use type declarations for all parameters and return types
- Add PHPDoc comments for all public methods
- Keep methods focused and small
- Add unit tests for new functionality
- Ensure 100% test coverage for new code
- Test with real FritzBox devices when possible
- Include integration tests for API endpoints
- Update README.md if adding new features
- Add code examples for new functionality
- Document configuration options
- Update CHANGELOG.md
When reporting bugs, please include:
- FritzBox model and FritzOS version
- PHP version and environment details
- Steps to reproduce the issue
- Expected vs actual behavior
- Code examples if possible
For new features:
- Describe the use case clearly
- Explain the benefit to users
- Consider backwards compatibility
- Provide implementation ideas if possible
When adding new services (WLAN, Call, SmartHome):
- Extend AbstractFritzClient
- Follow NasService pattern
- Add comprehensive tests
- Document all methods
- Include usage examples
- Maintain backwards compatibility
- Add deprecation warnings for breaking changes
- Update version accordingly
<?php
namespace Four\FritzHttpClient\Tests;
use PHPUnit\Framework\TestCase;
use Four\FritzHttpClient\Services\NasService;
class NasServiceTest extends TestCase
{
public function testFileListParsing(): void
{
// Test implementation
}
}- Test with real FritzBox devices
- Use environment variables for credentials
- Skip tests if no device available
- Clean up test data after tests
- Update version in composer.json
- Update CHANGELOG.md
- Ensure all tests pass
- Create release tag
- Publish to Packagist
All contributions go through code review:
- Keep PRs focused and small
- Respond to feedback promptly
- Update code based on suggestions
- Ensure CI passes
- 💬 GitHub Discussions for questions
- 🐛 GitHub Issues for bugs
- 📧 Email maintainers for security issues
Current priorities:
- File Upload Implementation
- WLAN Service Development
- Call History Service
- Smart Home Device Control
- Documentation Improvements
- Test Coverage Expansion
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for helping make the Four Fritz HTTP Client better! 🎉