2021-10-13 13:11:14 +00:00
# How to Contribute
2021-07-19 20:57:26 +00:00
2022-04-12 08:58:57 +00:00
Contributions here are more than welcomed! You can contribute to [rector-src ](https://github.com/rectorphp/rector-src ) repository or one of [extension packages ](https://github.com/rectorphp/ ).
2021-07-19 20:57:26 +00:00
2021-10-13 13:11:14 +00:00
## Preparing Local Environment
2021-10-13 13:07:27 +00:00
2022-04-12 08:58:57 +00:00
1. Fork the [rector/rector-src ](https://github.com/rectorphp/rector-src ) repository and clone it
2021-10-13 13:07:27 +00:00
```bash
2022-04-12 09:00:20 +00:00
git clone git@github .com:< your-name > /rector-src.git
2022-04-12 08:58:57 +00:00
cd rector-src
2021-10-13 13:11:14 +00:00
```
2021-10-13 13:07:27 +00:00
2024-02-16 16:33:51 +00:00
2. We use PHP 8.2 and composer
2021-10-13 13:07:27 +00:00
2022-06-10 05:55:49 +00:00
Install dependencies and verify your local environment:
2021-10-13 13:07:27 +00:00
2021-10-13 13:11:14 +00:00
```bash
2022-04-12 08:58:57 +00:00
composer update
2022-06-10 05:55:49 +00:00
composer check-platform-reqs
2021-10-13 13:11:14 +00:00
```
2022-04-12 08:58:57 +00:00
*Note: using Docker for contributing is strongly discouraged, as it requires [extra knowledge of composer internals ](https://github.com/composer/composer/issues/9368#issuecomment-718112361 ).*
Then you can start working with the code :+1:
< br >
2023-03-26 11:59:34 +00:00
Do you want to **contribute a failing test** ? [This tutorial will show you how ](https://getrector.com/documentation/reporting-issue-with-rector )
2021-10-13 13:11:14 +00:00
## Preparing Pull Request
2021-10-13 13:07:27 +00:00
2022-08-19 07:22:29 +00:00
3 steps will make your pull-request easy to merge:
2021-07-19 20:57:26 +00:00
- **1 feature per pull-request**
- **new features need tests**
- CI must pass... you can mimic it locally by running
```bash
composer complete-check
```
- Do you need to fix coding standards?
```bash
composer fix-cs
```
2021-10-13 13:11:14 +00:00
We would be happy to accept PRs that follow these guidelines.
2022-09-04 15:50:34 +00:00
## Repository layout
Documentation goes into `build/target-repository/docs` .