🤝 Contributing to PhPstrap

Thanks for helping improve PhPstrap! This guide explains how to report issues, propose features, submit pull requests, write modules, and improve docs.

New here? Start with Installation, then read the Project Structure and Module Development.

1) Project Values


2) Ways to Help


3) Issues: Bugs & Feature Requests

Open an issue on GitHub with:

Include code blocks, not screenshots, for stack traces. Redact credentials.

4) Local Dev Setup

  1. Fork the repo on GitHub and clone your fork.
git clone https://github.com/<you>/phpstrap.git
cd phpstrap
  1. (Optional) Install dev tools via Composer if the repo provides them.
composer install
  1. Create DB and copy config, then edit credentials.
cp includes/config.sample.php includes/config.php
# update DB_*, BASE_URL, etc.
  1. Run installer at http://localhost:8000/install.php (or your vhost).
  2. Serve locally:
php -S localhost:8000 -t .

5) Coding Standards

Formatting tools (if present):

# Examples (only if configured in the repo)
composer phpcs
composer phpstan
composer fix

6) Git Workflow

  1. Forkfeature branch → PR to main.
  2. Keep PRs focused and small; one topic per PR.
  3. Use Conventional Commits for messages: feat: add admin cache clear tool, fix: sanitize module title.
  4. Rebase onto latest main before opening/updating PRs.

7) Pull Request Checklist


8) Module Contributions

Modules live under /modules/<name> or as separate repos. Minimum scaffold:

modules/
  my-module/
    module.php
    routes.php
    migrations/
    views/
    assets/
    README.md

Recommended modules.json entry:

[
  {
    "name": "my-module",
    "title": "My Module",
    "version": "1.0.0",
    "author": "Your Name",
    "description": "What it does",
    "url": "https://github.com/YourOrg/my-module",
    "requires_php": ">=8.0",
    "requires_phpstrap": ">=1.0.0"
  }
]

9) Documentation Changes


10) Testing


11) Security Policy

Please do not file public issues for security vulnerabilities.

12) Releases & Versioning


13) License

By contributing, you agree that your contributions will be licensed under the project’s license (see License).


14) Community

Thanks for helping make PhPstrap better. We ❤️ your contributions!