Before You Start
This ensures:- Your contribution aligns with project goals
- No duplicate effort with ongoing work
- You have the necessary guidance and support
Getting Started
Repository Access
The main OpenEyes repository is:Fork and Clone
- Fork the repository on GitHub
- Clone your fork locally:
- Add the upstream remote:
Git Workflow
OpenEyes follows the gitflow branching model.Branch Structure
- master - Stable release branch (production-ready code)
- develop - Bleeding edge development (integration branch)
- feature/ - New features
- hotfix/ - Critical fixes for production
- release/ - Release preparation
For bleeding edge development, use the develop branch. For stable releases, use master.
Creating a Feature Branch
Branch Naming
Use descriptive branch names:Coding Standards
OpenEyes follows PSR-12 coding standards with some exceptions.PHP CodeSniffer
Check your code before committing:Code Style Rules
Key rules fromphpcs.xml:
phpcs.xml
PHPStan Static Analysis
Run static analysis:phpstan.neon):
Best Practices
- Follow existing patterns - Match the style of surrounding code
- Use meaningful names - Variables, methods, and classes should be self-documenting
- Comment complex logic - Explain why, not what
- Keep methods short - Single responsibility principle
- Write tests - All new code should have tests
- Use type hints - Where possible in PHP 7.4+
- Handle errors - Don’t ignore exceptions
Testing Requirements
All contributions must include appropriate tests.Required Tests
- Unit tests for individual classes/methods
- Feature tests for user-facing functionality
- Integration tests for module interactions
Running Tests
Test Requirements
- All tests must pass before submitting PR
- New features require new tests
- Bug fixes should include regression tests
- Tag tests with
@group sample-data
Making Changes
Development Process
- Create feature branch from develop
- Make your changes following coding standards
- Write tests for new functionality
- Run tests to ensure nothing breaks
- Check code style with phpcs
- Commit your changes with clear messages
Commit Messages
Write clear, descriptive commit messages:Commit Message Format
feat:- New featurefix:- Bug fixrefactor:- Code restructuringtest:- Adding testsdocs:- Documentationstyle:- Code style changes
Submitting Changes
Create Pull Request
- Push your branch to your fork:
- Create Pull Request on GitHub
- Target the
developbranch - Fill in the PR template
- Link any related issues
- Target the
Pull Request Template
Pull Request Review
Your PR will be reviewed by core maintainers. They may:- Request changes
- Ask questions
- Suggest improvements
- Approve and merge
Be responsive to feedback. PRs with no activity for 30 days may be closed.
Code Review Guidelines
When your code is reviewed, expect feedback on:- Functionality - Does it work as intended?
- Tests - Are there adequate tests?
- Code quality - Is it maintainable?
- Security - Are there security implications?
- Performance - Does it impact system performance?
- Standards - Does it follow coding standards?
Database Changes
If your changes require database modifications:Create Migration
Migration Structure
Migration Best Practices
- Always provide down() - Migrations must be reversible
- Test both up and down - Ensure migrations work in both directions
- Use OEMigration - Provides OpenEyes-specific helpers
- Document changes - Comment complex migrations
- Seed data - Include necessary lookup data
Reporting Issues
Report bugs and feature requests through GitHub Issues:Issue Template
Support vs Issues
For support:- Contact official implementation partners
- See openeyes.apperta.org for partner list
Documentation
If your changes affect user-facing features:- Update relevant documentation
- Add code comments
- Update PHPDoc blocks
- Consider adding examples
Licensing
By contributing, you agree that your contributions will be licensed under: GNU Affero General Public License v3.0 (AGPL-3.0) All contributions must:- Be your original work
- Not violate third-party rights
- Be compatible with AGPL-3.0
Community Guidelines
Be Respectful
- Use welcoming and inclusive language
- Respect differing viewpoints
- Accept constructive criticism gracefully
- Focus on what is best for the community
Be Professional
- Keep discussions on-topic
- Provide constructive feedback
- Help others learn and grow
- Lead by example
Getting Help
Contact Information
- Email: [email protected]
- Twitter: @openeyes_oef
- Website: openeyes.apperta.org
Resources
Release Process
- Features merged to
develop - Release branch created from
develop - Testing and bug fixes on release branch
- Release branch merged to
master - Tagged with version number
- Merged back to
develop
Contributor Recognition
Contributions are recognized in:- Git commit history
- Release notes
- Project credits
Next Steps
Architecture
Understand the system architecture
Module Development
Learn to create modules