Ignore ApiInstanceofTypeRule in SimultaneousTypeTraverser#4452
Ignore ApiInstanceofTypeRule in SimultaneousTypeTraverser#4452VincentLanglet wants to merge 1 commit intophpstan:2.1.xfrom
Conversation
fe4f9f5 to
a8616d5
Compare
a8616d5 to
782cdc9
Compare
|
I'm not sure about this one yet. It remains to be seen what's the right implementation for a callback in SimultaneousTypeTraverser. Because the implementation of traverseSimultaneously in IntersectionType is not obvious, it might mean that doing I'll keep this open, we'll see. |
782cdc9 to
ad5b3d3
Compare
I feel like there is already a flaw ignoring them inside TypeTraverser because while some instanceof might make sens like UnionType or IntersectionType I'm not sure every instanceof make sens. Personally my main issue was the fact that I replace a TypeTraverser by a simultaneously one in RuleLevelHelper https://github.com/phpstan/phpstan-src/pull/4210/changes#diff-9dace3387909be6cad5cfedf4087102d316daf48f31a033ae258ab119636035bR92 ending with lot of instanceof inside a SimultaneousTypeTraverser. |
Needed for #4210