[internal] re-index changed nodes only#7651
Conversation
| throw new ShouldNotHappenException($errorMessage); | ||
| } | ||
|
|
||
| NodeAttributeReIndexer::reIndexNodeAttributes($node); |
There was a problem hiding this comment.
There is called on ChangedNodeScopeRefresher::refresh() as well, see:
rector-src/src/Application/ChangedNodeScopeRefresher.php
Lines 61 to 63 in fff99ae
while there disable sort order stmt keys.
Actually, possible bug may happen by only on after refactor, eg: when it returns remove node, which key is from parent, which means the order should be before processing as well, as next visitor may from parent, which the key not yet ordered.
There was a problem hiding this comment.
Also, the reindex needs on $refactoredNode, not a $node as it means before refactored.
There was a problem hiding this comment.
Ideally create a PR with failing test fixture on real rule we have, so we got it covered.
There was a problem hiding this comment.
I created PR:
to use on ChangedNodeScopeRefresher
Split of #7651