Skip to main content
Version: CANARY 🚧

Contribution

Introduction​

All contributions are welcome! Contributing to BowPHP is a great way to grow your skills and help the community.

Discuss first

Before starting any significant work, create an issue on GitHub to discuss your proposal with the maintainers.

Main repositories​

RepositoryDescription
bowphp/frameworkFramework core
bowphp/appSkeleton application
bowphp/docsDocumentation

Contribution process​

1. Fork and clone​

# Fork the project on GitHub, then clone it
git clone https://github.com/VOTRE-USERNAME/framework.git
cd framework

# Add the upstream repository
git remote add upstream https://github.com/bowphp/framework.git

2. Create a branch​

# Sync with upstream
git fetch upstream
git checkout -b feat/ma-fonctionnalite upstream/5.x

Naming conventions:

  • feat/description - New feature
  • fix/description - Bug fix
  • docs/description - Documentation
  • refactor/description - Refactoring

3. Develop​

# Install dependencies
composer install

# Run the tests during development
composer test

# Readable format with testdox (method names as sentences)
composer testdox

4. Commit​

Use the Conventional Commits convention:

# Format: type(scope): description
git commit -m "feat(auth): add OAuth2 support for Google"
git commit -m "fix(session): resolve token expiration issue"
git commit -m "docs(readme): update installation instructions"

Available types:

  • feat - New feature
  • fix - Bug fix
  • docs - Documentation
  • refactor - Refactoring with no functional change
  • test - Adding/modifying tests
  • chore - Maintenance (dependencies, CI, etc.)
note

Commit messages must be written in English.

5. Submit the Pull Request​

# Push the branch
git push origin feat/ma-fonctionnalite

On GitHub, create a Pull Request with:

  • A clear title following Conventional Commits
  • A description of the changes
  • A reference to the related issue (e.g. Fixes #123)

Rules​

Pull Requests​

  • One PR per feature: Separate independent changes
  • Tests required: Every new feature must be tested
  • Documentation: Update the docs if needed
  • Versioning: Follow SemVer for major changes

Code quality​

# Check the style (read-only, fails on PSR-12 deviations)
composer phpcs

# Automatically fix style deviations
composer phpcbf

# Run all tests
composer test

# Static analysis (PHPStan is in require-dev)
vendor/bin/phpstan analyse src

Standards​

  • PHP 8.1+
  • PSR-12 for code style (checked by phpcs, fixed by phpcbf)
  • PHPDoc for public methods
  • Unit tests with PHPUnit (configuration: phpunit.dist.xml)

Commit examples​

# Simple feature
git commit -m "feat(http): add support for PATCH requests"

# Bug fix
git commit -m "fix(routing): handle trailing slashes correctly"

# Commit with a detailed description
git commit
feat(auth): implement JWT authentication

- Add JwtGuard for token-based authentication
- Support token refresh and revocation
- Add middleware for protected routes

Closes #42

Code of conduct​

Respect the code of conduct in all your interactions.

Resources​

Is something missing?

If you run into problems with the documentation or have suggestions to improve the documentation or the project in general, please open an issue for us, or send a tweet mentioning the Twitter account @bowframework or directly on github.