From 59ab1a6ea763d8eab40cabf5280b8a790343fe23 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Wed, 28 Feb 2018 19:45:41 -0300 Subject: [PATCH 1/2] Update to PHP-Parser v4 --- README.md | 6 ++---- composer.json | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 029d0e463003..da92eb69af92 100644 --- a/README.md +++ b/README.md @@ -35,13 +35,11 @@ Rector can: ## Install ```bash -composer require --dev rector/rector:'dev-master' nikic/php-parser:'4.0.x-dev' +composer require --dev rector/rector:'dev-master' ``` ### Do you Have Conflicts? -It may also happen your dependencies are in conflict, e.g. [PHPStan](https://github.com/phpstan/phpstan) requires [PHP-Parser](https://github.com/nikic/PHP-Parser) version 3, or older PHPUnit etc. This might be solved in the future, when PHP-Parser version 4 becomes stable. - Since Rector **uses project's autoload to analyze type of elements**, it cannot be installed as project in standalone directory but **needs to be added as dependency**. Here [`bamarni/composer-bin-plugin`](https://github.com/bamarni/composer-bin-plugin) becomes useful: ```bash @@ -51,7 +49,7 @@ composer require bamarni/composer-bin-plugin --dev Then, require Rector using `composer bin`: ```bash -composer bin rector require --dev rector/rector:'dev-master' nikic/php-parser:'4.0.x-dev' +composer bin rector require --dev rector/rector:'dev-master' ``` And Rector is accessible as: diff --git a/composer.json b/composer.json index 61aa85253d1b..274641c57bf0 100644 --- a/composer.json +++ b/composer.json @@ -12,10 +12,10 @@ "jean85/pretty-package-versions": "^1.1", "nette/robot-loader": "^3.0", "nette/utils": "^2.5", - "nikic/php-parser": "4.0.x-dev", + "nikic/php-parser": "^4.0", "phpdocumentor/reflection-docblock": "^4.3", "phpdocumentor/type-resolver": "^0.4", - "rector/better-reflection": "^3.0.6", + "roave/better-reflection": "dev-master", "sebastian/diff": "^3.0", "symfony/console": "^4.0", "symfony/dependency-injection": "^4.0", From b46d2aa2856e6086d4207c647f61e98f5747b84a Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Sun, 1 Apr 2018 16:44:26 -0300 Subject: [PATCH 2/2] Use commit version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 274641c57bf0..fbb01575799c 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "nikic/php-parser": "^4.0", "phpdocumentor/reflection-docblock": "^4.3", "phpdocumentor/type-resolver": "^0.4", - "roave/better-reflection": "dev-master", + "roave/better-reflection": "dev-master#dd2c2d0", "sebastian/diff": "^3.0", "symfony/console": "^4.0", "symfony/dependency-injection": "^4.0",