|
| 1 | +# Contributing |
| 2 | + |
| 3 | +:+1::tada: First off, thanks for taking the time to contribute! :tada::+1: |
| 4 | + |
| 5 | +The issue tracker is not a support forum. Please keep issues to bug reports and |
| 6 | +enhancement proposals. For general CakePHP support, see |
| 7 | +<https://cakephp.org/pages/get-involved#userSupport>. |
| 8 | + |
| 9 | +## How to Contribute |
| 10 | + |
| 11 | +1. Fork the repository on GitHub and create a feature branch from `master`. |
| 12 | +2. Add tests for any new functionality or bugfix (regression test). |
| 13 | +3. Make sure the quality gates pass (see below). |
| 14 | +4. Submit a pull request with a clear description of what changed and why. |
| 15 | + |
| 16 | +## Development Setup |
| 17 | + |
| 18 | +```bash |
| 19 | +composer install |
| 20 | + |
| 21 | +# Run the plugin migrations |
| 22 | +bin/cake migrations migrate -p Queue |
| 23 | +``` |
| 24 | + |
| 25 | +## Quality Gates |
| 26 | + |
| 27 | +Please run these before submitting (the same checks CI runs): |
| 28 | + |
| 29 | +```bash |
| 30 | +composer test # PHPUnit |
| 31 | +composer stan # PHPStan (run `composer stan-setup` once first) |
| 32 | +composer cs-check # Coding standards (`composer cs-fix` to auto-fix) |
| 33 | +``` |
| 34 | + |
| 35 | +## Coding Standards |
| 36 | + |
| 37 | +This plugin follows the PSR2R coding standards. Please make sure |
| 38 | +`composer cs-check` is green before opening a pull request. |
| 39 | + |
| 40 | +## Updating the Locale POT File |
| 41 | + |
| 42 | +If you change any translatable strings, refresh the plugin's POT file by |
| 43 | +running this from your application directory: |
| 44 | + |
| 45 | +```bash |
| 46 | +bin/cake i18n extract --plugin Queue --extract-core=no --merge=no --overwrite |
| 47 | +``` |
| 48 | + |
| 49 | +## Running MySQL Tests |
| 50 | + |
| 51 | +By default the suite uses SQLite (works out of the box). Not all tests run on |
| 52 | +SQLite or other non-MySQL databases yet. To run the full suite including the |
| 53 | +MySQL-only tests: |
| 54 | + |
| 55 | +```bash |
| 56 | +export DB_CLASS=Mysql |
| 57 | +export DB_URL="mysql://root:yourpwd@127.0.0.1/cake_test" |
| 58 | +vendor/bin/phpunit |
| 59 | +``` |
| 60 | + |
| 61 | +Make sure the `cake_test` database exists. |
| 62 | + |
| 63 | +## Pull Request Guidelines |
| 64 | + |
| 65 | +- Write clear, descriptive commit messages. |
| 66 | +- Keep each pull request focused on a single feature or bug fix. |
| 67 | +- Update the README/docs when you change user-facing behavior. |
| 68 | + |
| 69 | +## Questions? |
| 70 | + |
| 71 | +Open an issue for discussion if anything is unclear. |
0 commit comments