[PhpParser] Remove BetterNodeFinder::findFirstPreviousOfTypes()#4327
[PhpParser] Remove BetterNodeFinder::findFirstPreviousOfTypes()#4327TomasVotruba merged 1 commit intomainfrom
Conversation
|
All checks have passed 🎉 @TomasVotruba I think it is ready 👍 |
|
Perfect, thank you 👏 |
| } | ||
|
|
||
| /** | ||
| * @api |
There was a problem hiding this comment.
As this method was api before, should we at least mark it as deprecated in a few releases before dropping it?
There was a problem hiding this comment.
findFirstPrevious() still available -- for now --, it basically just shortcut with only pass type instead of callable filter.
There was a problem hiding this comment.
IMO for good DX we would change api only when really required.
Even if this method is no longer used in rector-src it might have been used by people in custom rules. Therefore I think we should keep it but mark it as deprecated for at least a few releases, before dropping it.
There was a problem hiding this comment.
I will let @TomasVotruba decide on that if it going to be reverted.
There was a problem hiding this comment.
I think this method was rarely used, so its ok. Also refactoring to parent nodes should start as soon as possible, to get other packages who use it into new shape.
No description provided.