Skip to content

Commit ad4d734

Browse files
Enhance issue templates and documentation for better user guidance and contribution process. (#3)
1 parent 3dd8c12 commit ad4d734

8 files changed

Lines changed: 213 additions & 29 deletions

File tree

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,60 @@
11
---
2-
name: 🐛 Bug Report
3-
description: Let us know about problem
2+
name: Bug Report
3+
description: Report a bug to help us improve.
4+
labels: ["bug"]
45
body:
56
- type: markdown
67
attributes:
78
value: |
8-
> ⚠️ DON'T CREATE SECURITY ISSUE here. For security vulnerabilities, please use the security advisory feature in the specific project repository instead.
9+
> For security vulnerabilities, do not open a public issue. Use the
10+
> [security advisory](https://docs.github.com/en/code-security/security-advisories) feature
11+
> in the affected repository instead.
912
- type: textarea
10-
id: description
13+
id: steps-to-reproduce
1114
attributes:
12-
label: Description
13-
description: Provide a detailed description of the issue. Include all relevant information to help us understand and reproduce the problem.
15+
label: Steps to reproduce
16+
description: Provide a minimal set of steps to reproduce the issue.
17+
placeholder: |
18+
1. Install package version X.
19+
2. Call method Y with arguments Z.
20+
3. Observe the error.
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: expected-behavior
25+
attributes:
26+
label: Expected behavior
27+
description: Describe what you expected to happen.
28+
validations:
29+
required: true
30+
- type: textarea
31+
id: actual-behavior
32+
attributes:
33+
label: Actual behavior
34+
description: Describe what actually happened. Include error messages or stack traces if available.
1435
validations:
1536
required: true
1637
- type: input
1738
id: package-version
1839
attributes:
1940
label: Package version
20-
description: Specify the exact package version you're using
41+
description: Specify the exact package version you are using.
2142
placeholder: "0.1.0"
2243
validations:
2344
required: true
2445
- type: input
2546
id: php-version
2647
attributes:
2748
label: PHP version
28-
description: Specify the exact PHP version you're using (run `php -v` to check)
29-
placeholder: "8.5.0"
49+
description: Specify the exact PHP version you are using (run `php -v` to check).
50+
placeholder: "8.1.0"
3051
validations:
3152
required: true
53+
- type: input
54+
id: operating-system
55+
attributes:
56+
label: Operating system
57+
description: Specify your operating system and version (optional).
58+
placeholder: "Ubuntu 24.04 / macOS 15 / Windows 11"
59+
validations:
60+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security Vulnerabilities
4+
url: https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability
5+
about: Do not open a public issue for security vulnerabilities. Use GitHub Security Advisories in the affected repository.
6+
- name: Questions and Discussions
7+
url: https://github.com/orgs/php-forge/discussions
8+
about: Use GitHub Discussions for questions, ideas, and general conversation.
Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,33 @@
11
---
2-
name: 🚀 Feature request
3-
description: Suggest an idea for improvement
2+
name: Feature Request
3+
description: Suggest a new feature or improvement.
4+
labels: ["enhancement"]
45
body:
56
- type: textarea
7+
id: use-case
68
attributes:
7-
label: Proposed new feature or change
8-
description: |
9-
Describe the feature and explain why it's needed.
9+
label: Use case
10+
description: Describe the problem or need that this feature would address.
1011
validations:
1112
required: true
13+
- type: textarea
14+
id: proposed-solution
15+
attributes:
16+
label: Proposed solution
17+
description: Describe the solution you would like to see implemented.
18+
validations:
19+
required: true
20+
- type: textarea
21+
id: alternatives-considered
22+
attributes:
23+
label: Alternatives considered
24+
description: Describe any alternative solutions or workarounds you have considered.
25+
validations:
26+
required: false
27+
- type: textarea
28+
id: additional-context
29+
attributes:
30+
label: Additional context
31+
description: Add any other context, code examples, or references relevant to the request.
32+
validations:
33+
required: false

CONTRIBUTING.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Contributing to PHP Forge
2+
3+
Thank you for your interest in contributing. Please read this guide before submitting issues or pull requests.
4+
5+
By participating in this project, you agree to abide by the [Code of Conduct](CODE_OF_CONDUCT.md).
6+
7+
## Development Environment
8+
9+
**Requirements:**
10+
11+
- PHP 8.1 or higher.
12+
- [Composer](https://getcomposer.org/) 2.x.
13+
14+
**Setup:**
15+
16+
```bash
17+
git clone https://github.com/php-forge/<package>.git
18+
cd <package>
19+
composer install
20+
composer test
21+
```
22+
23+
## Coding Standards
24+
25+
All PHP code must follow these standards:
26+
27+
- **PER 3.0 + PSR-12** coding style.
28+
- `declare(strict_types=1)` in every PHP file.
29+
- Strong typing: use type declarations for parameters, return types, and properties.
30+
- Use [php-forge/coding-standard](https://github.com/php-forge/coding-standard) for automated style checks.
31+
32+
## Testing
33+
34+
- All tests use **PHPUnit 10+**.
35+
- Target **100% code coverage** for new code.
36+
- Run the test suite before submitting a pull request:
37+
38+
```bash
39+
composer test
40+
```
41+
42+
## Pull Request Process
43+
44+
1. Fork the repository and create a feature branch from `main`.
45+
2. Make your changes in small, focused commits.
46+
3. Use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for commit messages.
47+
4. One logical change per pull request.
48+
5. Ensure all tests pass and coding standards are met.
49+
6. Open a pull request against `main` with a clear description of the change.
50+
51+
## Bug Reports and Feature Requests
52+
53+
- **Bug reports**: Use the [Bug Report](https://github.com/php-forge/.github/issues/new?template=bug-report.yml) template.
54+
- **Feature requests**: Use the [Feature Request](https://github.com/php-forge/.github/issues/new?template=feature-request.yml) template.
55+
56+
## Security Vulnerabilities
57+
58+
Do not open public issues for security vulnerabilities. See [SECURITY.md](SECURITY.md) for reporting instructions.

PULL_REQUEST_TEMPLATE.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Pull Request
22

3-
| Q | A |
4-
| ------------ | ------------------------------------------------------------------ |
5-
| Is bugfix? | ✔️/❌ |
6-
| New feature? | ✔️/❌ |
7-
| Breaks BC? | ✔️/❌ |
8-
| Fixed issues | <!-- comma-separated list of tickets # fixed by the PR, if any --> |
3+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
4+
- [ ] Bugfix (non-breaking change that fixes an issue)
5+
- [ ] CI/build configuration
6+
- [ ] Documentation update
7+
- [ ] New feature (non-breaking change that adds functionality)
8+
- [ ] Refactoring (no functional changes)
9+
10+
## Related Issues
11+
12+
<!-- Reference related issues: Fixes #123, Closes #456 -->

SECURITY.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
**Do not open a public issue for security vulnerabilities.**
6+
7+
Use the GitHub Security Advisories feature in the affected repository to report vulnerabilities privately:
8+
9+
1. Navigate to the affected repository (e.g., `https://github.com/php-forge/<package>`).
10+
2. Go to the **Security** tab.
11+
3. Click **Report a vulnerability**.
12+
4. Provide a detailed description including steps to reproduce, impact, and any suggested fix.
13+
14+
For more information, see [Privately reporting a security vulnerability](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability).
15+
16+
## Supported Versions
17+
18+
Security fixes are applied to the latest release of each package. Older versions do not receive security updates.
19+
20+
## Response Timeline
21+
22+
- **Acknowledgment**: Within 48 hours of the report.
23+
- **Assessment**: Within 7 days, an initial assessment and plan of action.
24+
- **Fix and disclosure**: A fix is developed, tested, and released before public disclosure.
25+
26+
## Scope
27+
28+
This policy applies to all repositories under the [php-forge](https://github.com/php-forge) organization.

SUPPORT.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Support
2+
3+
## Getting Help
4+
5+
- **Bug reports**: [Open a bug report](https://github.com/php-forge/.github/issues/new?template=bug-report.yml).
6+
- **Feature requests**: [Open a feature request](https://github.com/php-forge/.github/issues/new?template=feature-request.yml).
7+
- **Security vulnerabilities**: See [SECURITY.md](SECURITY.md). Do not open public issues.
8+
9+
## Package Documentation
10+
11+
| Package | Repository |
12+
| --------------- | ------------------------------------------------------------------------- |
13+
| coding-standard | [php-forge/coding-standard](https://github.com/php-forge/coding-standard) |
14+
| foxy | [php-forge/foxy](https://github.com/php-forge/foxy) |
15+
| helper | [php-forge/helper](https://github.com/php-forge/helper) |
16+
| support | [php-forge/support](https://github.com/php-forge/support) |
17+
18+
## Commercial Support
19+
20+
For commercial support inquiries, consider [sponsoring the project](https://github.com/sponsors/terabytesoftw).

profile/README.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,33 @@
1-
# PHP Forge: Code Craftsmanship for Reliability
1+
<!-- markdownlint-disable MD041 -->
2+
<div align="center">
3+
4+
# PHP Forge
5+
6+
**Code Craftsmanship for Reliability**
7+
8+
Foundational, framework-agnostic tools that power the next generation of PHP applications.
29

3-
**PHP Forge** houses the foundational, framework-agnostic tools that power the next generation of PHP applications.
10+
</div>
11+
<!-- markdownlint-disable MD041 -->
12+
13+
---
414

5-
## 🔨 Our Philosophy
15+
## Philosophy
616

7-
- **Zero Dependencies:** Libraries that stand on their own.
8-
- **Battle Tested:** 100% Code Coverage.
9-
- **Strict Standards:** Strongly typed PHP and strict mode enabled.
17+
- **Zero Dependencies** -- Libraries that stand on their own.
18+
- **Battle Tested** -- 100% code coverage across all packages.
19+
- **Strict Standards** -- Strongly typed PHP with strict mode enabled.
1020

11-
## 🛠️ The Toolset
21+
## Packages
1222

13-
- **[Foxy](https://github.com/php-forge/foxy):** Fast, reliable, and secure BUN/NPM/Yarn/PNpM bridge for Composer.
23+
| Package | Description |
24+
| --------------------------------------------------------------- | -------------------------------------------- |
25+
| [coding-standard](https://github.com/php-forge/coding-standard) | Coding standards for PHP projects. |
26+
| [foxy](https://github.com/php-forge/foxy) | BUN/NPM/Yarn/PNPM bridge for Composer. |
27+
| [helper](https://github.com/php-forge/helper) | Small, focused helpers for common PHP tasks. |
28+
| [support](https://github.com/php-forge/support) | Support utilities for enhanced testing. |
1429

15-
## 🌐 Part of the Ecosystem
30+
## Part of the Ecosystem
1631

1732
Maintained by the core team of [yii2-framework](https://github.com/yii2-framework) and [yii2-extensions](https://github.com/yii2-extensions).
1833

0 commit comments

Comments
 (0)