diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 3089faf..f22eeec 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -1,23 +1,44 @@ --- -name: 🐛 Bug Report -description: Let us know about problem +name: Bug Report +description: Report a bug to help us improve. +labels: ["bug"] body: - type: markdown attributes: value: | - > ⚠️ DON'T CREATE SECURITY ISSUE here. For security vulnerabilities, please use the security advisory feature in the specific project repository instead. + > For security vulnerabilities, do not open a public issue. Use the + > [security advisory](https://docs.github.com/en/code-security/security-advisories) feature + > in the affected repository instead. - type: textarea - id: description + id: steps-to-reproduce attributes: - label: Description - description: Provide a detailed description of the issue. Include all relevant information to help us understand and reproduce the problem. + label: Steps to reproduce + description: Provide a minimal set of steps to reproduce the issue. + placeholder: | + 1. Install package version X. + 2. Call method Y with arguments Z. + 3. Observe the error. + validations: + required: true + - type: textarea + id: expected-behavior + attributes: + label: Expected behavior + description: Describe what you expected to happen. + validations: + required: true + - type: textarea + id: actual-behavior + attributes: + label: Actual behavior + description: Describe what actually happened. Include error messages or stack traces if available. validations: required: true - type: input id: package-version attributes: label: Package version - description: Specify the exact package version you're using + description: Specify the exact package version you are using. placeholder: "0.1.0" validations: required: true @@ -25,7 +46,15 @@ body: id: php-version attributes: label: PHP version - description: Specify the exact PHP version you're using (run `php -v` to check) - placeholder: "8.5.0" + description: Specify the exact PHP version you are using (run `php -v` to check). + placeholder: "8.1.0" validations: required: true + - type: input + id: operating-system + attributes: + label: Operating system + description: Specify your operating system and version (optional). + placeholder: "Ubuntu 24.04 / macOS 15 / Windows 11" + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..8e54eab --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Security Vulnerabilities + url: https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability + about: Do not open a public issue for security vulnerabilities. Use GitHub Security Advisories in the affected repository. + - name: Questions and Discussions + url: https://github.com/orgs/php-forge/discussions + about: Use GitHub Discussions for questions, ideas, and general conversation. diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index 4b9562f..305072f 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -1,11 +1,33 @@ --- -name: 🚀 Feature request -description: Suggest an idea for improvement +name: Feature Request +description: Suggest a new feature or improvement. +labels: ["enhancement"] body: - type: textarea + id: use-case attributes: - label: Proposed new feature or change - description: | - Describe the feature and explain why it's needed. + label: Use case + description: Describe the problem or need that this feature would address. validations: required: true + - type: textarea + id: proposed-solution + attributes: + label: Proposed solution + description: Describe the solution you would like to see implemented. + validations: + required: true + - type: textarea + id: alternatives-considered + attributes: + label: Alternatives considered + description: Describe any alternative solutions or workarounds you have considered. + validations: + required: false + - type: textarea + id: additional-context + attributes: + label: Additional context + description: Add any other context, code examples, or references relevant to the request. + validations: + required: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..70313ab --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,58 @@ +# Contributing to PHP Forge + +Thank you for your interest in contributing. Please read this guide before submitting issues or pull requests. + +By participating in this project, you agree to abide by the [Code of Conduct](CODE_OF_CONDUCT.md). + +## Development Environment + +**Requirements:** + +- PHP 8.1 or higher. +- [Composer](https://getcomposer.org/) 2.x. + +**Setup:** + +```bash +git clone https://github.com/php-forge/.git +cd +composer install +composer test +``` + +## Coding Standards + +All PHP code must follow these standards: + +- **PER 3.0 + PSR-12** coding style. +- `declare(strict_types=1)` in every PHP file. +- Strong typing: use type declarations for parameters, return types, and properties. +- Use [php-forge/coding-standard](https://github.com/php-forge/coding-standard) for automated style checks. + +## Testing + +- All tests use **PHPUnit 10+**. +- Target **100% code coverage** for new code. +- Run the test suite before submitting a pull request: + +```bash +composer test +``` + +## Pull Request Process + +1. Fork the repository and create a feature branch from `main`. +2. Make your changes in small, focused commits. +3. Use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for commit messages. +4. One logical change per pull request. +5. Ensure all tests pass and coding standards are met. +6. Open a pull request against `main` with a clear description of the change. + +## Bug Reports and Feature Requests + +- **Bug reports**: Use the [Bug Report](https://github.com/php-forge/.github/issues/new?template=bug-report.yml) template. +- **Feature requests**: Use the [Feature Request](https://github.com/php-forge/.github/issues/new?template=feature-request.yml) template. + +## Security Vulnerabilities + +Do not open public issues for security vulnerabilities. See [SECURITY.md](SECURITY.md) for reporting instructions. diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index caa140a..bdab80c 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -1,8 +1,12 @@ # Pull Request -| Q | A | -| ------------ | ------------------------------------------------------------------ | -| Is bugfix? | ✔️/❌ | -| New feature? | ✔️/❌ | -| Breaks BC? | ✔️/❌ | -| Fixed issues | | +- [ ] Breaking change (fix or feature that would cause existing functionality to change) +- [ ] Bugfix (non-breaking change that fixes an issue) +- [ ] CI/build configuration +- [ ] Documentation update +- [ ] New feature (non-breaking change that adds functionality) +- [ ] Refactoring (no functional changes) + +## Related Issues + + diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..1e3d7f4 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,28 @@ +# Security Policy + +## Reporting a Vulnerability + +**Do not open a public issue for security vulnerabilities.** + +Use the GitHub Security Advisories feature in the affected repository to report vulnerabilities privately: + +1. Navigate to the affected repository (e.g., `https://github.com/php-forge/`). +2. Go to the **Security** tab. +3. Click **Report a vulnerability**. +4. Provide a detailed description including steps to reproduce, impact, and any suggested fix. + +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). + +## Supported Versions + +Security fixes are applied to the latest release of each package. Older versions do not receive security updates. + +## Response Timeline + +- **Acknowledgment**: Within 48 hours of the report. +- **Assessment**: Within 7 days, an initial assessment and plan of action. +- **Fix and disclosure**: A fix is developed, tested, and released before public disclosure. + +## Scope + +This policy applies to all repositories under the [php-forge](https://github.com/php-forge) organization. diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 0000000..15c56f6 --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,20 @@ +# Support + +## Getting Help + +- **Bug reports**: [Open a bug report](https://github.com/php-forge/.github/issues/new?template=bug-report.yml). +- **Feature requests**: [Open a feature request](https://github.com/php-forge/.github/issues/new?template=feature-request.yml). +- **Security vulnerabilities**: See [SECURITY.md](SECURITY.md). Do not open public issues. + +## Package Documentation + +| Package | Repository | +| --------------- | ------------------------------------------------------------------------- | +| coding-standard | [php-forge/coding-standard](https://github.com/php-forge/coding-standard) | +| foxy | [php-forge/foxy](https://github.com/php-forge/foxy) | +| helper | [php-forge/helper](https://github.com/php-forge/helper) | +| support | [php-forge/support](https://github.com/php-forge/support) | + +## Commercial Support + +For commercial support inquiries, consider [sponsoring the project](https://github.com/sponsors/terabytesoftw). diff --git a/profile/README.md b/profile/README.md index 22496a6..97d871b 100644 --- a/profile/README.md +++ b/profile/README.md @@ -1,18 +1,33 @@ -# PHP Forge: Code Craftsmanship for Reliability + +
+ +# PHP Forge + +**Code Craftsmanship for Reliability** + +Foundational, framework-agnostic tools that power the next generation of PHP applications. -**PHP Forge** houses the foundational, framework-agnostic tools that power the next generation of PHP applications. +
+ + +--- -## 🔨 Our Philosophy +## Philosophy -- **Zero Dependencies:** Libraries that stand on their own. -- **Battle Tested:** 100% Code Coverage. -- **Strict Standards:** Strongly typed PHP and strict mode enabled. +- **Zero Dependencies** -- Libraries that stand on their own. +- **Battle Tested** -- 100% code coverage across all packages. +- **Strict Standards** -- Strongly typed PHP with strict mode enabled. -## 🛠️ The Toolset +## Packages -- **[Foxy](https://github.com/php-forge/foxy):** Fast, reliable, and secure BUN/NPM/Yarn/PNpM bridge for Composer. +| Package | Description | +| --------------------------------------------------------------- | -------------------------------------------- | +| [coding-standard](https://github.com/php-forge/coding-standard) | Coding standards for PHP projects. | +| [foxy](https://github.com/php-forge/foxy) | BUN/NPM/Yarn/PNPM bridge for Composer. | +| [helper](https://github.com/php-forge/helper) | Small, focused helpers for common PHP tasks. | +| [support](https://github.com/php-forge/support) | Support utilities for enhanced testing. | -## 🌐 Part of the Ecosystem +## Part of the Ecosystem Maintained by the core team of [yii2-framework](https://github.com/yii2-framework) and [yii2-extensions](https://github.com/yii2-extensions).