From f7d7f0e1e6ba3046b27c4049263cff775515fa75 Mon Sep 17 00:00:00 2001 From: TomasVotruba Date: Sat, 6 Jan 2018 16:05:19 +0100 Subject: [PATCH] README: add link to Rector how it works --- README.md | 1 + docs/HowItWorks.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 92e182a1dc1..d5ee2975f61 100644 --- a/README.md +++ b/README.md @@ -353,6 +353,7 @@ vendor/bin/ecs check --config vendor/rector/rector/ecs-after-rector.neon --fix ## More Detailed Documentation +- [How Rector Works?](/docs/HowItWorks.md) - [How to Create Own Rector](/docs/HowToCreateOwnRector.md) - [Service Name to Type Provider](/docs/ServiceNameToTypeProvider.md) diff --git a/docs/HowItWorks.md b/docs/HowItWorks.md index 7b2695ba1d8..298b9916785 100644 --- a/docs/HowItWorks.md +++ b/docs/HowItWorks.md @@ -30,7 +30,7 @@ foreach ($fileInfos as $fileInfo) { ### 2.1 Prepare Phase -- File is parsed by [`nikic/php-parser`](https://github.com/nikic/PHP-Parser), 4.0-dex (this is important, because this version support writing modified tree back to file) +- File is parsed by [`nikic/php-parser`](https://github.com/nikic/PHP-Parser), 4.0-dev (this is important, because this version support writing modified tree back to file) - Then nodes (array of objects by parser) are traversed by `StandaloneTraverseNodeTraverser` to prepare it's metadata, e.g. class name, method node the node is in, namespace name etc. added by `$node->setAttribute(Attribute::CLASS_NODE, 'value')`. ### 2.2 Rectify Phase