Skip to content

[trav] Remove NodeTraverserInterface from RectorNodeTraverser - #8596

Merged
TomasVotruba merged 1 commit into
mainfrom
tv-remove-nodetraverser-interface
Oct 10, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
tv-remove-nodetraverser-interface

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

The RectorNodeTraverser is an immutable, Rector-specific traverser. It implemented PhpParser\NodeTraverserInterface only to satisfy the type, but the two interface methods addVisitor() / removeVisitor() just threw - they were never meant to be called.

Nothing type-hints the class as NodeTraverserInterface, and the two stub methods have no callers. This drops the interface and the empty throwing methods.

@TomasVotruba TomasVotruba changed the title Remove NodeTraverserInterface from RectorNodeTraverser [trav] Remove NodeTraverserInterface from RectorNodeTraverser Oct 10, 2026
@TomasVotruba
TomasVotruba enabled auto-merge (squash) October 10, 2026 17:12
@TomasVotruba
TomasVotruba merged commit dcca664 into main Oct 10, 2026
49 checks passed
@TomasVotruba
TomasVotruba deleted the tv-remove-nodetraverser-interface branch October 10, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant