|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Thank you for considering contributing to `hyperf-opentelemetry`! 🎉 |
| 4 | + |
| 5 | +We welcome contributions of all kinds: bug fixes, new features, documentation improvements, tests, and discussions. |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Getting started |
| 10 | + |
| 11 | +1. **Fork** the repository and create a new branch from `main`: |
| 12 | +```bash |
| 13 | +git checkout -b feat/your-feature-name |
| 14 | +``` |
| 15 | + |
| 16 | +2. Install dependencies and run tests: |
| 17 | +```bash |
| 18 | +composer install |
| 19 | +composer test |
| 20 | +``` |
| 21 | + |
| 22 | +3. Follow code style guidelines: |
| 23 | +- PHP: PSR-12 |
| 24 | +- Strict typing when possible |
| 25 | +- Avoid creating unnecessary root spans; ensure proper context propagation |
| 26 | + |
| 27 | +--- |
| 28 | + |
| 29 | +## Issues |
| 30 | +- Use labels: bug, enhancement, question, performance, docs, good first issue, help wanted. |
| 31 | +- When opening an issue, include: |
| 32 | + - Steps to reproduce |
| 33 | + - Current vs. expected behavior |
| 34 | + - Environment (PHP, Hyperf, OS, library version) |
| 35 | + - Relevant logs/stack traces |
| 36 | + |
| 37 | +--- |
| 38 | + |
| 39 | +## Pull Requests |
| 40 | + |
| 41 | +- Use Conventional Commits for PR titles (e.g., feat: add SQS aspect, fix: redis connection span leak). |
| 42 | +- Include tests whenever possible. |
| 43 | +- Update README/Docs if the change impacts usage or configuration. |
| 44 | +- Checklist before submitting: |
| 45 | + - [ ] All tests passing (composer test) |
| 46 | + - [ ] Code style/lint OK |
| 47 | + - [ ] Reasonable coverage for new code |
| 48 | + - [ ] Documentation updated if necessary |
| 49 | + - [ ] No breaking changes (or clearly documented) |
| 50 | + |
| 51 | +--- |
| 52 | + |
| 53 | +## Branches & Releases |
| 54 | + |
| 55 | +- main: stable branch |
| 56 | +- `feat/*`, `fix/*`, `chore/*`: development branches |
| 57 | +- Versioning follows Semantic Versioning (SemVer): |
| 58 | + - `MAJOR.MINOR.PATCH` |
| 59 | +- Releases include changelogs (see GitHub Releases) |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | +## Communication |
| 64 | + |
| 65 | +- Slack channel: #hyperf-opentelemetry |
| 66 | +- Technical discussions: GitHub Issues or Discussions |
0 commit comments