From e1f36f70c38656e6bf1709e6857df487da64e43a Mon Sep 17 00:00:00 2001 From: Hafiz Muhammad Moaz Date: Wed, 22 Jul 2026 15:19:17 +0500 Subject: [PATCH] chore: add community health files Add CONTRIBUTING.md, CODE_OF_CONDUCT.md, GitHub issue forms (bug report, feature request, documentation) and a pull request template, plus SECURITY.md where it was missing. Co-Authored-By: Claude Opus 4.8 --- .github/ISSUE_TEMPLATE/bug_report.yml | 96 +++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 11 ++ .github/ISSUE_TEMPLATE/documentation.yml | 35 +++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 55 ++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 32 ++++++ CODE_OF_CONDUCT.md | 59 +++++++++++ CONTRIBUTING.md | 113 +++++++++++++++++++++ 7 files changed, 401 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/documentation.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..4d735fc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,96 @@ +name: Bug report +description: Report something that is broken or behaves incorrectly. +title: "[Bug]: " +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting a bug. + + **Do not report security vulnerabilities here.** See SECURITY.md and email + `thewebisters@gmail.com` instead. + + - type: checkboxes + id: checks + attributes: + label: Before you start + options: + - label: I searched existing issues and this is not a duplicate. + required: true + - label: I am using a supported version (latest or LTS). + required: true + + - type: textarea + id: description + attributes: + label: What happened? + description: A clear description of the bug. + validations: + required: true + + - type: textarea + id: expected + attributes: + label: What did you expect to happen? + validations: + required: true + + - type: textarea + id: reproduce + attributes: + label: Steps to reproduce + description: Minimal steps or a code snippet that reproduces the problem. + placeholder: | + 1. ... + 2. ... + 3. ... + render: markdown + validations: + required: true + + - type: textarea + id: logs + attributes: + label: Error output + description: Stack trace, exception message, or log excerpt. Pasted text is auto-formatted, no backticks needed. + render: shell + validations: + required: false + + - type: input + id: php-version + attributes: + label: PHP version + placeholder: "8.3.10" + validations: + required: true + + - type: input + id: package-version + attributes: + label: Package version + description: Output of `composer show webisters/database-extra`. + placeholder: "1.2.0" + validations: + required: true + + - type: dropdown + id: os + attributes: + label: Operating system + options: + - Linux + - macOS + - Windows + - Other + validations: + required: true + + - type: textarea + id: context + attributes: + label: Anything else? + description: Server (nginx/apache/built-in), database version, relevant config. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..4694e04 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: Question or discussion + url: https://github.com/webisters/forum + about: Ask usage questions and discuss ideas here instead of opening an issue. + - name: Documentation + url: https://webisters.com + about: Read the Webisters guides and API reference. + - name: Security vulnerability + url: https://github.com/webisters/database-extra/blob/main/SECURITY.md + about: Report vulnerabilities privately by email, never as a public issue. diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml new file mode 100644 index 0000000..e65daab --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation.yml @@ -0,0 +1,35 @@ +name: Documentation +description: Report missing, unclear, or incorrect documentation. +title: "[Docs]: " +labels: ["documentation"] +body: + - type: input + id: location + attributes: + label: Where is the documentation? + description: URL, file path, or README section. + placeholder: "README.md, Getting started section" + validations: + required: true + + - type: textarea + id: problem + attributes: + label: What is wrong or missing? + validations: + required: true + + - type: textarea + id: suggestion + attributes: + label: Suggested wording or content + validations: + required: false + + - type: checkboxes + id: contribute + attributes: + label: Contribution + options: + - label: I am willing to open a pull request for this. + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..7f31c0f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,55 @@ +name: Feature request +description: Suggest a new feature or an improvement. +title: "[Feature]: " +labels: ["enhancement"] +body: + - type: checkboxes + id: checks + attributes: + label: Before you start + options: + - label: I searched existing issues and this is not a duplicate. + required: true + + - type: textarea + id: problem + attributes: + label: What problem does this solve? + description: Describe the use case, not just the solution. + validations: + required: true + + - type: textarea + id: proposal + attributes: + label: Proposed solution + description: What should the API or behaviour look like? Include a code sketch if you have one. + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternatives considered + description: Workarounds you tried, or other designs you rejected and why. + validations: + required: false + + - type: dropdown + id: breaking + attributes: + label: Would this break backwards compatibility? + options: + - "No" + - "Yes" + - "Not sure" + validations: + required: true + + - type: checkboxes + id: contribute + attributes: + label: Contribution + options: + - label: I am willing to open a pull request for this. + required: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ff94d41 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,32 @@ + + +## Summary + + + +## Related issue + +Closes # + +## Type of change + +- [ ] Bug fix +- [ ] New feature +- [ ] Documentation +- [ ] Refactor / internal change +- [ ] Build, CI, or tooling + +## Checklist + +- [ ] I read [CONTRIBUTING.md](../CONTRIBUTING.md) +- [ ] `vendor/bin/phpunit` passes locally +- [ ] `vendor/bin/php-cs-fixer fix --dry-run --diff` reports no violations +- [ ] Tests were added or updated for this change +- [ ] Documentation (README or docs) was updated where needed +- [ ] This change is backwards compatible (if not, describe the break below) + +## Backwards compatibility notes + + + +None diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..6ed1346 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,59 @@ +# Code of Conduct + +## Our pledge + +We as members, contributors, and maintainers pledge to make participation in the +Webisters community a harassment-free experience for everyone, regardless of age, +body size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our standards + +Examples of behaviour that contributes to a positive environment: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility, apologising to those affected by our mistakes, and + learning from the experience +- Focusing on what is best for the community + +Examples of unacceptable behaviour: + +- Sexualised language or imagery, and sexual attention or advances of any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, + without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a professional + setting + +## Enforcement responsibilities + +Maintainers are responsible for clarifying and enforcing these standards and will +take appropriate and fair corrective action in response to any behaviour they deem +inappropriate, threatening, offensive, or harmful. Maintainers may remove, edit, or +reject comments, commits, code, issues, and other contributions that are not aligned +with this Code of Conduct. + +## Scope + +This Code of Conduct applies within all community spaces (repositories, issues, pull +requests, discussions) and also when an individual is officially representing the +community in public spaces. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported +to the maintainers at `thewebisters@gmail.com`. All complaints will be reviewed and +investigated promptly and fairly. Maintainers are obligated to respect the privacy +and security of the reporter of any incident. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +https://www.contributor-covenant.org/version/2/1/code_of_conduct.html + +[homepage]: https://www.contributor-covenant.org diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..3a3f95c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,113 @@ +# Contributing to Webisters Database Extra + +Thanks for taking the time to contribute. This guide covers how to report issues, +propose changes, and get a pull request merged. + +By participating you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md). + +## Ways to contribute + +- Report a bug (use the **Bug report** issue template) +- Request a feature (use the **Feature request** issue template) +- Improve documentation (use the **Documentation** issue template) +- Pick up an issue labelled `good first issue` or `help wanted` + +Before starting work on an existing issue, comment on it and wait to be assigned so +two people do not do the same work. + +## Reporting security issues + +Do **not** open a public issue for security vulnerabilities. Follow +[SECURITY.md](SECURITY.md) and email `thewebisters@gmail.com` instead. + +## Requirements + +- PHP >= 8.2 +- Composer 2.x +- Extensions: `intl`, `sodium`, `gd`, `json`, `fileinfo`, `curl`, `mysqli`, + `simplexml`, `dom`, `libxml` +- MariaDB/MySQL if you are running database-backed tests + +## Getting set up + +This repository is a standalone Composer package, so all commands run from the +repository root: + +```bash +git clone https://github.com/webisters/database-extra.git +cd database-extra +composer install +``` + +Run the test suite: + +```bash +vendor/bin/phpunit # everything +vendor/bin/phpunit tests/SomeTest.php # one file +vendor/bin/phpunit --filter testMethodName tests/SomeTest.php +``` + +Check and fix coding style: + +```bash +vendor/bin/php-cs-fixer fix --dry-run --diff # check only +vendor/bin/php-cs-fixer fix # apply fixes +``` + +Webisters is developed as a monorepo of independently versioned packages. If you +have the full monorepo checked out, projects consume libraries as symlinked path +repositories through `composer.local.json`; set `COMPOSER=composer.local.json` +before running Composer to develop against local sources. + +## Coding standard + +Style is centralised in the `webisters/coding-standard` package and enforced by +`.php-cs-fixer.dist.php`. Do not hand-format code; run the fixer. + +- Every PHP file starts with `` namespace; project code uses `App\`, + tests use `Tests\`. +- Match the style of the surrounding code: naming, comment density, and structure. + +## Making a change + +1. Fork the repository and create a branch off `main`: + `git checkout -b fix/short-description` +2. Make focused commits. One logical change per pull request. +3. Add or update tests for any behaviour change. +4. Run the tests and the coding standard fixer before pushing. +5. Update the README or docs if you changed public behaviour. + +### Commit messages + +Use short, imperative subject lines under 72 characters, optionally prefixed with the +area touched: + +``` +routing: fix trailing slash handling in RouteCollection + +Longer explanation of why the change is needed, wrapped at 72 columns. + +Closes #123 +``` + +## Pull requests + +- Fill out the pull request template. +- Link the issue the PR closes (`Closes #123`). +- Keep the PR scoped. Unrelated refactors, formatting sweeps, and dependency bumps + belong in separate PRs. +- CI (tests + coding standard) must be green. +- A maintainer will review; address feedback by pushing new commits rather than force + pushing over the review history where possible. + +## Backwards compatibility + +Webisters packages follow semantic versioning. Changes that break a public API +(signatures, removed methods, changed return types) must be called out explicitly in +the pull request description so they can be scheduled for a major release. + +## Licence + +Contributions are accepted under the MIT licence used by this repository.