From 7c62780a542514dc78d69bd41910d5058918c3ad Mon Sep 17 00:00:00 2001 From: TomasVotruba Date: Sat, 15 Jul 2017 19:20:20 +0200 Subject: [PATCH] [README] init --- .travis.yml | 6 +++--- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ composer.json | 5 ++++- 3 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 README.md diff --git a/.travis.yml b/.travis.yml index a474883911d..6c513ae2509 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/README.md b/README.md new file mode 100644 index 00000000000..f19ffb982ff --- /dev/null +++ b/README.md @@ -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. diff --git a/composer.json b/composer.json index 1209bf1f0d7..06f1592a64b 100644 --- a/composer.json +++ b/composer.json @@ -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" } }