|
| 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. |
0 commit comments