Skip to content

Contributing

Arthu Santiago edited this page Nov 30, 2026 · 1 revision

Contributing

Contributions are welcome: bug reports, ideas and code. This page explains how to propose a change so it gets reviewed quickly: start with an issue, work on a branch of your fork, run the checks, and open a pull request with the template filled in.

1. Start with an issue

Open an issue before writing code, using one of the templates: Report de bug (bug report) or Nova funcionalidade (feature request). It's the place to agree on whether and how the change should be made, before anyone spends time on it. Issues and pull requests can be written in English or Portuguese.

Warning

Security problems don't go in issues. See Reporting a Vulnerability.

2. Fork and branch

Fork the repository on GitHub, then clone your fork and create a branch for the change. Replace YOUR_USER with your GitHub user:

git clone https://github.com/YOUR_USER/KeyAnyWhere.git keyanywhere
cd keyanywhere && git checkout -b fix/short-description

Set up the environment as in the Quick Start and Development Environment.

3. Make the change

Keep the project's principles in mind: security before convenience, and only the essential features. In practice:

  • Follow the existing code: identifiers and messages in Portuguese, PSR-12 plus the CakePHP coding standard.
  • Every change comes with tests. A bug fix comes with a test that fails without the fix.
  • New interface text comes with its Spanish translation (Translations).
  • Respect the layers (Architecture), and prefer extending over changing existing classes.
  • Depend only on public Packagist packages.

4. Run the checks

These are the checks CI runs. The pull request is only reviewed once they pass.

composer check
composer analise
composer mutacao:alteracoes

5. Open the pull request

Push the branch and open a pull request against main. The template asks:

  • O que foi feito (What was done): the change and why.
  • Two checks about design principles: whether you changed existing classes instead of extending them (Open/Closed), and whether an interface or trait forces implementers to write what they don't use (Interface Segregation). Answer them, and explain when the answer is yes.
  • Link da issue (Issue link).

CI runs the tests, code quality (Code Quality) and security checks on PostgreSQL 18. If the quality job fails because a metric improved, update qualidade-referencia.json with the values from the job summary.

Other ways to help

Clone this wiki locally