|
| 1 | +<!-- |
| 2 | +SPDX-FileCopyrightText: (c) Respect Project Contributors |
| 3 | +SPDX-License-Identifier: MIT |
| 4 | +--> |
| 5 | + |
| 6 | +# Contributing |
| 7 | + |
| 8 | +Contributions to Respect\ValidationBundle are always welcome. You make our lives |
| 9 | +easier by sending us your contributions through [pull requests][]. |
| 10 | + |
| 11 | +Due to time constraints, we are not always able to respond as quickly as we |
| 12 | +would like. Please do not take delays personally. |
| 13 | + |
| 14 | +Before writing anything, feature or bug fix: |
| 15 | + |
| 16 | +- Check if there is already an issue related to it (opened or closed) and if |
| 17 | + someone is already working on that; |
| 18 | + - If there is not, [open an issue][] and notify everybody that you're going |
| 19 | + to work on that; |
| 20 | + - If there is, create a comment to notify everybody that you're going to |
| 21 | + work on that. |
| 22 | +- Make sure that what you need is not done yet. |
| 23 | + |
| 24 | +This bundle is intentionally small: it wires |
| 25 | +[Respect\Validation](https://github.com/Respect/Validation) into a Symfony |
| 26 | +application's service container. New validation rules belong in the |
| 27 | +[Respect\Validation](https://github.com/Respect/Validation) library, not here. |
| 28 | +If you want to make a new rule available to your Symfony app without contributing |
| 29 | +it upstream, add your namespace via the `rule_namespaces` configuration option |
| 30 | +documented in the README. |
| 31 | + |
| 32 | +## Scope of contributions |
| 33 | + |
| 34 | +Changes that belong in this repository: |
| 35 | + |
| 36 | +- Bundle wiring (`src/`, `config/`) for new services Respect\Validation exposes. |
| 37 | +- Configuration options that influence how Validation services are constructed. |
| 38 | +- Tests covering the bundle's integration with Symfony. |
| 39 | +- Tooling, CI, and documentation for the bundle itself. |
| 40 | + |
| 41 | +Changes that should go to [Respect\Validation](https://github.com/Respect/Validation): |
| 42 | + |
| 43 | +- New validation rules. |
| 44 | +- Changes to existing validation rules' behaviour. |
| 45 | +- Changes to `ValidatorBuilder`, `ValidatorFactory`, or any class under |
| 46 | + `Respect\Validation\*`. |
| 47 | + |
| 48 | +## Running Checks |
| 49 | + |
| 50 | +After running `composer install` in the bundle's root directory you must run |
| 51 | +`composer qa`. |
| 52 | + |
| 53 | +This alias runs PHP_CodeSniffer, PHPStan, and PHPUnit. All three must pass. |
| 54 | + |
| 55 | +Check the `scripts` section of `composer.json` for the individual commands. |
| 56 | + |
| 57 | +[open an issue]: https://github.com/Respect/ValidationBundle/issues |
| 58 | +[pull requests]: https://help.github.com/pull-requests "GitHub pull requests" |
0 commit comments