Skip to main content
We welcome contributions to OpenEyes! This guide covers the process for contributing code, reporting issues, and working with the development team.

Before You Start

If you are thinking of making a contribution to OpenEyes, please contact the team at openeyes@apperta.org before starting work.
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:
If you need to share repositories with the core development team, organizational members are listed at:

Fork and Clone

  1. Fork the repository on GitHub
  2. Clone your fork locally:
  1. 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 from phpcs.xml:
phpcs.xml

PHPStan Static Analysis

Run static analysis:
Configuration (phpstan.neon):

Best Practices

  1. Follow existing patterns - Match the style of surrounding code
  2. Use meaningful names - Variables, methods, and classes should be self-documenting
  3. Comment complex logic - Explain why, not what
  4. Keep methods short - Single responsibility principle
  5. Write tests - All new code should have tests
  6. Use type hints - Where possible in PHP 7.4+
  7. Handle errors - Don’t ignore exceptions

Testing Requirements

All contributions must include appropriate tests.

Required Tests

  1. Unit tests for individual classes/methods
  2. Feature tests for user-facing functionality
  3. 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
See Testing for detailed testing guidelines.

Making Changes

Development Process

  1. Create feature branch from develop
  2. Make your changes following coding standards
  3. Write tests for new functionality
  4. Run tests to ensure nothing breaks
  5. Check code style with phpcs
  6. Commit your changes with clear messages

Commit Messages

Write clear, descriptive commit messages:

Commit Message Format

Types:
  • feat: - New feature
  • fix: - Bug fix
  • refactor: - Code restructuring
  • test: - Adding tests
  • docs: - Documentation
  • style: - Code style changes
Example:

Submitting Changes

Create Pull Request

  1. Push your branch to your fork:
  1. Create Pull Request on GitHub
    • Target the develop branch
    • Fill in the PR template
    • Link any related issues

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:
  1. Functionality - Does it work as intended?
  2. Tests - Are there adequate tests?
  3. Code quality - Is it maintainable?
  4. Security - Are there security implications?
  5. Performance - Does it impact system performance?
  6. Standards - Does it follow coding standards?

Database Changes

If your changes require database modifications:

Create Migration

Migration Structure

Migration Best Practices

  1. Always provide down() - Migrations must be reversible
  2. Test both up and down - Ensure migrations work in both directions
  3. Use OEMigration - Provides OpenEyes-specific helpers
  4. Document changes - Comment complex migrations
  5. Seed data - Include necessary lookup data

Reporting Issues

Report bugs and feature requests through GitHub Issues:

Issue Template

Support vs Issues

GitHub Issues are for bugs and feature requests only. No service level agreement exists for the open source project.
For support:

Documentation

If your changes affect user-facing features:
  1. Update relevant documentation
  2. Add code comments
  3. Update PHPDoc blocks
  4. 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

Resources

Release Process

  1. Features merged to develop
  2. Release branch created from develop
  3. Testing and bug fixes on release branch
  4. Release branch merged to master
  5. Tagged with version number
  6. Merged back to develop
Contributors don’t typically manage releases, but understanding the process helps with planning contributions.

Contributor Recognition

Contributions are recognized in:
  • Git commit history
  • Release notes
  • Project credits
Thank you for contributing to OpenEyes!

Next Steps

Architecture

Understand the system architecture

Module Development

Learn to create modules