[README] init

This commit is contained in:
TomasVotruba 2017-07-15 19:20:20 +02:00
parent 466e284524
commit 7c62780a54
3 changed files with 52 additions and 4 deletions

View File

@ -15,10 +15,10 @@ script:
# run tests
- vendor/bin/phpunit $PHPUNIT_FLAGS
# check coding standard (defined in composer.json "scripts" section)
# if this fails, run "composer fix-cs" to fix all fixable issues
# - composer check-cs
# if this fails, run "composer fs" to fix all fixable issues
- composer cs
# check with phpstan (defined in composer.json "scripts" section)
- composer phpstan
- composer ps
after_script:
# upload coverage.xml file to Coveralls to analyze it

45
README.md Normal file
View File

@ -0,0 +1,45 @@
# Rector - Reconstruct your Legacy Code to Modern Codebase
[![Build Status](https://img.shields.io/travis/TomasVotruba/Rector/master.svg?style=flat-square)](https://travis-ci.org/TomasVotruba/Rector)
[![Coverage Status](https://img.shields.io/coveralls/TomasVotruba/Rector/master.svg?style=flat-square)](https://coveralls.io/github/TomasVotruba/Rector?branch=master)
This tool will *reconstruct* (change) your code - **run it only in a new clean git branch**.
## All Reconstructors
- `InjectAnnotationToConstructorReconstructor`
## Install
```bash
composer require rector/rector --dev
```
## Use
```bash
vendor/bin/rector reconstruct src
```
### How to Contribute
Just follow 3 rules:
- **1 feature per pull-request**
- **New feature needs tests**. [Coveralls.io](https://coveralls.io/) checks code coverage under every PR.
- Tests, coding standard and PHPStan **checks must pass**
```bash
composer all
```
Often you don't need to fix coding standard manually, just run:
```bash
composer fs
```
We would be happy to merge your feature then.

View File

@ -29,6 +29,9 @@
}
},
"scripts": {
"phpstan": "phpstan analyse src tests --level 7"
"all": ["phpunit", "@cs", "@ps"],
"cs": "ecs check src tests",
"fs": "ecs check src tests --fix",
"ps": "phpstan analyse src tests --level 7"
}
}